Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eaacbe0 commit 02da417Copy full SHA for 02da417
1 file changed
tamper/randomcomments.py
@@ -26,7 +26,7 @@ def tamper(payload, **kwargs):
26
retVal = payload
27
28
if payload:
29
- for match in re.finditer(r"[A-Za-z_]+", payload):
+ for match in re.finditer(r"\b[A-Za-z_]+\b", payload):
30
word = match.group()
31
32
if len(word) < 2:
@@ -39,6 +39,11 @@ def tamper(payload, **kwargs):
39
_ += "%s%s" % ("/**/" if randomRange(0, 1) else "", word[i])
40
41
_ += word[-1]
42
+
43
+ if "/**/" not in _:
44
+ index = randomRange(1, len(word) - 1)
45
+ _ = word[:index] + "/**/" + word[index:]
46
47
retVal = retVal.replace(word, _)
48
49
return retVal
0 commit comments