mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 09:36:35 +03:00
Adding new tamper script
This commit is contained in:
parent
0a4512e9ae
commit
3ff01f5777
36
tamper/concat2concatws.py
Normal file
36
tamper/concat2concatws.py
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
"""
|
||||||
|
Copyright (c) 2006-2013 sqlmap developers (http://sqlmap.org/)
|
||||||
|
See the file 'doc/COPYING' for copying permission
|
||||||
|
"""
|
||||||
|
|
||||||
|
from lib.core.enums import PRIORITY
|
||||||
|
|
||||||
|
__priority__ = PRIORITY.HIGHEST
|
||||||
|
|
||||||
|
def dependencies():
|
||||||
|
pass
|
||||||
|
|
||||||
|
def tamper(payload, **kwargs):
|
||||||
|
"""
|
||||||
|
Replaces instances like 'CONCAT(A, B)' with 'CONCAT_WS(MID(CHAR(0), 0, 0), A, B)'
|
||||||
|
|
||||||
|
Requirement:
|
||||||
|
* MySQL
|
||||||
|
|
||||||
|
Tested against:
|
||||||
|
* MySQL 5.0
|
||||||
|
|
||||||
|
Notes:
|
||||||
|
* Useful to bypass very weak and bespoke web application firewalls
|
||||||
|
that filter the CONCAT() function
|
||||||
|
|
||||||
|
>>> tamper('CONCAT(1,2)')
|
||||||
|
'CONCAT_WS(MID(CHAR(0),0,0),1,2)'
|
||||||
|
"""
|
||||||
|
|
||||||
|
if payload:
|
||||||
|
payload = payload.replace("CONCAT(", "CONCAT_WS(MID(CHAR(0),0,0),")
|
||||||
|
|
||||||
|
return payload
|
Loading…
Reference in New Issue
Block a user