___ __ ____
/ _ |__ __ ____ / /___ / __ \_ __ ___
/ __ / // // __// // _ \ / /_/ / |/|/ // _ \
/_/ |_\_,_/ \__//_/ \___/ / .___/|__,__//_//_/
/_/
π Successfully deobfuscated a 64-layer encrypted malware sample!
Zero configuration β’ Unlimited layers β’ Self-healing recovery
import autopwn
# Simple decode - it just works!
code = autopwn.decode(encrypted_data)
print(code)
|
|
|
|
Not available on pip for now, I'll launch in the upcoming updates.wget https://raw.githubusercontent.com/savvythunder/autopwn/main/autopwn.py- Python 3.7+
- Standard library only (no external dependencies)
import autopwn
# From file
result = autopwn.decode_file("encrypted.py")
# From string
encrypted = "exec(__import__('zlib').decompress(__import__('base64').b64decode(b'...')))"
clean_code = autopwn.decode(encrypted)
# With debug output
code = autopwn.decode(data, debug=True)# Get detailed extraction info
result = autopwn.extract_with_info(encrypted_data)
print(f"Layers extracted: {result.layers}")
print(f"Quality score: {result.quality}")
print(f"Processing time: {result.time}s")Successfully deobfuscated the most sophisticated malware sample ever encountered
π β π β π β ... β π β π
64 Layers of Encryption
Challenge: A heavily obfuscated malware sample with 64 nested layers of:
- Base64 encoding
- Zlib compression
- String reversal
- Multiple escape sequences
Result: β Complete extraction in under 2 seconds!
| Format | Description | Status |
|---|---|---|
| Base64 | Standard and URL-safe variants | β |
| Gzip | GNU zip compression | β |
| Zlib | Zlib compression | β |
| Bz2 | Bzip2 compression | β |
| LZMA | LZMA/XZ compression | β |
| Hex | Hexadecimal encoding | β |
| URL | URL percent encoding | β |
| JSON | Escaped JSON strings | β |
Main deobfuscation function.
Parameters:
data(str|bytes): Encrypted/obfuscated datadebug(bool): Enable debug output
Returns: Deobfuscated code as string
Deobfuscate from file.
Parameters:
filepath(str): Path to encrypted filedebug(bool): Enable debug output
Returns: Deobfuscated code as string
Extract with detailed information.
Returns: Object with .code, .layers, .quality, .time attributes
| Metric | Value |
|---|---|
| Speed | < 2 seconds for 64 layers |
| Memory | < 50MB peak usage |
| Accuracy | 99.8% successful extraction |
| Max Layers | 1000+ supported |
- Input Analysis - Detects obfuscation patterns
- Layer Extraction - Recursively processes each layer
- Quality Assessment - Evaluates code readability
- Cycle Detection - Prevents infinite loops
- Final Validation - Ensures clean output
- Safe Execution - No code execution during analysis
- Cycle Protection - Hash-based loop detection
- Memory Limits - Prevents resource exhaustion
- Input Validation - Sanitizes malicious input
MIT License - see LICENSE file for details.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
- GitHub Issues: Report bugs
- Documentation: Not needed*