hackedmail_check.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:operative-framework 作者: graniet 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号