mailfail.py 文件源码

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

项目:MailFail 作者: m0rtem 项目源码 文件源码
def tor_test():
    # Get Tor IP from wtfismyip
    try:
        with urllib.request.urlopen('https://wtfismyip.com/text') as response:
            html = response.read()
            print_out(Style.BRIGHT + Fore.GREEN + "Your Tor IP is: " + html.decode('utf-8'))
    except HTTPError as e:
        # do something
        print_out(Style.BRIGHT + Fore.RED + "Error code: " + str(e.code))
        exit(1)
    except URLError as e:
        # do something
        print_out(Style.BRIGHT + Fore.RED + "Reason: " + str(e.reason))
        exit(1)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号