mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-24 08:14:24 +03:00
fix for booleans
This commit is contained in:
parent
fe2039f5ba
commit
4d8628e8fb
|
@ -479,4 +479,13 @@ def goStacked(expression, silent=False):
|
|||
return payload, page
|
||||
|
||||
def checkBooleanExpression(expression, expectingNone=False):
|
||||
return getValue(expression, expected="bool", expectingNone=expectingNone)
|
||||
retVal = getValue(expression, expected="bool", expectingNone=expectingNone)
|
||||
if isinstance(retVal, basestring):
|
||||
retVal = retVal.lower()
|
||||
if retVal in ("true", "false"):
|
||||
retVal = bool(retVal)
|
||||
else:
|
||||
retVal = retVal != "0"
|
||||
elif isinstance(retVal, int):
|
||||
retVal = bool(retVal)
|
||||
return retVal
|
||||
|
|
Loading…
Reference in New Issue
Block a user