Minor improvement of the randomcase tamper script

This commit is contained in:
Miroslav Stampar 2014-10-07 13:09:37 +02:00
parent 70215a95a1
commit 35ed668a85

View File

@ -44,11 +44,15 @@ def tamper(payload, **kwargs):
word = match.group()
if word.upper() in kb.keywords:
_ = str()
while True:
_ = ""
for i in xrange(len(word)):
_ += word[i].upper() if randomRange(0, 1) else word[i].lower()
if len(_) > 1 and _ not in (_.lower(), _.upper()):
break
retVal = retVal.replace(word, _)
return retVal