mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-29 13:03:50 +03:00
Properly handle both HTTPS and HTTP requests through proxy
This commit is contained in:
parent
e1ef27f592
commit
0a83a830d9
|
@ -668,11 +668,10 @@ def __setHTTPProxy():
|
||||||
# HTTPS over (Squid) Proxy fails) as long as HTTP over SSL requests
|
# HTTPS over (Squid) Proxy fails) as long as HTTP over SSL requests
|
||||||
# can't be tunneled over an HTTP proxy natively by Python (<= 2.5)
|
# can't be tunneled over an HTTP proxy natively by Python (<= 2.5)
|
||||||
# urllib2 standard library
|
# urllib2 standard library
|
||||||
if conf.scheme == "https":
|
if PYVERSION >= "2.6":
|
||||||
if PYVERSION >= "2.6":
|
proxyHandler = urllib2.ProxyHandler({"http": __proxyString, "https": __proxyString})
|
||||||
proxyHandler = urllib2.ProxyHandler({"https": __proxyString})
|
elif conf.scheme == "https":
|
||||||
else:
|
proxyHandler = ProxyHTTPSHandler(__proxyString)
|
||||||
proxyHandler = ProxyHTTPSHandler(__proxyString)
|
|
||||||
else:
|
else:
|
||||||
proxyHandler = urllib2.ProxyHandler({"http": __proxyString})
|
proxyHandler = urllib2.ProxyHandler({"http": __proxyString})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user