From 7553b45a34404aa87194796b0514aed00ca97467 Mon Sep 17 00:00:00 2001 From: Felix Pankratz Date: Tue, 24 Mar 2020 21:00:45 +0100 Subject: [PATCH] now through proxy for http and https, yaay --- panxy.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/panxy.py b/panxy.py index 607eeb2..1999d3e 100644 --- a/panxy.py +++ b/panxy.py @@ -1,14 +1,13 @@ #!/usr/bin/env python3 # panxy, a random proxy connector -PXY_IP = "200.89.178.196" -PX_PORT = 80 - from urllib import request +import sys +target = "http://theresno.cloud/ip" -target = "https://theresno.cloud/ip" +proxy_handler = request.ProxyHandler({'https': 'http://felixpankratz.de:80/', 'http': 'http://felixpankratz.de:80/' }) -result = request.urlopen(target) +opener = request.build_opener(proxy_handler) content = result.read().decode() print(content)