D4Vinci / Cr3dOv3r

Know the dangers of credential reuse attacks.
MIT License
2.02k stars 411 forks source link

"haveibeenpwned" hangs in Python3 #40

Closed operatorequals closed 6 years ago

operatorequals commented 6 years ago

Hello! Seems like the haveibeenpwned code path have a bug, as following:

Traceback (most recent call last):
  File "Cr3d0v3r.py", line 139, in <module>
    main()
  File "Cr3d0v3r.py", line 110, in main
    to_print = ispwned.parse_data(email,1)
  File "/Users/totheiotragi/Tools/Cr3dOv3r/Core/ispwned.py", line 39, in parse_data
    Final_text   = "\n(GG)Results from haveibeenpwned website (W): (Y)"+str(len(data))
TypeError: object of type 'bool' has no len()

Seems like the data somehow gets a Bool value from check_haveibeenpwned():

def parse_data(email,parse_what=0):
    #Colors is (green - yellow - blue - red - white - magenta - cyan)
    if parse_what==0:
        data         = check_hackedEmails(email,"His shit :D")
        Final_text   = "\n(GG)Results from hacked-emails website (W): (Y)"+str(data["results"])
        data         = data["data"]
    else:
        data         = check_haveibeenpwned(email,"His shit :D")
        Final_text   = "\n(GG)Results from haveibeenpwned website (W): (Y)"+str(len(data))
operatorequals commented 6 years ago

Additionally, the provided email is in the haveibeenpwned list, as of Adobe's, Tumblr's, and Anti Public Combo lists.

D4Vinci commented 6 years ago

Yeah, haveibeenpwned do some rate-limiting that's why I made it an option because using it many times will resault in that! :smile:

D4Vinci commented 6 years ago

Version 0.4 just released! Fixed, added and improved many things. Check it out!