import string, hashlib, time
start = time.time()
comb = string.punctuation + string.digits
# ?1_1001_10_600_600_??00??7_202103301539
target = "b9fd??9d5??c1?f6c??abd????5ac??7"
import itertools
for i in itertools.product(comb, repeat=5):
# print(i)
x = '{}1_1001_10_600_600_{}{}00{}{}7_202103301539'.format(*i)
xmd5 = hashlib.md5(x.encode()).hexdigest()
if xmd5[:4] == 'b9fd' and xmd5[6:9] == '9d5':
print(x, xmd5, end='/')
break
end = time.time()
print('time elapsed:', end - start)
爆破x字符串中的5个未知数,获得与target一样的md5