This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| # oposec-padding-oracle.py | |
| import os | |
| import base64 | |
| import urllib3 | |
| import requests | |
| import threading | |
| from concurrent.futures import ThreadPoolExecutor |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # oposec-xor-known-plaintext-attack-encrypted-chat.py | |
| # ncat madlabs.pw 1337 | |
| encrypted_flag = bytes.fromhex("418831b6416977a29459e1071f4a08ceb24beed7d9364ca2b23460") | |
| encrypted_plaintext = bytes.fromhex("61a81196414f558eaa09f6390c181cdce075bec5e7301ef7a7747c77") | |
| known_plaintext = b"flag{" + b"a" * 50 | |
| key = bytes(x ^ y for x, y in zip(encrypted_plaintext, known_plaintext)) | |
| flag = bytes(x ^ y for x, y in zip(encrypted_flag, key)) | |
| print(flag) |
OlderNewer