mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-07 21:21:33 +00:00
Some more preparing for 2to3 (keys() is iter in 3)
This commit is contained in:
@@ -688,7 +688,7 @@ def paramToDict(place, parameters=None):
|
||||
debugMsg += "is not inside the %s" % place
|
||||
logger.debug(debugMsg)
|
||||
|
||||
elif len(conf.testParameter) != len(testableParameters.keys()):
|
||||
elif len(conf.testParameter) != len(testableParameters):
|
||||
for parameter in conf.testParameter:
|
||||
if parameter not in testableParameters:
|
||||
debugMsg = "provided parameter '%s' " % parameter
|
||||
@@ -1560,7 +1560,7 @@ def expandAsteriskForColumns(expression):
|
||||
columnsDict = conf.dbmsHandler.getColumns(onlyColNames=True)
|
||||
|
||||
if columnsDict and conf.db in columnsDict and conf.tbl in columnsDict[conf.db]:
|
||||
columns = columnsDict[conf.db][conf.tbl].keys()
|
||||
columns = list(columnsDict[conf.db][conf.tbl].keys())
|
||||
columns.sort()
|
||||
columnsStr = ", ".join(column for column in columns)
|
||||
expression = expression.replace('*', columnsStr, 1)
|
||||
@@ -2064,7 +2064,7 @@ def getSQLSnippet(dbms, sfile, **variables):
|
||||
retVal = re.sub(r"#.+", "", retVal)
|
||||
retVal = re.sub(r";\s+", "; ", retVal).strip("\r\n")
|
||||
|
||||
for _ in variables.keys():
|
||||
for _ in variables:
|
||||
retVal = re.sub(r"%%%s%%" % _, variables[_].replace('\\', r'\\'), retVal)
|
||||
|
||||
for _ in re.findall(r"%RANDSTR\d+%", retVal, re.I):
|
||||
@@ -2223,7 +2223,7 @@ def getFileItems(filename, commentPrefix='#', unicoded=True, lowercase=False, un
|
||||
errMsg += "to read the content of file '%s' ('%s')" % (filename, getSafeExString(ex))
|
||||
raise SqlmapSystemException(errMsg)
|
||||
|
||||
return retVal if not unique else retVal.keys()
|
||||
return retVal if not unique else list(retVal.keys())
|
||||
|
||||
def goGoodSamaritan(prevValue, originalCharset):
|
||||
"""
|
||||
@@ -3056,7 +3056,7 @@ def saveConfig(conf, filename):
|
||||
config = UnicodeRawConfigParser()
|
||||
userOpts = {}
|
||||
|
||||
for family in optDict.keys():
|
||||
for family in optDict:
|
||||
userOpts[family] = []
|
||||
|
||||
for option, value in conf.items():
|
||||
@@ -3795,7 +3795,7 @@ def expandMnemonics(mnemonics, parser, args):
|
||||
logger.debug(debugMsg)
|
||||
else:
|
||||
found = sorted(options.keys(), key=lambda x: len(x))[0]
|
||||
warnMsg = "detected ambiguity (mnemonic '%s' can be resolved to any of: %s). " % (name, ", ".join("'%s'" % key for key in options.keys()))
|
||||
warnMsg = "detected ambiguity (mnemonic '%s' can be resolved to any of: %s). " % (name, ", ".join("'%s'" % key for key in options))
|
||||
warnMsg += "Resolved to shortest of those ('%s')" % found
|
||||
logger.warn(warnMsg)
|
||||
|
||||
|
||||
@@ -1640,7 +1640,7 @@ def _cleanupOptions():
|
||||
map(lambda _: conf.__setitem__(_, True), WIZARD.ALL)
|
||||
|
||||
if conf.noCast:
|
||||
for _ in DUMP_REPLACEMENTS.keys():
|
||||
for _ in list(DUMP_REPLACEMENTS.keys()):
|
||||
del DUMP_REPLACEMENTS[_]
|
||||
|
||||
if conf.dumpFormat:
|
||||
|
||||
@@ -19,7 +19,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME
|
||||
from lib.core.enums import OS
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
VERSION = "1.3.1.65"
|
||||
VERSION = "1.3.1.66"
|
||||
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
||||
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
||||
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
||||
|
||||
Reference in New Issue
Block a user