Python简单的CTF题目hash碰撞小脚本


import hashlib

for num in range(10000,9999999999):
    res = hashlib.sha1(str(num).encode()).hexdigest() #sha1改为题目需要的算法
    if res[0:5] == "903ed":   #对hash的前五位为"903ed"的数字进行碰撞
        print(str(num)) #等待执行结束 输出结果
        break

 

相关文章:

  • 2022-12-23
  • 2021-04-27
  • 2022-02-06
  • 2022-12-23
  • 2021-10-13
  • 2022-12-23
  • 2022-12-23
  • 2021-03-30
猜你喜欢
  • 2022-12-23
  • 2021-10-25
  • 2021-08-28
  • 2022-12-23
  • 2021-12-09
  • 2022-01-01
相关资源
相似解决方案