mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-03 05:04:11 +03:00
Patch for an Issue #286
This commit is contained in:
parent
65273295e3
commit
a38b3e397c
|
@ -1128,7 +1128,8 @@ def parseTargetUrl():
|
|||
conf.httpHeaders = filter(lambda (key, value): key != HTTPHEADER.HOST, conf.httpHeaders)
|
||||
conf.httpHeaders.append((HTTPHEADER.HOST, getHostHeader(conf.url)))
|
||||
|
||||
kb.originalUrls[conf.url] = originalUrl
|
||||
if conf.url != originalUrl:
|
||||
kb.originalUrls[conf.url] = originalUrl
|
||||
|
||||
def expandAsteriskForColumns(expression):
|
||||
"""
|
||||
|
|
|
@ -457,9 +457,11 @@ def _createTargetDirs():
|
|||
conf.outputPath = tempDir
|
||||
|
||||
try:
|
||||
with open(os.path.join(conf.outputPath, "target.txt"), "w+") as f:
|
||||
_ = kb.originalUrls.get(conf.url) or conf.url or conf.hostname
|
||||
f.write(_.encode(UNICODE_ENCODING))
|
||||
with codecs.open(os.path.join(conf.outputPath, "target.txt"), "w+", UNICODE_ENCODING) as f:
|
||||
f.write(kb.originalUrls.get(conf.url) or conf.url or conf.hostname)
|
||||
f.write(" (%s)" % (HTTPMETHOD.POST if conf.data else HTTPMETHOD.GET))
|
||||
if conf.data:
|
||||
f.write("\n\n%s" % conf.data)
|
||||
except IOError, ex:
|
||||
if "denied" in str(ex):
|
||||
errMsg = "you don't have enough permissions "
|
||||
|
|
Loading…
Reference in New Issue
Block a user