MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / initTechnique

Function initTechnique

lib/core/common.py:3617–3649  ·  view source on GitHub ↗

Prepares data for technique specified

(technique=None)

Source from the content-addressed store, hash-verified

3615 raise SqlmapSystemException(errMsg)
3616
3617def initTechnique(technique=None):
3618 """
3619 Prepares data for technique specified
3620 """
3621
3622 try:
3623 data = getTechniqueData(technique)
3624 resetCounter(technique)
3625
3626 if data:
3627 kb.pageTemplate, kb.errorIsNone = getPageTemplate(data.templatePayload, kb.injection.place)
3628 kb.matchRatio = data.matchRatio
3629 kb.negativeLogic = (technique == PAYLOAD.TECHNIQUE.BOOLEAN) and (data.where == PAYLOAD.WHERE.NEGATIVE)
3630
3631 # Restoring stored conf options
3632 for key, value in kb.injection.conf.items():
3633 if value and (not hasattr(conf, key) or (hasattr(conf, key) and not getattr(conf, key))):
3634 setattr(conf, key, value)
3635 debugMsg = "resuming configuration option '%s' (%s)" % (key, ("'%s'" % value) if isinstance(value, six.string_types) else value)
3636 logger.debug(debugMsg)
3637
3638 if value and key == "optimize":
3639 setOptimize()
3640 else:
3641 warnMsg = "there is no injection data available for technique "
3642 warnMsg += "'%s'" % enumValueToNameLookup(PAYLOAD.TECHNIQUE, technique)
3643 logger.warning(warnMsg)
3644
3645 except SqlmapDataException:
3646 errMsg = "missing data in old session file(s). "
3647 errMsg += "Please use '--flush-session' to deal "
3648 errMsg += "with this error"
3649 raise SqlmapNoneDataException(errMsg)
3650
3651def arrayizeValue(value):
3652 """

Callers 4

_goInferenceProxyFunction · 0.90
_goBooleanProxyFunction · 0.90
unionUseFunction · 0.90
errorUseFunction · 0.90

Calls 8

getTechniqueDataFunction · 0.85
resetCounterFunction · 0.85
setOptimizeFunction · 0.85
enumValueToNameLookupFunction · 0.85
itemsMethod · 0.80
debugMethod · 0.80
getPageTemplateFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…