Brute-force decrypt stuff with 9 algorithms. Good for CTF and pentesting.
- 9 algorithms: AES, DES, 3DES, Blowfish, ARC2, ARC4, CAST, XOR, RSA
- 4 block modes: ECB, CBC, CFB, OFB
- Fast: Multithreaded, tests all combinations in parallel
- Smart detection: Identifies valid decryptions by scoring plaintext quality
- Auto-detect mode: Don't know the algo? Let it figure it out
pip install -r requirements.txtTry one key:
python c1ph3r.py -c "base64_ciphertext" -k "password"Try wordlist:
python c1ph3r.py -c "base64_ciphertext" -k common_keys.txtOnly specific algorithms:
python c1ph3r.py -c "data" -k keys.txt -a AES DES3Faster (more threads):
python c1ph3r.py -c "data" -k keys.txt -t 8Find keywords in results:
python c1ph3r.py -c "data" -k keys.txt --keywords flag ctfDon't know which algorithm was used? Use the --auto flag:
python c1ph3r.py -c "ciphertext" -k keys.txt --autoIt will test all likely algorithms and show them ranked by confidence score.
Basic:
from c1ph3r import CrackerFactory
import base64
ciphertext = base64.b64decode("your_base64")
keys = [b"key1", b"key2"]
cracker = CrackerFactory.create_fast(threads=8)
results = cracker.crack(ciphertext, keys)
for score, plaintext, algo, mode, key in results:
print(f"{algo}/{mode}: {plaintext}")Auto-detect:
from c1ph3r.autodetect import C1ph3rAutodetect
detector = C1ph3rAutodetect()
detector.run(ciphertext, keys)Examples in tests/ folder:
test.txt- 7 test vectors for all algorithmstest-keys.txt- 7 keys that decrypt test vectors
See tests/README.md for details.
-c, --ciphertext Base64 ciphertext (required)
-k, --key Key or wordlist file (required)
-a, --algorithms Algorithms to try (default: all)
-m, --modes Modes to try (default: all)
-t, --threads Threads (default: 4)
-s, --min-score Min score 0-1 (default: 0.5)
--keywords Boost results with these words
-n, --top-results Show top N results (default: 10)
--auto Auto-detect algorithm
--show-hex Show hex output
--show-stats Show stats
| Name | Key Size | Speed |
|---|---|---|
| AES | 16/24/32 bytes | Fast |
| DES | 8 bytes | Slow |
| 3DES | 16/24 bytes | Slow |
| Blowfish | 4-56 bytes | Fast |
| ARC2 | 1-128 bytes | Fast |
| ARC4 | 1-256 bytes | Very Fast |
| CAST | 5-16 bytes | Fast |
| XOR | Any | Very Fast |
| RSA | 1024+ bits | Slow |
MIT - Made by p1p4w