removed integers from --technique

This commit is contained in:
Miroslav Stampar 2011-04-07 10:37:48 +00:00
parent fced81b6be
commit 68828d68a5

View File

@ -612,23 +612,17 @@ def __setTechnique():
if conf.tech and isinstance(conf.tech, basestring): if conf.tech and isinstance(conf.tech, basestring):
selTechniques = [] selTechniques = []
# e.g.: BEUST for letter in conf.tech.upper():
if not conf.tech.isdigit(): if letter not in validLetters:
for letter in conf.tech.upper(): errMsg = "value for --technique must be a string composed "
if letter not in validLetters: errMsg += "by the letters %s. Refer to the " % ",".join(validLetters)
errMsg = "value for --technique must be a string composed " errMsg += "user's manual for details"
errMsg += "by the letters %s. Refer to the " % ",".join(validLetters) raise sqlmapSyntaxException, errMsg
errMsg += "user's manual for details"
raise sqlmapSyntaxException, errMsg
for validTech, validInt in validTechniques: for validTech, validInt in validTechniques:
if letter == validTech[0]: if letter == validTech[0]:
selTechniques.append(validInt) selTechniques.append(validInt)
break break
# e.g.: 12345
else:
selTechniques = filter(lambda x: x in PAYLOAD.SQLINJECTION, [int(c) for c in str(conf.tech)])
conf.tech = selTechniques conf.tech = selTechniques