Advertisement
x1n53n

Keygenme Léo

Jan 14th, 2020
556
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.73 KB | None | 0 0
  1. import hashlib
  2. import string
  3. import random
  4. from itertools import product
  5.  
  6.  
  7. i = 100000
  8. while True:
  9.     test = str(i)
  10.  
  11.     hash_object = hashlib.sha1(test.encode('utf-8'))
  12.     dig = hash_object.digest()
  13.  
  14.     if dig[0] == 0x13 and dig[1] == 0x37:
  15.         res = [ (a ^ 0x41) for a in dig]
  16.         if res[0] == 0x52 and res[1] == 0x76:
  17.             sum_arg1 = 0
  18.             for i in range(len(test)):
  19.                 sum_arg1 += ord(test[i])
  20.             sum_arg1 &= 0xFF
  21.             if sum_arg1 == dig[19]:
  22.                 valid = ''.join('{:02X}'.format(a) for a in res)
  23.                 sha1 = ''.join('{:02X}'.format(a) for a in dig)
  24.                 print(test + ' ' + valid + ' ' + sha1)
  25.                 exit(0)
  26.     i += 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement