Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 28c5a70

Browse files
committed
Minor renaming
1 parent 02c8f47 commit 28c5a70

12 files changed

Lines changed: 230 additions & 230 deletions

File tree

data/xml/livetests.xml

Lines changed: 208 additions & 208 deletions
Large diffs are not rendered by default.

lib/controller/checks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,10 +220,10 @@ def checkSqlInjection(place, parameter, value):
220220

221221
# Skip test if the user's wants to test only for a specific
222222
# technique
223-
if conf.tech and isinstance(conf.tech, list) and stype not in conf.tech:
223+
if conf.technique and isinstance(conf.technique, list) and stype not in conf.technique:
224224
debugMsg = "skipping test '%s' because the user " % title
225225
debugMsg += "specified to test only for "
226-
debugMsg += "%s techniques" % " & ".join(PAYLOAD.SQLINJECTION[_] for _ in conf.tech)
226+
debugMsg += "%s techniques" % " & ".join(PAYLOAD.SQLINJECTION[_] for _ in conf.technique)
227227
logger.debug(debugMsg)
228228
continue
229229

lib/controller/controller.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ def start():
429429

430430
if (len(kb.injections) == 0 or (len(kb.injections) == 1 and kb.injections[0].place is None)) and (kb.injection.place is None or kb.injection.parameter is None):
431431

432-
if not any((conf.string, conf.notString, conf.regexp)) and PAYLOAD.TECHNIQUE.BOOLEAN in conf.tech:
432+
if not any((conf.string, conf.notString, conf.regexp)) and PAYLOAD.TECHNIQUE.BOOLEAN in conf.technique:
433433
# NOTE: this is not needed anymore, leaving only to display
434434
# a warning message to the user in case the page is not stable
435435
checkStability()
@@ -533,7 +533,7 @@ def start():
533533
infoMsg = "ignoring %sparameter '%s'" % ("%s " % paramType if paramType != parameter else "", parameter)
534534
logger.info(infoMsg)
535535

536-
elif PAYLOAD.TECHNIQUE.BOOLEAN in conf.tech or conf.skipStatic:
536+
elif PAYLOAD.TECHNIQUE.BOOLEAN in conf.technique or conf.skipStatic:
537537
check = checkDynParam(place, parameter, value)
538538

539539
if not check:
@@ -612,7 +612,7 @@ def start():
612612
errMsg += " Try to increase values for '--level'/'--risk' options "
613613
errMsg += "if you wish to perform more tests."
614614

615-
if isinstance(conf.tech, list) and len(conf.tech) < 5:
615+
if isinstance(conf.technique, list) and len(conf.technique) < 5:
616616
errMsg += " Rerun without providing the option '--technique'."
617617

618618
if not conf.textOnly and kb.originalPage:

lib/core/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3188,7 +3188,7 @@ def isTechniqueAvailable(technique):
31883188
>>> kb.injection.data = popValue()
31893189
"""
31903190

3191-
if conf.tech and isinstance(conf.tech, list) and technique not in conf.tech:
3191+
if conf.technique and isinstance(conf.technique, list) and technique not in conf.technique:
31923192
return False
31933193
else:
31943194
return getTechniqueData(technique) is not None

lib/core/defaults.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"level": 1,
2121
"risk": 1,
2222
"dumpFormat": "CSV",
23-
"tech": "BEUSTQ",
23+
"technique": "BEUSTQ",
2424
"torType": "SOCKS5",
2525
}
2626

lib/core/option.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -662,10 +662,10 @@ def _setTechnique():
662662
validTechniques = sorted(getPublicTypeMembers(PAYLOAD.TECHNIQUE), key=lambda x: x[1])
663663
validLetters = [_[0][0].upper() for _ in validTechniques]
664664

665-
if conf.tech and isinstance(conf.tech, six.string_types):
665+
if conf.technique and isinstance(conf.technique, six.string_types):
666666
_ = []
667667

668-
for letter in conf.tech.upper():
668+
for letter in conf.technique.upper():
669669
if letter not in validLetters:
670670
errMsg = "value for --technique must be a string composed "
671671
errMsg += "by the letters %s. Refer to the " % ", ".join(validLetters)
@@ -677,7 +677,7 @@ def _setTechnique():
677677
_.append(validInt)
678678
break
679679

680-
conf.tech = _
680+
conf.technique = _
681681

682682
def _setDBMS():
683683
"""
@@ -2476,7 +2476,7 @@ def _basicOptionValidation():
24762476
errMsg = "option '-d' is incompatible with switch '--tor'"
24772477
raise SqlmapSyntaxException(errMsg)
24782478

2479-
if not conf.tech:
2479+
if not conf.technique:
24802480
errMsg = "option '--technique' can't be empty"
24812481
raise SqlmapSyntaxException(errMsg)
24822482

lib/core/optiondict.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
},
106106

107107
"Techniques": {
108-
"tech": "string",
108+
"technique": "string",
109109
"timeSec": "integer",
110110
"uCols": "string",
111111
"uChar": "string",

lib/core/settings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from thirdparty.six import unichr as _unichr
1919

2020
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
21-
VERSION = "1.3.6.29"
21+
VERSION = "1.3.6.30"
2222
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2323
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2424
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 @@
296296
"dbms",
297297
"level",
298298
"risk",
299-
"tech",
299+
"technique",
300300
"getAll",
301301
"getBanner",
302302
"getCurrentUser",

lib/core/target.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -458,9 +458,9 @@ def _resumeHashDBValues():
458458

459459
for injection in hashDBRetrieve(HASHDB_KEYS.KB_INJECTIONS, True) or []:
460460
if isinstance(injection, InjectionDict) and injection.place in conf.paramDict and injection.parameter in conf.paramDict[injection.place]:
461-
if not conf.tech or intersect(conf.tech, injection.data.keys()):
462-
if intersect(conf.tech, injection.data.keys()):
463-
injection.data = dict(_ for _ in injection.data.items() if _[0] in conf.tech)
461+
if not conf.technique or intersect(conf.technique, injection.data.keys()):
462+
if intersect(conf.technique, injection.data.keys()):
463+
injection.data = dict(_ for _ in injection.data.items() if _[0] in conf.technique)
464464
if injection not in kb.injections:
465465
kb.injections.append(injection)
466466

lib/parse/cmdline.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,8 +328,8 @@ def cmdLineParser(argv=None):
328328
# Techniques options
329329
techniques = OptionGroup(parser, "Techniques", "These options can be used to tweak testing of specific SQL injection techniques")
330330

331-
techniques.add_option("--technique", dest="tech",
332-
help="SQL injection techniques to use (default \"%s\")" % defaults.tech)
331+
techniques.add_option("--technique", dest="technique",
332+
help="SQL injection techniques to use (default \"%s\")" % defaults.technique)
333333

334334
techniques.add_option("--time-sec", dest="timeSec", type="int",
335335
help="Seconds to delay the DBMS response (default %d)" % defaults.timeSec)

0 commit comments

Comments
 (0)