python md5加密
2022/2/5 9:42:32
本文主要是介绍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 md5加密的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-11-21Python编程基础教程
- 2024-11-20Python编程基础与实践
- 2024-11-20Python编程基础与高级应用
- 2024-11-19Python 基础编程教程
- 2024-11-19Python基础入门教程
- 2024-11-17在FastAPI项目中添加一个生产级别的数据库——本地环境搭建指南
- 2024-11-16`PyMuPDF4LLM`:提取PDF数据的神器
- 2024-11-16四种数据科学Web界面框架快速对比:Rio、Reflex、Streamlit和Plotly Dash
- 2024-11-14获取参数学习:Python编程入门教程
- 2024-11-14Python编程基础入门