Skip to content

Instantly share code, notes, and snippets.

@intrd
Last active March 11, 2019 07:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save intrd/0f8c80703fff31259117d7f3c969bc28 to your computer and use it in GitHub Desktop.
Save intrd/0f8c80703fff31259117d7f3c969bc28 to your computer and use it in GitHub Desktop.
Haveibeenpwned mail leaked mass checker
## Haveibeenpwned mail leaked mass checker
# @author intrd - http://dann.com.br/
# @license Creative Commons Attribution-ShareAlike 4.0 International License - http://creativecommons.org/licenses/by-sa/4.0/
# usage: python hpwned.py maillist.txt
import requests, json, time, sys
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
s = requests.session()
mailist = sys.argv[1]
with open(mailist,'r') as f:
for mail in f:
mail = mail.strip()
print mail+"."
reqs='https://haveibeenpwned.com/api/v2/breachedaccount/'+mail
data = s.get(reqs, verify=False)
d = data.content
try:
d = json.loads(d)
for x in d:
print "- "+str(x['Title'])
except:
pass
time.sleep(11) # to avoid hitting the api limit
int@:~/$ python hpwned.py test.txt
test1@gmail.com.
- 000webhost
- AbuseWith.Us
- Acne.org
- Adobe
- Bell (2017 breach)
- Bitcoin Security Forum Gmail Dump
- Bitcoin Talk
- Bitly
- Cross Fire
- Dailymotion
- Disqus
- DLH.net
- Dropbox
- Edmodo
- Elance
- Evony
- Heroes of Newerth
- iMesh
- JobStreet
- Kickstarter
- Leet
- LinkedIn
- MoDaCo
- MySpace
- Onliner Spambot
- Patreon
- PayAsUGym
test2@gmail.com.
- 000webhost
- AbuseWith.Us
- Adobe
- Bell (2017 breach)
- Bitcoin Security Forum Gmail Dump
- Bitcoin Talk
- CrackingForum
- Dailymotion
- Dropbox
- Dungeons & Dragons Online
- Edmodo
- Elance
- Evony
- Heroes of Newerth
- Insanelyi
- Last.fm
- Leet
- Lifeboat
- LinkedIn
- MCBans
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment