@@ -516,16 +516,16 @@ def paramToDict(place, parameters=None):
516
516
517
517
for element in splitParams :
518
518
element = re .sub (r"%s(.+?)%s" % (PARAMETER_AMP_MARKER , PARAMETER_SEMICOLON_MARKER ), r"&\g<1>;" , element )
519
- elem = element .split ("=" )
519
+ parts = element .split ("=" )
520
520
521
- if len (elem ) >= 2 :
522
- parameter = elem [0 ].replace (" " , "" )
521
+ if len (parts ) >= 2 :
522
+ parameter = parts [0 ].replace (" " , "" )
523
523
524
524
condition = not conf .testParameter
525
525
condition |= parameter in conf .testParameter
526
526
527
527
if condition :
528
- testableParameters [parameter ] = "=" .join (elem [1 :])
528
+ testableParameters [parameter ] = "=" .join (parts [1 :])
529
529
if not conf .multipleTargets :
530
530
_ = urldecode (testableParameters [parameter ], convall = True )
531
531
if _ .strip (DUMMY_SQL_INJECTION_CHARS ) != _ \
@@ -564,6 +564,20 @@ def paramToDict(place, parameters=None):
564
564
warnMsg += "is not inside the %s" % place
565
565
logger .warn (warnMsg )
566
566
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
+
567
581
return testableParameters
568
582
569
583
def getDocRoot ():
0 commit comments