Minor renaming

This commit is contained in:
Miroslav Stampar
2019-06-07 00:21:43 +02:00
parent 02c8f47892
commit 28c5a709bd
12 changed files with 230 additions and 230 deletions

View File

@@ -3188,7 +3188,7 @@ def isTechniqueAvailable(technique):
>>> kb.injection.data = popValue()
"""
if conf.tech and isinstance(conf.tech, list) and technique not in conf.tech:
if conf.technique and isinstance(conf.technique, list) and technique not in conf.technique:
return False
else:
return getTechniqueData(technique) is not None

View File

@@ -20,7 +20,7 @@ _defaults = {
"level": 1,
"risk": 1,
"dumpFormat": "CSV",
"tech": "BEUSTQ",
"technique": "BEUSTQ",
"torType": "SOCKS5",
}

View File

@@ -662,10 +662,10 @@ def _setTechnique():
validTechniques = sorted(getPublicTypeMembers(PAYLOAD.TECHNIQUE), key=lambda x: x[1])
validLetters = [_[0][0].upper() for _ in validTechniques]
if conf.tech and isinstance(conf.tech, six.string_types):
if conf.technique and isinstance(conf.technique, six.string_types):
_ = []
for letter in conf.tech.upper():
for letter in conf.technique.upper():
if letter not in validLetters:
errMsg = "value for --technique must be a string composed "
errMsg += "by the letters %s. Refer to the " % ", ".join(validLetters)
@@ -677,7 +677,7 @@ def _setTechnique():
_.append(validInt)
break
conf.tech = _
conf.technique = _
def _setDBMS():
"""
@@ -2476,7 +2476,7 @@ def _basicOptionValidation():
errMsg = "option '-d' is incompatible with switch '--tor'"
raise SqlmapSyntaxException(errMsg)
if not conf.tech:
if not conf.technique:
errMsg = "option '--technique' can't be empty"
raise SqlmapSyntaxException(errMsg)

View File

@@ -105,7 +105,7 @@ optDict = {
},
"Techniques": {
"tech": "string",
"technique": "string",
"timeSec": "integer",
"uCols": "string",
"uChar": "string",

View File

@@ -18,7 +18,7 @@ from lib.core.enums import OS
from thirdparty.six import unichr as _unichr
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.3.6.29"
VERSION = "1.3.6.30"
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)
@@ -296,7 +296,7 @@ BASIC_HELP_ITEMS = (
"dbms",
"level",
"risk",
"tech",
"technique",
"getAll",
"getBanner",
"getCurrentUser",

View File

@@ -458,9 +458,9 @@ def _resumeHashDBValues():
for injection in hashDBRetrieve(HASHDB_KEYS.KB_INJECTIONS, True) or []:
if isinstance(injection, InjectionDict) and injection.place in conf.paramDict and injection.parameter in conf.paramDict[injection.place]:
if not conf.tech or intersect(conf.tech, injection.data.keys()):
if intersect(conf.tech, injection.data.keys()):
injection.data = dict(_ for _ in injection.data.items() if _[0] in conf.tech)
if not conf.technique or intersect(conf.technique, injection.data.keys()):
if intersect(conf.technique, injection.data.keys()):
injection.data = dict(_ for _ in injection.data.items() if _[0] in conf.technique)
if injection not in kb.injections:
kb.injections.append(injection)