Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 14bf1e4

Browse files
DimopoulosEliasstamparm
authored andcommitted
Add INFERENCE_EQUALS_CHAR during the check for false positives (#3609)
* Update checks.py * Update checks.py
1 parent c4e3ce1 commit 14bf1e4

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

lib/controller/checks.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@
9999
from lib.core.settings import UNICODE_ENCODING
100100
from lib.core.settings import URI_HTTP_HEADER
101101
from lib.core.settings import UPPER_RATIO_BOUND
102+
from lib.core.settings import INFERENCE_EQUALS_CHAR
102103
from lib.core.threads import getCurrentThreadData
103104
from lib.request.connect import Connect as Request
104105
from lib.request.comparison import comparison
@@ -915,23 +916,23 @@ def _():
915916
if randInt3 > randInt2 > randInt1:
916917
break
917918

918-
if not checkBooleanExpression("%d=%d" % (randInt1, randInt1)):
919+
if not checkBooleanExpression("%d%s%d" % (randInt1,INFERENCE_EQUALS_CHAR, randInt1)):
919920
retVal = False
920921
break
921922

922923
# Just in case if DBMS hasn't properly recovered from previous delayed request
923924
if PAYLOAD.TECHNIQUE.BOOLEAN not in injection.data:
924-
checkBooleanExpression("%d=%d" % (randInt1, randInt2))
925+
checkBooleanExpression("%d%s%d" % (randInt1, INFERENCE_EQUALS_CHAR, randInt2))
925926

926-
if checkBooleanExpression("%d=%d" % (randInt1, randInt3)): # this must not be evaluated to True
927+
if checkBooleanExpression("%d%s%d" % (randInt1, INFERENCE_EQUALS_CHAR, randInt3)): # this must not be evaluated to True
927928
retVal = False
928929
break
929930

930-
elif checkBooleanExpression("%d=%d" % (randInt3, randInt2)): # this must not be evaluated to True
931+
elif checkBooleanExpression("%d%s%d" % (randInt3, INFERENCE_EQUALS_CHAR, randInt2)): # this must not be evaluated to True
931932
retVal = False
932933
break
933934

934-
elif not checkBooleanExpression("%d=%d" % (randInt2, randInt2)): # this must be evaluated to True
935+
elif not checkBooleanExpression("%d%s%d" % (randInt2, INFERENCE_EQUALS_CHAR, randInt2)): # this must be evaluated to True
935936
retVal = False
936937
break
937938

0 commit comments

Comments
 (0)