mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-16 19:40:37 +03:00
revert of one thing for Bernardo and minor update
This commit is contained in:
parent
77b51dae57
commit
0676b38063
|
@ -50,6 +50,7 @@ from lib.core.convert import urlencode
|
|||
from lib.core.enums import DBMS
|
||||
from lib.core.enums import PLACE
|
||||
from lib.core.enums import PAYLOAD
|
||||
from lib.core.exception import sqlmapDataException
|
||||
from lib.core.exception import sqlmapFilePathException
|
||||
from lib.core.exception import sqlmapGenericException
|
||||
from lib.core.exception import sqlmapNoneDataException
|
||||
|
@ -1933,16 +1934,21 @@ def initTechnique(technique=None):
|
|||
"""
|
||||
Prepares proper page template and match ratio for technique specified
|
||||
"""
|
||||
try:
|
||||
data = getTechniqueData(technique)
|
||||
|
||||
data = getTechniqueData(technique)
|
||||
|
||||
if data:
|
||||
kb.pageTemplate, kb.errorIsNone = getPageTemplate(data.templatePayload, kb.injection.place)
|
||||
kb.matchRatio = data.matchRatio
|
||||
else:
|
||||
warnMsg = "there is no injection data available for technique "
|
||||
warnMsg += "'%s'" % enumValueToNameLookup(PAYLOAD.TECHNIQUE, technique)
|
||||
logger.warn(warnMsg)
|
||||
if data:
|
||||
kb.pageTemplate, kb.errorIsNone = getPageTemplate(data.templatePayload, kb.injection.place)
|
||||
kb.matchRatio = data.matchRatio
|
||||
else:
|
||||
warnMsg = "there is no injection data available for technique "
|
||||
warnMsg += "'%s'" % enumValueToNameLookup(PAYLOAD.TECHNIQUE, technique)
|
||||
logger.warn(warnMsg)
|
||||
except sqlmapDataException, ex:
|
||||
errMsg = "missing data in old session file(s). "
|
||||
errMsg += "please use '--flush-session' to deal "
|
||||
errMsg += "with this error"
|
||||
raise sqlmapNoneDataException, errMsg
|
||||
|
||||
def arrayizeValue(value):
|
||||
"""
|
||||
|
|
|
@ -1149,6 +1149,10 @@ class Enumeration:
|
|||
|
||||
elif not kb.data.cachedColumns:
|
||||
kb.data.cachedColumns = self.getColumns(onlyColNames=True)
|
||||
|
||||
if conf.col:
|
||||
colList = conf.col.split(",")
|
||||
elif kb.data.cachedColumns and conf.db in kb.data.cachedColumns and conf.tbl in kb.data.cachedColumns[conf.db]:
|
||||
colList = kb.data.cachedColumns[conf.db][conf.tbl].keys()
|
||||
else:
|
||||
errMsg = "missing column names, "
|
||||
|
|
Loading…
Reference in New Issue
Block a user