Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Python 

HaveIBeenPwned Mass checker

Code
from lxml import html
import time
import requests

file = open("emails.txt").readlines()


for line in file:
    newline = line.replace("\n","")
    page = requests.get('https://haveibeenpwned.com/account/' + newline)
    tree = html.fromstring(page.content)

    data = tree.xpath('//div[@class="pwnedSearchResult pwnedWebsite panel-collapse in"]/@id')
    data_2 = tree.xpath('//p[@class="dataClasses"]/text()')
    merged = list(zip(data, data_2))

    if not merged:
        print("[-]No breach info found on user: " + newline)
    else:
        print("\nUsername/Email: " +  newline + "\n")
        for item in merged:
            print("[+]Breach FOUND: " + item[0].upper() + "\n" + item[1] + "\n")
    time.sleep(1)


Just edit emails.txt to whatever input file you want to use. Each line of the file should contain a username or an email.

This is by no means a perfect program, but it should be able to check lists of usernames/emails.


output looks like this:

Code
Username/Email: [email protected]

[+]Breach FOUND: EXPLOITIN
Email addresses, Passwords

[+]Breach FOUND: XSPLIT
Email addresses, Names, Passwords, Usernames

[Image: x8KB36H.gif]



Possibly Related Threads...
Thread / Author Replies Views Last Post
[Python] by husky141Feb 22, 2016 09:10 AM 7 906 Feb 22, 2016 09:10 AM
Last Post: fairtexpro
[.NET] by XaMinGXMar 7, 2014 09:00 AM 1 591 Mar 7, 2014 09:00 AM
Last Post: LethalNET
[Python] by Un-IdentifiedJan 16, 2014 11:53 AM 3 440 Jan 16, 2014 11:53 AM
Last Post: Un-Identified