Python Proxy Test
From Federal Burro of Information
#!/usr/bin/env python from base64 import b64encode import httplib import pprint pp = pprint.PrettyPrinter(indent=4) c = httplib.HTTPConnection('IPADDRESS:8080') userAndPass = b64encode(b"username:password").decode("ascii") print userAndPass # headers = { 'Authorization' : 'Basic %s' % userAndPass } # pp.pprint(headers) #then connect # c.request('GET', '/', headers=headers) c.request('GET', '/') #get the response back res = c.getresponse() print "read()" pp.pprint(res.read()) print "" print "headers" pp.pprint(res.getheaders()) print "" print "status" pp.pprint(res.status) print "" print "reason" pp.pprint(res.reason) pp.pprint(res) # at this point you could check the status etc # this gets the page text data = res.read()