mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-03-03 11:45:46 +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)
|
||||
addedTargetUrls = set()
|
||||
|
||||
if not conf.list:
|
||||
if not conf.logFile:
|
||||
return
|
||||
|
||||
debugMsg = "parsing targets list from '%s'" % conf.list
|
||||
debugMsg = "parsing targets list from '%s'" % conf.logFile
|
||||
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"
|
||||
raise sqlmapFilePathException, errMsg
|
||||
|
||||
if os.path.isfile(conf.list):
|
||||
__feedTargetsDict(conf.list, addedTargetUrls)
|
||||
if os.path.isfile(conf.logFile):
|
||||
__feedTargetsDict(conf.logFile, addedTargetUrls)
|
||||
|
||||
elif os.path.isdir(conf.list):
|
||||
files = os.listdir(conf.list)
|
||||
elif os.path.isdir(conf.logFile):
|
||||
files = os.listdir(conf.logFile)
|
||||
files.sort()
|
||||
|
||||
for reqFile in files:
|
||||
if not re.search("([\d]+)\-request", reqFile):
|
||||
continue
|
||||
|
||||
__feedTargetsDict(os.path.join(conf.list, reqFile), addedTargetUrls)
|
||||
__feedTargetsDict(os.path.join(conf.logFile, reqFile), addedTargetUrls)
|
||||
|
||||
else:
|
||||
errMsg = "the specified list of targets is not a file "
|
||||
|
@ -1211,7 +1211,7 @@ def __cleanupOptions():
|
|||
if 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
|
||||
|
||||
if conf.optimize:
|
||||
|
@ -1602,7 +1602,7 @@ def __basicOptionValidation():
|
|||
errMsg = "switch --proxy is incompatible with switch --ignore-proxy"
|
||||
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"
|
||||
raise sqlmapSyntaxException, errMsg
|
||||
|
||||
|
@ -1636,7 +1636,7 @@ def init(inputOptions=advancedDict(), overrideOptions=False):
|
|||
parseTargetUrl()
|
||||
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()
|
||||
__setHTTPExtraHeaders()
|
||||
__setHTTPCookies()
|
||||
|
|
|
@ -15,7 +15,7 @@ optDict = {
|
|||
"Target": {
|
||||
"direct": "string",
|
||||
"url": "string",
|
||||
"list": "string",
|
||||
"logFile": "string",
|
||||
"requestFile": "string",
|
||||
"googleDork": "string",
|
||||
"configFile": "string"
|
||||
|
|
|
@ -44,7 +44,7 @@ def cmdLineParser():
|
|||
|
||||
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")
|
||||
|
||||
target.add_option("-r", dest="requestFile",
|
||||
|
|
|
@ -16,7 +16,7 @@ url =
|
|||
# Valid: Burp proxy (http://portswigger.net/suite/) requests log file path
|
||||
# or WebScarab proxy (http://www.owasp.org/index.php/Category:OWASP_WebScarab_Project)
|
||||
# 'conversations/' folder path
|
||||
list =
|
||||
logFile =
|
||||
|
||||
# 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
|
||||
|
|
Loading…
Reference in New Issue
Block a user