This commit is contained in:
Miroslav Stampar 2018-11-30 11:29:17 +01:00
parent 560ff4154b
commit e7ed2bbcbb
2 changed files with 10 additions and 0 deletions

View File

@ -41,6 +41,9 @@ def tamper(payload, **kwargs):
retVal = payload
if payload:
prefix, suffix = '+' * len(re.search(r"\A(\+*)", payload).group(0)), '+' * len(re.search(r"(\+*)\Z", payload).group(0))
retVal = retVal.strip('+')
while True:
indexes = zeroDepthSearch(retVal, '+')
@ -76,4 +79,6 @@ def tamper(payload, **kwargs):
else:
break
retVal = "%s%s%s" % (prefix, retVal, suffix)
return retVal

View File

@ -42,6 +42,9 @@ def tamper(payload, **kwargs):
retVal = payload
if payload:
prefix, suffix = '+' * len(re.search(r"\A(\+*)", payload).group(0)), '+' * len(re.search(r"(\+*)\Z", payload).group(0))
retVal = retVal.strip('+')
while True:
indexes = zeroDepthSearch(retVal, '+')
@ -89,4 +92,6 @@ def tamper(payload, **kwargs):
else:
break
retVal = "%s%s%s" % (prefix, retVal, suffix)
return retVal