mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-09 14:11:29 +00:00
Fixes #3425
This commit is contained in:
@@ -4598,9 +4598,8 @@ def parseRequestFile(reqFile, checkParams=True):
|
||||
reqResList = re.finditer(BURP_REQUEST_REGEX, content, re.I | re.S)
|
||||
|
||||
for match in reqResList:
|
||||
request = match if isinstance(match, basestring) else match.group(0)
|
||||
request = match if isinstance(match, basestring) else match.group(1)
|
||||
request = re.sub(r"\A[^\w]+", "", request)
|
||||
|
||||
schemePort = re.search(r"(http[\w]*)\:\/\/.*?\:([\d]+).+?={10,}", request, re.I | re.S)
|
||||
|
||||
if schemePort:
|
||||
|
||||
@@ -100,6 +100,7 @@ from lib.core.optiondict import optDict
|
||||
from lib.core.settings import CODECS_LIST_PAGE
|
||||
from lib.core.settings import CUSTOM_INJECTION_MARK_CHAR
|
||||
from lib.core.settings import DBMS_ALIASES
|
||||
from lib.core.settings import DEFAULT_GET_POST_DELIMITER
|
||||
from lib.core.settings import DEFAULT_PAGE_ENCODING
|
||||
from lib.core.settings import DEFAULT_TOR_HTTP_PORTS
|
||||
from lib.core.settings import DEFAULT_TOR_SOCKS_PORTS
|
||||
@@ -223,10 +224,11 @@ def _setMultipleTargets():
|
||||
|
||||
if os.path.isfile(conf.logFile):
|
||||
for target in parseRequestFile(conf.logFile):
|
||||
url = target[0]
|
||||
if url not in seen:
|
||||
url, _, data, _, _ = target
|
||||
key = re.sub(r"(\w+=)[^%s ]*" % (conf.paramDel or DEFAULT_GET_POST_DELIMITER), r"\g<1>", "%s %s" % (url, data))
|
||||
if key not in seen:
|
||||
kb.targets.add(target)
|
||||
seen.add(url)
|
||||
seen.add(key)
|
||||
|
||||
elif os.path.isdir(conf.logFile):
|
||||
files = os.listdir(conf.logFile)
|
||||
@@ -237,10 +239,11 @@ def _setMultipleTargets():
|
||||
continue
|
||||
|
||||
for target in parseRequestFile(os.path.join(conf.logFile, reqFile)):
|
||||
url = target[0]
|
||||
if url not in seen:
|
||||
url, _, data, _, _ = target
|
||||
key = re.sub(r"(\w+=)[^%s ]*" % (conf.paramDel or DEFAULT_GET_POST_DELIMITER), r"\g<1>", "%s %s" % (url, data))
|
||||
if key not in seen:
|
||||
kb.targets.add(target)
|
||||
seen.add(url)
|
||||
seen.add(key)
|
||||
|
||||
else:
|
||||
errMsg = "the specified list of targets is not a file "
|
||||
|
||||
@@ -19,7 +19,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME
|
||||
from lib.core.enums import OS
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
VERSION = "1.3.1.1"
|
||||
VERSION = "1.3.1.2"
|
||||
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
||||
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)
|
||||
@@ -360,7 +360,7 @@ COMMON_PASSWORD_SUFFIXES += ("!", ".", "*", "!!", "?", ";", "..", "!!!", ", ", "
|
||||
WEBSCARAB_SPLITTER = "### Conversation"
|
||||
|
||||
# Splitter used between requests in BURP log files
|
||||
BURP_REQUEST_REGEX = r"={10,}\s+[^=]+={10,}\s(.+?)\s={10,}"
|
||||
BURP_REQUEST_REGEX = r"={10,}\s+([A-Z]{3,} .+?)\s+={10,}"
|
||||
|
||||
# Regex used for parsing XML Burp saved history items
|
||||
BURP_XML_HISTORY_REGEX = r'<port>(\d+)</port>.+?<request base64="true"><!\[CDATA\[([^]]+)'
|
||||
|
||||
Reference in New Issue
Block a user