mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-09 08:00:36 +03:00
update regarding Bug #205
This commit is contained in:
parent
762c2a1781
commit
788eb8fb50
|
@ -138,11 +138,6 @@ class Connect:
|
||||||
else:
|
else:
|
||||||
req = urllib2.Request(url, post, headers)
|
req = urllib2.Request(url, post, headers)
|
||||||
|
|
||||||
if not req.has_header("Accept-Encoding"):
|
|
||||||
requestHeaders += "Accept-Encoding: identity\n"
|
|
||||||
|
|
||||||
requestHeaders += "\n".join(["%s: %s" % (header, value) for header, value in req.header_items()])
|
|
||||||
|
|
||||||
if not conf.dropSetCookie and conf.cj:
|
if not conf.dropSetCookie and conf.cj:
|
||||||
for _, cookie in enumerate(conf.cj):
|
for _, cookie in enumerate(conf.cj):
|
||||||
if not cookieStr:
|
if not cookieStr:
|
||||||
|
@ -153,12 +148,10 @@ class Connect:
|
||||||
|
|
||||||
cookieStr += "%s; " % cookie[8:index]
|
cookieStr += "%s; " % cookie[8:index]
|
||||||
|
|
||||||
if not req.has_header("Cookie") and cookieStr:
|
conn = urllib2.urlopen(req)
|
||||||
requestHeaders += "\n%s" % cookieStr[:-2]
|
|
||||||
|
requestHeaders += "\n".join(["%s: %s" % (header, value) for header, value in req.header_items()])
|
||||||
if not req.has_header("Connection"):
|
|
||||||
requestHeaders += "\nConnection: close"
|
|
||||||
|
|
||||||
requestMsg += "\n%s" % requestHeaders
|
requestMsg += "\n%s" % requestHeaders
|
||||||
|
|
||||||
if post:
|
if post:
|
||||||
|
@ -168,8 +161,6 @@ class Connect:
|
||||||
|
|
||||||
logger.log(9, requestMsg)
|
logger.log(9, requestMsg)
|
||||||
|
|
||||||
conn = urllib2.urlopen(req)
|
|
||||||
|
|
||||||
if not kb.authHeader and req.has_header("Authorization"):
|
if not kb.authHeader and req.has_header("Authorization"):
|
||||||
kb.authHeader = req.get_header("Authorization")
|
kb.authHeader = req.get_header("Authorization")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user