Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from multiprocessing.dummy import Pool as ThreadPool
- import itertools
- import string
- import binascii
- from Crypto.Cipher import DES
- enc = '522c932a276554e5'
- charset = string.ascii_lowercase + string.digits + '_'
- pool = ThreadPool(64)
- def dec(key):
- print key
- cipher = DES.new(bytes(key), DES.MODE_ECB)
- ciphertext = binascii.hexlify(cipher.encrypt(b'70c97cc1'))
- if ciphertext == enc:
- print(key)
- keys = []
- for key in itertools.product(charset, repeat=8):
- key = ''.join(key)
- keys.append(key)
- pool.map(dec,keys)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement