Minor bug fix to --tamper

This commit is contained in:
Bernardo Damele 2010-10-16 21:55:34 +00:00
parent 2129935e06
commit a2997a6dce
3 changed files with 4 additions and 5 deletions

View File

@ -539,6 +539,8 @@ def __setTamperingFunctions():
for tfile in conf.tamper.split(','):
found = False
tfile = tfile.strip()
if not tfile:
continue
@ -943,9 +945,6 @@ def __cleanupOptions():
else:
conf.testParameter = []
if conf.tamper:
conf.tamper = conf.tamper.replace(" ", "")
if conf.db:
conf.db = conf.db.replace(" ", "")

View File

@ -33,7 +33,7 @@ def tamper(place, value):
newWord = str()
for i in xrange(len(word)):
newWord += word[i].upper() if randomRange(0,1) else word[i].lower()
newWord += word[i].upper() if randomRange(0, 1) else word[i].lower()
retVal = retVal.replace(word, newWord)

View File

@ -36,7 +36,7 @@ def tamper(place, value):
newWord = word[0]
for i in xrange(1, len(word) - 1):
newWord += "%s%s" % ("/**/" if randomRange(0,1) else "", word[i])
newWord += "%s%s" % ("/**/" if randomRange(0, 1) else "", word[i])
newWord += word[-1]
retVal = retVal.replace(word, newWord)