标签:shp code hex md5 ret 加工 ems 文本 SHH
[TOC]
import hashlib
m = hashlib.md5()
m.update(‘hello‘.encode(‘utf-8‘))
print(m.hexdiget())
--5d41402abc4b2a76b9719d911017c592
import hashlib
# 假定我们知道hash的微信会设置如下几个密码
pwd_list = [
‘hash3714‘,
‘hash1313‘,
‘hash94139413‘,
‘hash123456‘,
‘123456hash‘,
‘h123ash‘,
]
def make_pwd_dic(pwd_list):
dic = {}
for pwd in pwd_list:
m = hashlib.md5()
m.update(pwd.encode(‘utf-8‘))
dic[pwd] = m.hexdigest()
return dic
def break_code(hash_pwd, pwd_dic):
for k, v in pwd_dic.items():
if v == hash_pwd:
print(‘hash的微信的密码是===>%s‘ % k)
hash_pwd = ‘0562b36c3c5a3925dbe3c4d32a4f2ba2‘
break_code(hash_pwd, make_pwd_dic(pwd_list))
hash的微信的密码是===>hash123456
import hmac
h1 = hmac.new(b‘hash‘)
h1.update(b‘hello‘)
h1.update(b‘world‘)
print(h1.hexdigest())
标签:shp code hex md5 ret 加工 ems 文本 SHH
原文地址:https://www.cnblogs.com/shaozheng/p/11604393.html