def main(self):
api_url = 'https://hacked-emails.com/api?q='
email = self.get_options('email')
if email != "":
if "@" in email and "." in email:
complet_url = api_url + str(email)
req = requests.get(complet_url)
content = req.text
if content != "":
content = json.loads(content)
if content['status'] and content['status'] == "found":
print "Result found (" + Fore.GREEN + str(content['results']) + " results" + Style.RESET_ALL + ")"
for line in content['data']:
try:
print Fore.BLUE + " * " + Style.RESET_ALL + " found in : " + Fore.GREEN + str(line['title']) + Style.RESET_ALL + \
" (" + Fore.YELLOW + str(line['date_leaked']) + Style.RESET_ALL + ")"
self.export.append(line['title'])
except:
print Fore.BLUE + " * " + Style.RESET_ALL + " found in : ( can't parse leaks title)"
else:
print "Status (" + Fore.RED + "Not found" + Style.RESET_ALL + ")"
else:
print Fore.RED + "Error found in json" + Style.RESET_ALL + ")"
else:
print Fore.YELLOW + "Invalid email please retry with correct email address" + Style.RESET_ALL
评论列表
文章目录