if hash[0:32] == signature: # 如果相同,程序结束 print("OK") exit()
其中的password.txt实际是不重复的1-9的全排列:
file1=open('password.txt','a') for a in "123456789": for b in "123456789": for c in "123456789": for d in "123456789": for e in "123456789": for f in "123456789": for g in "123456789": for h in "123456789": for i in "123456789": if a != b and a != c and a != d and a != e and a != f and a!= g and a != h and a !=i\ and b != c and b!= d and b != e and b != f and b!= g and b != h and b !=i\ and c != d and c != e and c != f and c!= g and c != h and c !=i\ and d != e and d != f and d!= g and d != h and d !=i\ and e != f and e!= g and e != h and e !=i\ and f != g and f != h and f !=i\ and g != h and g !=i\ and h != i: password = a + b + c + d + e + f + g + h + i file1.write(password+'\n') file1.close()