@@ -190,7 +190,7 @@ def checkSqlInjection(place, parameter, value):
190190 msg += "back-end DBMS could be %s. " % Format .getErrorParsedDBMSes ()
191191 msg += "Do you want to skip test payloads specific for other DBMSes? [Y/n]"
192192
193- if conf . realTest or readInput (msg , default = "Y" ) in ("y" , "Y" ):
193+ if readInput (msg , default = "Y" ) in ("y" , "Y" ):
194194 kb .skipOthersDbms = Backend .getErrorParsedDBMSes ()
195195 else :
196196 kb .skipOthersDbms = []
@@ -503,7 +503,7 @@ def genCmpPayload():
503503 injection .conf .regexp = conf .regexp
504504 injection .conf .optimize = conf .optimize
505505
506- if conf .beep or conf . realTest :
506+ if conf .beep :
507507 beep ()
508508
509509 # There is no need to perform this test for other
@@ -644,44 +644,6 @@ def heuristicCheckSqlInjection(place, parameter):
644644
645645 return result
646646
647- def simpletonCheckSqlInjection (place , parameter , value ):
648- """
649- This is a function for the quickest and simplest
650- SQL injection check (e.g. AND 1=1) - only works
651- with integer parameters
652- """
653-
654- result = False
655- randInt = randomInt ()
656-
657- if value .isdigit ():
658- payload = "%s AND %d=%d" % (value , randInt , randInt )
659- else :
660- return False
661-
662- payload = agent .payload (place , parameter , value , payload )
663- firstPage , _ = Request .queryPage (payload , place , content = True , raise404 = False )
664-
665- if not (wasLastRequestDBMSError () or wasLastRequestHTTPError ()):
666- if getComparePageRatio (kb .originalPage , firstPage , filtered = True ) > CONSTANT_RATIO :
667- payload = "%s AND %d=%d" % (value , randInt , randInt + 1 )
668-
669- payload = agent .payload (place , parameter , value , payload )
670- secondPage , _ = Request .queryPage (payload , place , content = True , raise404 = False )
671- result = getComparePageRatio (firstPage , secondPage , filtered = True ) <= CONSTANT_RATIO
672-
673- infoMsg = "simpleton test shows that %s " % place
674- infoMsg += "parameter '%s' might " % parameter
675-
676- if result :
677- infoMsg += "be injectable"
678- logger .info (infoMsg )
679- else :
680- infoMsg += "not be injectable"
681- logger .warn (infoMsg )
682-
683- return result
684-
685647def checkDynParam (place , parameter , value ):
686648 """
687649 This function checks if the url parameter is dynamic. If it is
@@ -806,10 +768,7 @@ def checkStability():
806768 logger .warn (warnMsg )
807769
808770 message = "how do you want to proceed? [(C)ontinue/(s)tring/(r)egex/(q)uit] "
809- if not conf .realTest :
810- test = readInput (message , default = "C" )
811- else :
812- test = None
771+ test = readInput (message , default = "C" )
813772
814773 if test and test [0 ] in ("q" , "Q" ):
815774 raise sqlmapUserQuitException
0 commit comments