@@ -516,16 +516,16 @@ def paramToDict(place, parameters=None):
516516
517517 for element in splitParams :
518518 element = re .sub (r"%s(.+?)%s" % (PARAMETER_AMP_MARKER , PARAMETER_SEMICOLON_MARKER ), r"&\g<1>;" , element )
519- elem = element .split ("=" )
519+ parts = element .split ("=" )
520520
521- if len (elem ) >= 2 :
522- parameter = elem [0 ].replace (" " , "" )
521+ if len (parts ) >= 2 :
522+ parameter = parts [0 ].replace (" " , "" )
523523
524524 condition = not conf .testParameter
525525 condition |= parameter in conf .testParameter
526526
527527 if condition :
528- testableParameters [parameter ] = "=" .join (elem [1 :])
528+ testableParameters [parameter ] = "=" .join (parts [1 :])
529529 if not conf .multipleTargets :
530530 _ = urldecode (testableParameters [parameter ], convall = True )
531531 if _ .strip (DUMMY_SQL_INJECTION_CHARS ) != _ \
@@ -564,6 +564,20 @@ def paramToDict(place, parameters=None):
564564 warnMsg += "is not inside the %s" % place
565565 logger .warn (warnMsg )
566566
567+ if testableParameters :
568+ for parameter , value in testableParameters .items ():
569+ if value and not value .isdigit ():
570+ for encoding in ("hex" , "base64" ):
571+ try :
572+ decoded = value .decode (encoding )
573+ if all (_ in string .printable for _ in decoded ):
574+ warnMsg = "provided parameter '%s' " % parameter
575+ warnMsg += "seems to be '%s' encoded" % encoding
576+ logger .warn (warnMsg )
577+ break
578+ except :
579+ pass
580+
567581 return testableParameters
568582
569583def getDocRoot ():
0 commit comments