zoukankan      html  css  js  c++  java
  • PHP处理0e开头md5哈希字符串缺陷/bug

    PHP在处理哈希字符串时,会利用”!=”或”==”来对哈希值进行比较,它把每一个以”0E”开头的哈希值都解释为0,所以如果两个不同的密码经过哈希以后,其哈希值都是以”0E”开头的,那么PHP将会认为他们相同,都是0。
    
    关于PHP hash比较缺陷详细介绍:http://www.freebuf.com/news/67007.html 
    0x01 md5(str)
    
    QNKCDZO
    0e830400451993494058024219903391
     
    s878926199a
    0e545993274517709034328855841020
     
    s155964671a
    0e342768416822451524974117254469
     
    s214587387a
    0e848240448830537924465865611904
     
    s214587387a
    0e848240448830537924465865611904
     
    s878926199a
    0e545993274517709034328855841020
     
    s1091221200a
    0e940624217856561557816327384675
     
    s1885207154a
    0e509367213418206700842008763514
     
    s1502113478a
    0e861580163291561247404381396064
     
    s1885207154a
    0e509367213418206700842008763514
     
    s1836677006a
    0e481036490867661113260034900752
     
    s155964671a
    0e342768416822451524974117254469
     
    s1184209335a
    0e072485820392773389523109082030
     
    s1665632922a
    0e731198061491163073197128363787
     
    s1502113478a
    0e861580163291561247404381396064
     
    s1836677006a
    0e481036490867661113260034900752
     
    s1091221200a
    0e940624217856561557816327384675
     
    s155964671a
    0e342768416822451524974117254469
     
    s1502113478a
    0e861580163291561247404381396064
     
    s155964671a
    0e342768416822451524974117254469
     
    s1665632922a
    0e731198061491163073197128363787
     
    s155964671a
    0e342768416822451524974117254469
     
    s1091221200a
    0e940624217856561557816327384675
     
    s1836677006a
    0e481036490867661113260034900752
     
    s1885207154a
    0e509367213418206700842008763514
     
    s532378020a
    0e220463095855511507588041205815
     
    s878926199a
    0e545993274517709034328855841020
     
    s1091221200a
    0e940624217856561557816327384675
     
    s214587387a
    0e848240448830537924465865611904
     
    s1502113478a
    0e861580163291561247404381396064
     
    s1091221200a
    0e940624217856561557816327384675
     
    s1665632922a
    0e731198061491163073197128363787
     
    s1885207154a
    0e509367213418206700842008763514
     
    s1836677006a
    0e481036490867661113260034900752
     
    s1665632922a
    0e731198061491163073197128363787
     
    s878926199a
    0e545993274517709034328855841020
    
    
    0x02 md5(md5())
     
    0x03 md5(md5(str)."SALT")
    2
    0e774261293712168181959463563504
    

    Copyright © 2021 Primzahl. All rights reserved.

  • 相关阅读:
    Leetcode: Longest Absolute File Path
    Leetcode: Mini Parser
    Leetcode: First Unique Character in a String
    Leetcode: Lexicographical Numbers
    Leetcode: Shuffle an Array
    Leetcode: Ransom Note
    Leetcode: Linked List Random Node
    Socket网络编程--聊天程序(7)
    Socket网络编程--聊天程序(6)
    Socket网络编程--聊天程序(5)
  • 原文地址:https://www.cnblogs.com/Primzahl/p/6018158.html
Copyright © 2011-2022 走看看