mirror of
				https://github.com/sqlmapproject/sqlmap.git
				synced 2025-11-04 09:57:38 +03:00 
			
		
		
		
	Proper implementation for #4184
This commit is contained in:
		
							parent
							
								
									4e7f0b10d5
								
							
						
					
					
						commit
						7a6433b9ef
					
				| 
						 | 
				
			
			@ -675,17 +675,21 @@ def paramToDict(place, parameters=None):
 | 
			
		|||
                                    elif isinstance(current, dict):
 | 
			
		||||
                                        for key in current.keys():
 | 
			
		||||
                                            value = current[key]
 | 
			
		||||
                                            if isinstance(value, (list, tuple, set, dict)):
 | 
			
		||||
                                                if value:
 | 
			
		||||
                                                    walk(head, value)
 | 
			
		||||
                                            elif isinstance(value, (bool, int, float, six.string_types)):
 | 
			
		||||
                                            if isinstance(value, (bool, int, float, six.string_types)) or value in (None, []):
 | 
			
		||||
                                                original = current[key]
 | 
			
		||||
                                                if isinstance(value, bool):
 | 
			
		||||
                                                    current[key] = "%s%s" % (getUnicode(value).lower(), BOUNDED_INJECTION_MARKER)
 | 
			
		||||
                                                elif value is None:
 | 
			
		||||
                                                    current[key] = "%s%s" % (randomInt(), BOUNDED_INJECTION_MARKER)
 | 
			
		||||
                                                elif value == []:
 | 
			
		||||
                                                    current[key] = ["%s%s" % (randomInt(), BOUNDED_INJECTION_MARKER)]
 | 
			
		||||
                                                else:
 | 
			
		||||
                                                    current[key] = "%s%s" % (value, BOUNDED_INJECTION_MARKER)
 | 
			
		||||
                                                candidates["%s (%s)" % (parameter, key)] = re.sub(r"\b(%s\s*=\s*)%s" % (re.escape(parameter), re.escape(testableParameters[parameter])), r"\g<1>%s" % json.dumps(deserialized, separators=(',', ':') if ", " not in testableParameters[parameter] else None), parameters)
 | 
			
		||||
                                                current[key] = original
 | 
			
		||||
                                            elif isinstance(value, (list, tuple, set, dict)):
 | 
			
		||||
                                                if value:
 | 
			
		||||
                                                    walk(head, value)
 | 
			
		||||
 | 
			
		||||
                                deserialized = json.loads(testableParameters[parameter])
 | 
			
		||||
                                walk(deserialized)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,7 +18,7 @@ from lib.core.enums import OS
 | 
			
		|||
from thirdparty.six import unichr as _unichr
 | 
			
		||||
 | 
			
		||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
 | 
			
		||||
VERSION = "1.4.5.2"
 | 
			
		||||
VERSION = "1.4.5.3"
 | 
			
		||||
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
 | 
			
		||||
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
 | 
			
		||||
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user