Advertisement
Guest User

Untitled

a guest
Oct 21st, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. from multiprocessing.dummy import Pool as ThreadPool
  2. import itertools
  3. import string
  4. import binascii
  5. from Crypto.Cipher import DES
  6.  
  7.  
  8. enc = '522c932a276554e5'
  9. charset = string.ascii_lowercase + string.digits + '_'
  10.  
  11. pool = ThreadPool(64)
  12.  
  13.  
  14. def dec(key):
  15. print key
  16. cipher = DES.new(bytes(key), DES.MODE_ECB)
  17. ciphertext = binascii.hexlify(cipher.encrypt(b'70c97cc1'))
  18. if ciphertext == enc:
  19. print(key)
  20.  
  21. keys = []
  22.  
  23.  
  24. for key in itertools.product(charset, repeat=8):
  25. key = ''.join(key)
  26. keys.append(key)
  27.  
  28. pool.map(dec,keys)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement