1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
| import hashlib import itertools
text = ['A2F17ED1C6A8BC31769CDF654DF4B8A937042CB6', '0CA8A2EDB0C1D34A432A5A4464E0D6ABD847C831', 'C359D69F3F08BB920F2C3B51133205533462093E', 'CC5C3FE6E7356A26A134CFF5633349F597C40A9D', '4AC4BB3F27F245BA9178651AA5CDEDCBB2862E2A', 'A01E33F4DCDB6BA1AE9F34A97CF8F6DEEEDF1A8D', 'D3AF70912A8C1B22CFDECE071BA36BC4662B58FA', '9395EAB195D25B676D7D07075D3838A9AC19DF21', 'FDB43C5EF76ECDA0C1661D6D199B5BFAC1DB538A', 'DA8E9997A010BE78B20108CE79FEC1FB9C63D8DC', '809DA627F1AD01D65864C376E3179B62D9D74261', '8F61EE21AC7579626934E0FFB6A62B3D4A82EEC4', 'E2A954758FDB61F869998E9788B7B7E48480B832', 'B8E3349B97532B27AA62B8718B68240179158144']
for i in range(len(text)): print(len(text[i]))
modle = list(itertools.product( ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '{', '}', '_', '!', '@', '|'], repeat=3))
i = -1 flag = ''
for k in range(len(text)): while True: i += 1 str = ''.join(modle[i])
if hashlib.sha1(str.encode()).hexdigest() in text[k].lower(): print('correct: ', str) flag += str break else: print('[-]:' + str) i = -1 print(flag)
|