mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-03 13:14:13 +03:00
Implementation of an Issue #147
This commit is contained in:
parent
74ee0ce78a
commit
f358ab2e73
|
@ -237,7 +237,7 @@ def start():
|
||||||
return True
|
return True
|
||||||
|
|
||||||
if conf.url and not any([conf.forms, conf.crawlDepth]):
|
if conf.url and not any([conf.forms, conf.crawlDepth]):
|
||||||
kb.targetUrls.add(( conf.url, conf.method, conf.data, conf.cookie ))
|
kb.targetUrls.add((conf.url, conf.method, conf.data, conf.cookie))
|
||||||
|
|
||||||
if conf.configFile and not kb.targetUrls:
|
if conf.configFile and not kb.targetUrls:
|
||||||
errMsg = "you did not edit the configuration file properly, set "
|
errMsg = "you did not edit the configuration file properly, set "
|
||||||
|
|
|
@ -1029,6 +1029,8 @@ def parseTargetUrl():
|
||||||
if not conf.url:
|
if not conf.url:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
originalUrl = conf.url
|
||||||
|
|
||||||
if re.search("\[.+\]", conf.url) and not socket.has_ipv6:
|
if re.search("\[.+\]", conf.url) and not socket.has_ipv6:
|
||||||
errMsg = "IPv6 addressing is not supported "
|
errMsg = "IPv6 addressing is not supported "
|
||||||
errMsg += "on this platform"
|
errMsg += "on this platform"
|
||||||
|
@ -1091,6 +1093,9 @@ def parseTargetUrl():
|
||||||
conf.httpHeaders = filter(lambda (key, value): key != HTTPHEADER.HOST, conf.httpHeaders)
|
conf.httpHeaders = filter(lambda (key, value): key != HTTPHEADER.HOST, conf.httpHeaders)
|
||||||
conf.httpHeaders.append((HTTPHEADER.HOST, getHostHeader(conf.url)))
|
conf.httpHeaders.append((HTTPHEADER.HOST, getHostHeader(conf.url)))
|
||||||
|
|
||||||
|
if originalUrl != conf.url:
|
||||||
|
kb.originalUrls[conf.url] = originalUrl
|
||||||
|
|
||||||
def expandAsteriskForColumns(expression):
|
def expandAsteriskForColumns(expression):
|
||||||
"""
|
"""
|
||||||
If the user provided an asterisk rather than the column(s)
|
If the user provided an asterisk rather than the column(s)
|
||||||
|
|
|
@ -1519,6 +1519,7 @@ def __setKnowledgeBaseAttributes(flushAll=True):
|
||||||
kb.originalCode = None
|
kb.originalCode = None
|
||||||
kb.originalPage = None
|
kb.originalPage = None
|
||||||
kb.originalTimeDelay = None
|
kb.originalTimeDelay = None
|
||||||
|
kb.originalUrls = dict()
|
||||||
|
|
||||||
# Back-end DBMS underlying operating system fingerprint via banner (-b)
|
# Back-end DBMS underlying operating system fingerprint via banner (-b)
|
||||||
# parsing
|
# parsing
|
||||||
|
|
|
@ -398,6 +398,9 @@ def __createTargetDirs():
|
||||||
|
|
||||||
conf.outputPath = tempDir
|
conf.outputPath = tempDir
|
||||||
|
|
||||||
|
with open(os.path.join(conf.outputPath, "target.txt"), "w+") as f:
|
||||||
|
f.write(kb.originalUrls.get(conf.url) or conf.url or conf.hostname)
|
||||||
|
|
||||||
__createDumpDir()
|
__createDumpDir()
|
||||||
__createFilesDir()
|
__createFilesDir()
|
||||||
__configureDumper()
|
__configureDumper()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user