(technique=None)
Prepares data for technique specified
Prepares data for technique specified
Prepares data for technique specified
def initTechnique(technique=None):
    """
    Prepares data for technique specified
    """

    try:
        data = getTechniqueData(technique)
        resetCounter(technique)

        if data:
            kb.pageTemplate, kb.errorIsNone = getPageTemplate(data.templatePayload, kb.injection.place)
            kb.matchRatio = data.matchRatio
            kb.negativeLogic = (technique == PAYLOAD.TECHNIQUE.BOOLEAN) and (data.where == PAYLOAD.WHERE.NEGATIVE)

            # Restoring stored conf options
            for key, value in kb.injection.conf.items():
                if value and (not hasattr(conf, key) or (hasattr(conf, key) and not getattr(conf, key))):
                    setattr(conf, key, value)
                    debugMsg = "resuming configuration option '%s' (%s)" % (key, value)
                    logger.debug(debugMsg)

                    if value and key == "optimize":
                        setOptimize()
        else:
            warnMsg = "there is no injection data available for technique "
            warnMsg += "'%s'" % enumValueToNameLookup(PAYLOAD.TECHNIQUE, technique)
            logger.warn(warnMsg)

    except SqlmapDataException:
        errMsg = "missing data in old session file(s). "
        errMsg += "Please use '--flush-session' to deal "
        errMsg += "with this error"
        raise SqlmapNoneDataException(errMsg)
def initTechnique ( technique = None ) : try : data = getTechniqueData ( technique ) resetCounter ( technique ) if data : kb . pageTemplate , kb . errorIsNone = getPageTemplate ( data . templatePayload , kb . injection . place ) kb . matchRatio = data . matchRatio kb . negativeLogic = ( technique == PAYLOAD . TECHNIQUE . BOOLEAN ) and ( data . where == PAYLOAD . WHERE . NEGATIVE ) # Restoring stored conf options for key , value in kb . injection . conf . items ( ) : if value and ( not hasattr ( conf , key ) or ( hasattr ( conf , key ) and not getattr ( conf , key ) ) ) : setattr ( conf , key , value ) debugMsg = "resuming configuration option '%s' (%s)" % ( key , value ) logger . debug ( debugMsg ) if value and key == "optimize" : setOptimize ( ) else : warnMsg = "there is no injection data available for technique " warnMsg += "'%s'" % enumValueToNameLookup ( PAYLOAD . TECHNIQUE , technique ) logger . warn ( warnMsg ) except SqlmapDataException : errMsg = "missing data in old session file(s). " errMsg += "Please use '--flush-session' to deal " errMsg += "with this error" raise SqlmapNoneDataException ( errMsg )