def checkSuhosinPatch(injection):
 if (injection.place == PLACE.GET):
  debugMsg = 'checking for parameter length '
  debugMsg += 'constrainting mechanisms'
  logger.debug(debugMsg)
  pushValue(kb.injection)
  kb.injection = injection
  randInt = randomInt()
  if (not checkBooleanExpression(('%d=%s%d' % (randInt, (' ' * SUHOSIN_MAX_VALUE_LENGTH), randInt)))):
   warnMsg = 'parameter length constrainting '
   warnMsg += 'mechanism detected (e.g. Suhosin patch). '
   warnMsg += 'Potential problems in enumeration phase can be expected'
   logger.warn(warnMsg)
  kb.injection = popValue()

def checkSuhosinPatch ( injection ) : if ( injection . place == PLACE . GET ) : debugMsg = 'checking for parameter length ' debugMsg += 'constrainting mechanisms' logger . debug ( debugMsg ) pushValue ( kb . injection ) kb . injection = injection randInt = randomInt ( ) if ( not checkBooleanExpression ( ( '%d=%s%d' % ( randInt , ( ' ' * SUHOSIN_MAX_VALUE_LENGTH ) , randInt ) ) ) ) : warnMsg = 'parameter length constrainting ' warnMsg += 'mechanism detected (e.g. Suhosin patch). ' warnMsg += 'Potential problems in enumeration phase can be expected' logger . warn ( warnMsg ) kb . injection = popValue ( )
checks for existence of suhosin-patch protection mechanism(s) .