Prepares data for technique specified
(technique=None)
| 3615 | raise SqlmapSystemException(errMsg) |
| 3616 | |
| 3617 | def 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 | |
| 3651 | def arrayizeValue(value): |
| 3652 | """ |
no test coverage detected
searching dependent graphs…