python md5加密
作者:互联网
from hashlib import md5 from string import ascii_letters,digits from itertools import permutations from time import time import pymysql,sys all_letters=ascii_letters+digits+'.,;' ma=["4787b9dab081dd08bd290622980d3cbb","22036718004f0e3b1b4e2080784a4126","464b08b928f442a29509b14672193ed6","cabd9831fb15cc9ed9116ee8ce9c80b0","844c8b37f228c33216bccaf95b2ac4ec","4787b9dab081dd08bd290622980d3cbb"] def decrypt_md5(md5_value): if len(md5_value)!=32:
print('error') return md5_value=md5_value.lower() for k in range(5,10): for item in permutations(all_letters,k): item=''.join(item) #print('.',end='') result=[] key1=item key2=md5(item.encode()).hexdigest() result.append(([key1,key2,])) charu(result) if key2==md5_value: return item
def charu(uuk): con = connect.cursor() try: con.executemany('insert ignore into md5(k1,k2)values(%s,%s)',uuk) connect.commit() print("保存数据成功") except Exception as e: connect.rollback() kkey="q8+RRKkEqv4zyuzjIMV8G2BP7DnQk4t4AWJDkBYaHSLYieM1Yo12HXX+kjtBpHqHcOlBFYiYDtFZEgolwvZlOoftH/vqqLSMhzS0Aq6rnT3FI0uJ0ItZk1Ecv9TKDSfQFfwFC2PPr3im0cARl5vKw0BJ2XoXcozl0oZUoKaZn4OZXmQnPs0VYzeqLhGi3inwUxlX+/Wb292rh9lA6q7c3MnYa6RVFGjaqcT5ruyAmlqBJSQtWU58glEB44x6fKpgPenFb5IEc32IMZMHsyFBw3qwwnmkcQOYl4dsnfQ+ieYgFfY+Y0rlecfG0xEX7skGG+uztujf1WxFNOGkNTdt9w==" key2=md5(kkey.encode()).hexdigest() print(key2)
搜索
复制
标签:加密,python,key2,value,item,letters,import,md5 来源: https://www.cnblogs.com/xkdn/p/15863834.html