Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import hashlib
- import string
- import random
- from itertools import product
- i = 100000
- while True:
- test = str(i)
- hash_object = hashlib.sha1(test.encode('utf-8'))
- dig = hash_object.digest()
- if dig[0] == 0x13 and dig[1] == 0x37:
- res = [ (a ^ 0x41) for a in dig]
- if res[0] == 0x52 and res[1] == 0x76:
- sum_arg1 = 0
- for i in range(len(test)):
- sum_arg1 += ord(test[i])
- sum_arg1 &= 0xFF
- if sum_arg1 == dig[19]:
- valid = ''.join('{:02X}'.format(a) for a in res)
- sha1 = ''.join('{:02X}'.format(a) for a in dig)
- print(test + ' ' + valid + ' ' + sha1)
- exit(0)
- i += 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement