Skip to content

Commit bae9db6

Browse files
committed
Minor update
1 parent 2642e45 commit bae9db6

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tamper/commalessmid.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55
See the file 'doc/COPYING' for copying permission
66
"""
77

8+
import os
89
import re
910

11+
from lib.core.common import singleTimeWarnMessage
1012
from lib.core.enums import PRIORITY
1113

1214
__priority__ = PRIORITY.HIGH
@@ -30,7 +32,11 @@ def tamper(payload, **kwargs):
3032

3133
retVal = payload
3234

33-
match = re.search(r"(?i)MID\(([^,]+?)\s*,\s*(\d+)\s*\,\s*(\d+)\s*\)", payload or "")
35+
warnMsg = "you should consider usage of switch '--no-cast' along with "
36+
warnMsg += "tamper script '%s'" % os.path.basename(__file__).split(".")[0]
37+
singleTimeWarnMessage(warnMsg)
38+
39+
match = re.search(r"(?i)MID\((.+?)\s*,\s*(\d+)\s*\,\s*(\d+)\s*\)", payload or "")
3440
if match:
3541
retVal = retVal.replace(match.group(0), "MID(%s FROM %s FOR %s)" % (match.group(1), match.group(2), match.group(3)))
3642

0 commit comments

Comments
 (0)