Skip to content

Commit

Permalink
Update LeakedDB method
Browse files Browse the repository at this point in the history
Bugs fixed, code cleaned
  • Loading branch information
calganaygun committed Nov 26, 2020
1 parent 843e2ac commit 39de63a
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions modules/LeakedDB.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
from bs4 import BeautifulSoup
import json, requests
import requests
from insides.bcolors import bcolors
from prettytable import PrettyTable

def LeakedDB(mail,_verbose=None):
if _verbose != None:
try:
headers = {
"Accept": "application/json"
}
leakedpassurl = "https://scylla.sh/search?q=email:"
u = (leakedpassurl+mail)
response = requests.get(u,timeout=5,headers=headers)
html = response.content
lp = json.loads(html)
res = requests.get(f"https://scylla.sh/search?q=email:{mail}&size=50&start=0", headers={'Accept': 'application/json'}).json()
table = PrettyTable(["Domain","Email",f"{bcolors.FAIL}Password{bcolors.ENDC}"])
for s in range(len(lp)):
table.add_row([lp[s]["fields"]["domain"],lp[s]["fields"]["email"],lp[s]["fields"]["password"]])
print(table)
except:
if len(res):
for s in res:
table.add_row([s["fields"]["domain"],s["fields"]["email"],s["fields"].get("password") or s["fields"].get("passhash") or "No Pass Data"])
print(table)
else:
print(f"{bcolors.FAIL}No leaked accounts found!{bcolors.ENDC}")
except Exception as e:
print(e)
print(f"{bcolors.FAIL}Leaked DB Connection Error!{bcolors.ENDC}")

0 comments on commit 39de63a

Please sign in to comment.