mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-05-03 15:23:44 +03:00
changing conf attribute to a more proper name
This commit is contained in:
parent
deae534ee7
commit
192c685bc8
|
@ -319,28 +319,28 @@ def __setMultipleTargets():
|
||||||
initialTargetsCount = len(kb.targetUrls)
|
initialTargetsCount = len(kb.targetUrls)
|
||||||
addedTargetUrls = set()
|
addedTargetUrls = set()
|
||||||
|
|
||||||
if not conf.list:
|
if not conf.logFile:
|
||||||
return
|
return
|
||||||
|
|
||||||
debugMsg = "parsing targets list from '%s'" % conf.list
|
debugMsg = "parsing targets list from '%s'" % conf.logFile
|
||||||
logger.debug(debugMsg)
|
logger.debug(debugMsg)
|
||||||
|
|
||||||
if not os.path.exists(conf.list):
|
if not os.path.exists(conf.logFile):
|
||||||
errMsg = "the specified list of targets does not exist"
|
errMsg = "the specified list of targets does not exist"
|
||||||
raise sqlmapFilePathException, errMsg
|
raise sqlmapFilePathException, errMsg
|
||||||
|
|
||||||
if os.path.isfile(conf.list):
|
if os.path.isfile(conf.logFile):
|
||||||
__feedTargetsDict(conf.list, addedTargetUrls)
|
__feedTargetsDict(conf.logFile, addedTargetUrls)
|
||||||
|
|
||||||
elif os.path.isdir(conf.list):
|
elif os.path.isdir(conf.logFile):
|
||||||
files = os.listdir(conf.list)
|
files = os.listdir(conf.logFile)
|
||||||
files.sort()
|
files.sort()
|
||||||
|
|
||||||
for reqFile in files:
|
for reqFile in files:
|
||||||
if not re.search("([\d]+)\-request", reqFile):
|
if not re.search("([\d]+)\-request", reqFile):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
__feedTargetsDict(os.path.join(conf.list, reqFile), addedTargetUrls)
|
__feedTargetsDict(os.path.join(conf.logFile, reqFile), addedTargetUrls)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
errMsg = "the specified list of targets is not a file "
|
errMsg = "the specified list of targets is not a file "
|
||||||
|
@ -1211,7 +1211,7 @@ def __cleanupOptions():
|
||||||
if conf.tmpPath:
|
if conf.tmpPath:
|
||||||
conf.tmpPath = ntToPosixSlashes(normalizePath(conf.tmpPath))
|
conf.tmpPath = ntToPosixSlashes(normalizePath(conf.tmpPath))
|
||||||
|
|
||||||
if conf.googleDork or conf.list or conf.forms:
|
if conf.googleDork or conf.logFile or conf.forms:
|
||||||
conf.multipleTargets = True
|
conf.multipleTargets = True
|
||||||
|
|
||||||
if conf.optimize:
|
if conf.optimize:
|
||||||
|
@ -1602,7 +1602,7 @@ def __basicOptionValidation():
|
||||||
errMsg = "switch --proxy is incompatible with switch --ignore-proxy"
|
errMsg = "switch --proxy is incompatible with switch --ignore-proxy"
|
||||||
raise sqlmapSyntaxException, errMsg
|
raise sqlmapSyntaxException, errMsg
|
||||||
|
|
||||||
if conf.forms and (conf.list or conf.direct or conf.requestFile or conf.googleDork):
|
if conf.forms and (conf.logFile or conf.direct or conf.requestFile or conf.googleDork):
|
||||||
errMsg = "switch --forms is compatible only with -u (--url) target switch"
|
errMsg = "switch --forms is compatible only with -u (--url) target switch"
|
||||||
raise sqlmapSyntaxException, errMsg
|
raise sqlmapSyntaxException, errMsg
|
||||||
|
|
||||||
|
@ -1636,7 +1636,7 @@ def init(inputOptions=advancedDict(), overrideOptions=False):
|
||||||
parseTargetUrl()
|
parseTargetUrl()
|
||||||
parseTargetDirect()
|
parseTargetDirect()
|
||||||
|
|
||||||
if conf.url or conf.list or conf.requestFile or conf.googleDork or conf.liveTest:
|
if conf.url or conf.logFile or conf.requestFile or conf.googleDork or conf.liveTest:
|
||||||
__setHTTPTimeout()
|
__setHTTPTimeout()
|
||||||
__setHTTPExtraHeaders()
|
__setHTTPExtraHeaders()
|
||||||
__setHTTPCookies()
|
__setHTTPCookies()
|
||||||
|
|
|
@ -15,7 +15,7 @@ optDict = {
|
||||||
"Target": {
|
"Target": {
|
||||||
"direct": "string",
|
"direct": "string",
|
||||||
"url": "string",
|
"url": "string",
|
||||||
"list": "string",
|
"logFile": "string",
|
||||||
"requestFile": "string",
|
"requestFile": "string",
|
||||||
"googleDork": "string",
|
"googleDork": "string",
|
||||||
"configFile": "string"
|
"configFile": "string"
|
||||||
|
|
|
@ -44,7 +44,7 @@ def cmdLineParser():
|
||||||
|
|
||||||
target.add_option("-u", "--url", dest="url", help="Target url")
|
target.add_option("-u", "--url", dest="url", help="Target url")
|
||||||
|
|
||||||
target.add_option("-l", dest="list", help="Parse targets from Burp "
|
target.add_option("-l", dest="logFile", help="Parse targets from Burp "
|
||||||
"or WebScarab proxy logs")
|
"or WebScarab proxy logs")
|
||||||
|
|
||||||
target.add_option("-r", dest="requestFile",
|
target.add_option("-r", dest="requestFile",
|
||||||
|
|
|
@ -16,7 +16,7 @@ url =
|
||||||
# Valid: Burp proxy (http://portswigger.net/suite/) requests log file path
|
# Valid: Burp proxy (http://portswigger.net/suite/) requests log file path
|
||||||
# or WebScarab proxy (http://www.owasp.org/index.php/Category:OWASP_WebScarab_Project)
|
# or WebScarab proxy (http://www.owasp.org/index.php/Category:OWASP_WebScarab_Project)
|
||||||
# 'conversations/' folder path
|
# 'conversations/' folder path
|
||||||
list =
|
logFile =
|
||||||
|
|
||||||
# Load HTTP request from a file
|
# Load HTTP request from a file
|
||||||
# Example (file content): POST /login.jsp HTTP/1.1\nHost: example.com\nUser-Agent: Mozilla/4.0\n\nuserid=joe&password=guessme
|
# Example (file content): POST /login.jsp HTTP/1.1\nHost: example.com\nUser-Agent: Mozilla/4.0\n\nuserid=joe&password=guessme
|
||||||
|
|
Loading…
Reference in New Issue
Block a user