Update for #3587 (multiple request files per option -r)

This commit is contained in:
Miroslav Stampar 2019-04-18 11:07:58 +02:00
parent 6831031cf7
commit 9289939ced
2 changed files with 17 additions and 14 deletions

View File

@ -293,22 +293,25 @@ def _setRequestFromFile():
""" """
if conf.requestFile: if conf.requestFile:
conf.requestFile = safeExpandUser(conf.requestFile) for requestFile in re.split(PARAMETER_SPLITTING_REGEX, conf.requestFile):
seen = set() requestFile = safeExpandUser(requestFile)
seen = set()
if not checkFile(conf.requestFile, False): if not checkFile(requestFile, False):
errMsg = "specified HTTP request file '%s' " % conf.requestFile errMsg = "specified HTTP request file '%s' " % requestFile
errMsg += "does not exist" errMsg += "does not exist"
raise SqlmapFilePathException(errMsg) raise SqlmapFilePathException(errMsg)
infoMsg = "parsing HTTP request from '%s'" % conf.requestFile infoMsg = "parsing HTTP request from '%s'" % requestFile
logger.info(infoMsg) logger.info(infoMsg)
for target in parseRequestFile(conf.requestFile): for target in parseRequestFile(requestFile):
url = target[0] url = target[0]
if url not in seen: if url not in seen:
kb.targets.add(target) kb.targets.add(target)
seen.add(url) if len(kb.targets) > 1:
conf.multipleTargets = True
seen.add(url)
if conf.secondReq: if conf.secondReq:
conf.secondReq = safeExpandUser(conf.secondReq) conf.secondReq = safeExpandUser(conf.secondReq)

View File

@ -17,7 +17,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME
from lib.core.enums import OS from lib.core.enums import OS
# sqlmap version (<major>.<minor>.<month>.<monthly commit>) # sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.3.4.19" VERSION = "1.3.4.20"
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable" TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34} TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE) VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)