mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-09 22:21:30 +00:00
More general approach regarding that last commit
This commit is contained in:
@@ -119,9 +119,6 @@ def _goInferenceFields(expression, expressionFields, expressionFieldsList, paylo
|
|||||||
if isinstance(num, int):
|
if isinstance(num, int):
|
||||||
expression = origExpr
|
expression = origExpr
|
||||||
|
|
||||||
if output and isinstance(output, basestring):
|
|
||||||
output = output.strip() if output.strip() else output[:1]
|
|
||||||
|
|
||||||
outputs.append(output)
|
outputs.append(output)
|
||||||
|
|
||||||
return outputs
|
return outputs
|
||||||
@@ -390,8 +387,6 @@ def getValue(expression, blind=True, union=True, error=True, time=True, fromUser
|
|||||||
else:
|
else:
|
||||||
value = _goInferenceProxy(query, fromUser, batch, unpack, charsetType, firstChar, lastChar, dump)
|
value = _goInferenceProxy(query, fromUser, batch, unpack, charsetType, firstChar, lastChar, dump)
|
||||||
|
|
||||||
if value and isinstance(value, basestring):
|
|
||||||
value = value.strip() if value.strip() else value[:1]
|
|
||||||
else:
|
else:
|
||||||
errMsg = "none of the injection types identified can be "
|
errMsg = "none of the injection types identified can be "
|
||||||
errMsg += "leveraged to retrieve queries output"
|
errMsg += "leveraged to retrieve queries output"
|
||||||
|
|||||||
@@ -529,8 +529,9 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
|
|||||||
elif conf.verbose in (1, 2):
|
elif conf.verbose in (1, 2):
|
||||||
dataToStdout(filterControlChars(val))
|
dataToStdout(filterControlChars(val))
|
||||||
|
|
||||||
|
# some DBMSes (e.g. Firebird, DB2, etc.) have issues with trailing spaces
|
||||||
if len(partialValue) > INFERENCE_BLANK_BREAK and partialValue[-INFERENCE_BLANK_BREAK:].isspace() and partialValue.strip(' ')[-1:] != '\n':
|
if len(partialValue) > INFERENCE_BLANK_BREAK and partialValue[-INFERENCE_BLANK_BREAK:].isspace() and partialValue.strip(' ')[-1:] != '\n':
|
||||||
finalValue = partialValue
|
finalValue = partialValue[:-INFERENCE_BLANK_BREAK]
|
||||||
break
|
break
|
||||||
|
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
|
|||||||
Reference in New Issue
Block a user