mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-07-27 16:39:54 +03:00
Update quote2dollars.py
This commit is contained in:
parent
13af806e1d
commit
fccf2274eb
|
@ -14,12 +14,15 @@ def dependencies():
|
||||||
|
|
||||||
def tamper(payload, **kwargs):
|
def tamper(payload, **kwargs):
|
||||||
"""
|
"""
|
||||||
Tested on PostgreSQL 12.0
|
Replaces single quote with dollar signs (e.g. ' -> $$)
|
||||||
|
|
||||||
Replace single and double quotes with dollar signs (e.g. ' -> $$)
|
Tested against:
|
||||||
|
* PostgreSQL 12.0
|
||||||
|
|
||||||
|
Notes: useful for applications that use PostgreSQL database and encodes or sanitizes quote characters
|
||||||
|
|
||||||
>>> tamper("1' or '1'='1")
|
>>> tamper("1' or '1'='1")
|
||||||
"1$$ or $$1$$=$$1"
|
"1$$ or $$1$$=$$1"
|
||||||
"""
|
"""
|
||||||
|
|
||||||
return payload.replace("'", "$$'").replace('"', '$$')
|
return payload.replace("'", "$$")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user