This project provides a Python implementation of the ColdFusion encrypt and decrypt functions with the default configuration. This project provides the exact same functionality as ColdFusion's built-in encryption and decryption, ensuring compatibility for applications that need to work with ColdFusion-encrypted data.
The implementation is based on the open-source Railo project, ensuring accuracy and compatibility with ColdFusion's encryption standards.
Instead, it can be used for:
- Interoperability with ColdFusion
- Decoding ColdFusion-Encrypted Data
- ColdFusion to Python Migration
- Reverse Engineering & Security Audits
- Compatible with ColdFusion's default encryption and decryption functions.
- UUCoder: Implements encoding and decoding using UUEncoding format.
- Transformer: Implements a LFSR-based transformation algorithm for encryption/decryption.
- CFMXCompat: Provides a high-level interface for encrypting and decrypting data using both the UUCoder and Transformer.
- Python 3.x
- No external dependencies are required, only built-in Python libraries.
$ git clone https://github.com/typek22/cfmx_compat_python.git
$ cd cfmx_compat_python
$ python main.pykey = "86090ec89fa81d7b" encrypted_text = "#2 B+" plain_text = "Cat"
$ python main.py ENCRYPTION original: 'Cat', encrypted: '#3P:8'. DECRYPTION original: '#2 B+', decrypted: 'Dog'.
from crypt.cfmx_compat import CFMXCompat key = "e3548384e1ee4c26" encrypted_text = "&6%Z,LJ6Z" plain_text = "Rabbit" decrypted = CFMXCompat.decrypt(encrypted_text, key) encrypted = CFMXCompat.encrypt(plain_text, key)
This is the same as following CFML code
<cfscript> key = "e3548384e1ee4c26"; encrypted_text = "&6%Z,LJ6Z" plain_text = "Rabbit" decrypted = decrypt(encrypted_text, key); encrypted = encrypt(plain_text, key); </cfscript>