mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 09:36:35 +03:00
Minor improvement of error-based SQLi when trimmed output is detected (trying to reconstruct)
This commit is contained in:
parent
71c43be53a
commit
a074efe75e
|
@ -74,7 +74,7 @@ def _oneShotErrorUse(expression, field=None):
|
|||
try:
|
||||
while True:
|
||||
check = "%s(?P<result>.*?)%s" % (kb.chars.start, kb.chars.stop)
|
||||
trimcheck = "%s(?P<result>.*?)</" % (kb.chars.start)
|
||||
trimcheck = "%s(?P<result>[^<]*)" % (kb.chars.start)
|
||||
|
||||
if field:
|
||||
nulledCastedField = agent.nullAndCastField(field)
|
||||
|
@ -130,6 +130,10 @@ def _oneShotErrorUse(expression, field=None):
|
|||
warnMsg += safecharencode(trimmed)
|
||||
logger.warn(warnMsg)
|
||||
|
||||
if not kb.testMode:
|
||||
check = "(?P<result>.*?)%s" % kb.chars.stop[:2]
|
||||
output = extractRegexResult(check, trimmed, re.IGNORECASE)
|
||||
|
||||
if any(Backend.isDbms(dbms) for dbms in (DBMS.MYSQL, DBMS.MSSQL)):
|
||||
if offset == 1:
|
||||
retVal = output
|
||||
|
|
Loading…
Reference in New Issue
Block a user