mirror of
				https://github.com/sqlmapproject/sqlmap.git
				synced 2025-11-04 01:47:37 +03:00 
			
		
		
		
	
		
			
				
	
	
		
			32 lines
		
	
	
		
			753 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			753 B
		
	
	
	
		
			Python
		
	
	
	
	
	
#!/usr/bin/env python
 | 
						|
 | 
						|
"""
 | 
						|
Copyright (c) 2006-2022 sqlmap developers (https://sqlmap.org/)
 | 
						|
See the file 'LICENSE' for copying permission
 | 
						|
"""
 | 
						|
 | 
						|
import re
 | 
						|
 | 
						|
from lib.core.enums import PRIORITY
 | 
						|
 | 
						|
__priority__ = PRIORITY.HIGHEST
 | 
						|
 | 
						|
def dependencies():
 | 
						|
    pass
 | 
						|
 | 
						|
def tamper(payload, **kwargs):
 | 
						|
    """
 | 
						|
    Splits FROM schema identifiers (e.g. 'testdb.users') with whitespace (e.g. 'testdb 9.e.users')
 | 
						|
 | 
						|
    Requirement:
 | 
						|
        * MySQL
 | 
						|
 | 
						|
    Notes:
 | 
						|
        * Reference: https://media.blackhat.com/us-13/US-13-Salgado-SQLi-Optimization-and-Obfuscation-Techniques-Slides.pdf
 | 
						|
 | 
						|
    >>> tamper('SELECT id FROM testdb.users')
 | 
						|
    'SELECT id FROM testdb 9.e.users'
 | 
						|
    """
 | 
						|
 | 
						|
    return re.sub(r"(?i)( FROM \w+)\.(\w+)", r"\g<1> 9.e.\g<2>", payload) if payload else payload
 |