From c9abe54de323c39927f8abadc99615e85dbfb5c7 Mon Sep 17 00:00:00 2001 From: "Foster \"Forst\" Snowhill" Date: Wed, 30 May 2018 14:58:57 +0300 Subject: [PATCH] Decode server response in IP detection routine --- mtprotoproxy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mtprotoproxy.py b/mtprotoproxy.py index ef8d153..c7d4b45 100755 --- a/mtprotoproxy.py +++ b/mtprotoproxy.py @@ -234,7 +234,7 @@ def print_tg_info(): with urllib.request.urlopen('https://ifconfig.co/ip') as f: if f.status != 200: raise Exception("Invalid status code") - my_ip = f.read().strip() + my_ip = f.read().decode().strip() except Exception: my_ip = 'YOUR_IP'