mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 17:46:37 +03:00
minor code refactoring
This commit is contained in:
parent
28d5248c04
commit
3e152f8b20
|
@ -96,10 +96,7 @@ class Connect:
|
||||||
if not conf.proxy:
|
if not conf.proxy:
|
||||||
if conf.hostname in ('localhost', '127.0.0.1'):
|
if conf.hostname in ('localhost', '127.0.0.1'):
|
||||||
proxyHandler = urllib2.ProxyHandler({})
|
proxyHandler = urllib2.ProxyHandler({})
|
||||||
if proxyHandler:
|
multipartOpener = urllib2.build_opener(*(proxyHandler, multipartpost.MultipartPostHandler) if proxyHandler else multipartpost.MultipartPostHandler)
|
||||||
multipartOpener = urllib2.build_opener(proxyHandler, multipartpost.MultipartPostHandler)
|
|
||||||
else:
|
|
||||||
multipartOpener = urllib2.build_opener(multipartpost.MultipartPostHandler)
|
|
||||||
conn = multipartOpener.open(url, multipart)
|
conn = multipartOpener.open(url, multipart)
|
||||||
page = conn.read()
|
page = conn.read()
|
||||||
responseHeaders = conn.info()
|
responseHeaders = conn.info()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user