Path: blob/master/tamper/commentbeforeparentheses.py
2983 views
#!/usr/bin/env python12"""3Copyright (c) 2006-2025 sqlmap developers (https://sqlmap.org)4See the file 'LICENSE' for copying permission5"""67import re89from lib.core.enums import PRIORITY1011__priority__ = PRIORITY.NORMAL1213def dependencies():14pass1516def tamper(payload, **kwargs):17"""18Prepends (inline) comment before parentheses (e.g. ( -> /**/()1920Tested against:21* Microsoft SQL Server22* MySQL23* Oracle24* PostgreSQL2526Notes:27* Useful to bypass web application firewalls that block usage28of function calls2930>>> tamper('SELECT ABS(1)')31'SELECT ABS/**/(1)'32"""3334retVal = payload3536if payload:37retVal = re.sub(r"\b(\w+)\(", r"\g<1>/**/(", retVal)3839return retVal404142