mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 09:36:35 +03:00
one more fix regarding localhost/global proxy issue
This commit is contained in:
parent
24d3e24db0
commit
28d5248c04
|
@ -92,7 +92,14 @@ class Connect:
|
|||
requestMsg += "?%s" % params
|
||||
|
||||
elif multipart:
|
||||
multipartOpener = urllib2.build_opener(multipartpost.MultipartPostHandler)
|
||||
proxyHandler = None
|
||||
if not conf.proxy:
|
||||
if conf.hostname in ('localhost', '127.0.0.1'):
|
||||
proxyHandler = urllib2.ProxyHandler({})
|
||||
if proxyHandler:
|
||||
multipartOpener = urllib2.build_opener(proxyHandler, multipartpost.MultipartPostHandler)
|
||||
else:
|
||||
multipartOpener = urllib2.build_opener(multipartpost.MultipartPostHandler)
|
||||
conn = multipartOpener.open(url, multipart)
|
||||
page = conn.read()
|
||||
responseHeaders = conn.info()
|
||||
|
|
Loading…
Reference in New Issue
Block a user