@@ -157,6 +157,7 @@ def checkSqlInjection(place, parameter, value):
157157 # error message, simple heuristic check or via DBMS-specific
158158 # payload), ask the user to limit the tests to the fingerprinted
159159 # DBMS
160+
160161 if kb .reduceTests is None and not conf .testFilter and (intersect (Backend .getErrorParsedDBMSes (), SUPPORTED_DBMS , True ) or kb .heuristicDbms or injection .dbms ):
161162 msg = "it looks like the back-end DBMS is '%s'. " % (Format .getErrorParsedDBMSes () or kb .heuristicDbms or joinValue (injection .dbms , '/' ))
162163 msg += "Do you want to skip test payloads specific for other DBMSes? [Y/n]"
@@ -1041,11 +1042,6 @@ def heuristicCheckSqlInjection(place, parameter):
10411042 if conf .skipHeuristics :
10421043 return None
10431044
1044- if kb .heavilyDynamic :
1045- debugMsg = "heuristic check skipped because of heavy dynamicity"
1046- logger .debug (debugMsg )
1047- return None
1048-
10491045 origValue = conf .paramDict [place ][parameter ]
10501046 paramType = conf .method if conf .method not in (None , HTTPMETHOD .GET , HTTPMETHOD .POST ) else place
10511047
@@ -1082,7 +1078,7 @@ def _(page):
10821078
10831079 casting = _ (page ) and not _ (kb .originalPage )
10841080
1085- if not casting and not result and kb .dynamicParameter and origValue .isdigit ():
1081+ if not casting and not result and kb .dynamicParameter and origValue .isdigit () and not kb . heavilyDynamic :
10861082 randInt = int (randomInt ())
10871083 payload = "%s%s%s" % (prefix , "%d-%d" % (int (origValue ) + randInt , randInt ), suffix )
10881084 payload = agent .payload (place , parameter , newValue = payload , where = PAYLOAD .WHERE .REPLACE )
@@ -1096,6 +1092,11 @@ def _(page):
10961092
10971093 kb .heuristicTest = HEURISTIC_TEST .CASTED if casting else HEURISTIC_TEST .NEGATIVE if not result else HEURISTIC_TEST .POSITIVE
10981094
1095+ if kb .heavilyDynamic :
1096+ debugMsg = "heuristic check stopped because of heavy dynamicity"
1097+ logger .debug (debugMsg )
1098+ return kb .heuristicTest
1099+
10991100 if casting :
11001101 errMsg = "possible %s casting detected (e.g. '" % ("integer" if origValue .isdigit () else "type" )
11011102
0 commit comments