May 17, 2018 09:22 AM
(This post was last modified: May 17, 2018 10:27 AM by LSDoom.)
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]](https://i.imgur.com/x8KB36H.gif)

