Created
February 11, 2018 23:14
-
-
Save ammaraskar/84bfceca5c6320d1310ade9f4f9a22ba to your computer and use it in GitHub Desktop.
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
import os | |
import tqdm | |
import cryptography | |
import base64 | |
from multiprocessing import Pool | |
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes | |
from cryptography.hazmat.backends import default_backend | |
encrypted = base64.b64decode("U2FsdGVkX1+1KcLc+WlP8rcjdSP8DnOx/W1h+lww6rGCUVH4ghAuhSs+Xs9ShwJNEFlJ4IWDoG00T4LnAqIMrsY9EODHGc7Jv/Rn1lC/h7k=") | |
ct = encrypted[16:] | |
backend = default_backend() | |
def process_i(i): | |
id = format(i, '07') | |
iv = id + id + ("00" * 9) | |
key = bytes(bytearray.fromhex("5C2C997C1C84AC01E500FDD00B8E03DB")) | |
iv = bytes(bytearray.fromhex(iv)) | |
decryptor = Cipher(algorithms.AES(key), modes.CBC(iv), backend=backend).decryptor() | |
out = decryptor.update(ct) + decryptor.finalize() | |
name = out[0:7] | |
if name.isalpha() and name.islower(): | |
print(id) | |
print(name) | |
print(" ") | |
if __name__ == '__main__': | |
pool = Pool(os.cpu_count()) | |
total = 9999999 + 1 | |
for _ in tqdm.tqdm(pool.imap_unordered(process_i, range(total)), total=total): | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment