Skip to content

Commit e7ed2bb

Browse files
committed
Fixes #3391)
1 parent 560ff41 commit e7ed2bb

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

tamper/plus2concat.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ def tamper(payload, **kwargs):
4141
retVal = payload
4242

4343
if payload:
44+
prefix, suffix = '+' * len(re.search(r"\A(\+*)", payload).group(0)), '+' * len(re.search(r"(\+*)\Z", payload).group(0))
45+
retVal = retVal.strip('+')
46+
4447
while True:
4548
indexes = zeroDepthSearch(retVal, '+')
4649

@@ -76,4 +79,6 @@ def tamper(payload, **kwargs):
7679
else:
7780
break
7881

82+
retVal = "%s%s%s" % (prefix, retVal, suffix)
83+
7984
return retVal

tamper/plus2fnconcat.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ def tamper(payload, **kwargs):
4242
retVal = payload
4343

4444
if payload:
45+
prefix, suffix = '+' * len(re.search(r"\A(\+*)", payload).group(0)), '+' * len(re.search(r"(\+*)\Z", payload).group(0))
46+
retVal = retVal.strip('+')
47+
4548
while True:
4649
indexes = zeroDepthSearch(retVal, '+')
4750

@@ -89,4 +92,6 @@ def tamper(payload, **kwargs):
8992
else:
9093
break
9194

95+
retVal = "%s%s%s" % (prefix, retVal, suffix)
96+
9297
return retVal

0 commit comments

Comments
 (0)