window.onload=function(){ /*页面加载完成之后生成博客目录*/ BlogDirectory.createBlogDirectory("cnblogs_post_body","h2","h3",20); }

[LitCTF 2023]md5的破解

题目分数:415

题目标签: CRYPTOMD5爆破

题目描述:

- 出题人:lingfeng
NSSCTF

附件:

from Crypto.Util.number import *
from hashlib import md5
from secret import flag

#flag全是由小写字母及数字组成
m=md5(flag).hexdigest()
print(flag[:13]+flag[15:18]+flag[19:34]+flag[35:38])
print(m)
# b'LitCTF{md5can3derypt213thoughcrsh}'
# 496603d6953a15846cd7cc476f146771

解题:

# 附件信息
from Crypto.Util.number import *
# from hashlib import md5
# from secret import flag
#
# #flag全是由小写字母及数字组成
# m=md5(flag).hexdigest()
# print(flag[:13]+flag[15:18]+flag[19:34]+flag[35:38])
# print(m)
# b'LitCTF{md5can3derypt213thoughcrsh}'
# 496603d6953a15846cd7cc476f146771

# 解码:
import string
import hashlib
dic = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_}{'
for i in dic:
    for j in dic:
        for k in dic:
            for l in dic:
              s = 'LitCTF{md5can'+i+j+'3de'+k+'rypt213thoughcr'+l+'sh}'
              print(s)
              if hashlib.md5(s.encode('utf-8')).hexdigest() == '496603d6953a15846cd7cc476f146771':
                 print("Find it: "+s)
                 exit(0)

得到:LitCTF{md5can123dexrypt213thoughcrpsh}

posted @ 2023-05-15 20:25  Kicky_Mu  阅读(200)  评论(0编辑  收藏  举报