mirror of
				https://github.com/sqlmapproject/sqlmap.git
				synced 2025-11-04 01:47:37 +03:00 
			
		
		
		
	Update for an Issue #1899
This commit is contained in:
		
							parent
							
								
									43af2a4aee
								
							
						
					
					
						commit
						831c960216
					
				| 
						 | 
				
			
			@ -19,7 +19,7 @@ from lib.core.enums import OS
 | 
			
		|||
from lib.core.revision import getRevisionNumber
 | 
			
		||||
 | 
			
		||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
 | 
			
		||||
VERSION = "1.0.5.70"
 | 
			
		||||
VERSION = "1.0.5.71"
 | 
			
		||||
REVISION = getRevisionNumber()
 | 
			
		||||
STABLE = VERSION.count('.') <= 2
 | 
			
		||||
VERSION_STRING = "sqlmap/%s#%s" % (VERSION, "stable" if STABLE else "dev")
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -863,9 +863,13 @@ class Connect(object):
 | 
			
		|||
        if conf.csrfToken:
 | 
			
		||||
            def _adjustParameter(paramString, parameter, newValue):
 | 
			
		||||
                retVal = paramString
 | 
			
		||||
                match = re.search("%s=(?P<value>[^&]*)" % re.escape(parameter), paramString)
 | 
			
		||||
                match = re.search("%s=[^&]*" % re.escape(parameter), paramString)
 | 
			
		||||
                if match:
 | 
			
		||||
                    retVal = re.sub("%s=[^&]*" % re.escape(parameter), "%s=%s" % (parameter, newValue), paramString)
 | 
			
		||||
                    retVal = re.sub(match.group(0), "%s=%s" % (parameter, newValue), paramString)
 | 
			
		||||
                else:
 | 
			
		||||
                    match = re.search("(%s[\"']:[\"'])([^\"']+)" % re.escape(parameter), paramString)
 | 
			
		||||
                    if match:
 | 
			
		||||
                        retVal = re.sub(match.group(0), "%s%s" % (match.group(1), newValue), paramString)
 | 
			
		||||
                return retVal
 | 
			
		||||
 | 
			
		||||
            page, headers, code = Connect.getPage(url=conf.csrfUrl or conf.url, data=conf.data if conf.csrfUrl == conf.url else None, method=conf.method if conf.csrfUrl == conf.url else None, cookie=conf.parameters.get(PLACE.COOKIE), direct=True, silent=True, ua=conf.parameters.get(PLACE.USER_AGENT), referer=conf.parameters.get(PLACE.REFERER), host=conf.parameters.get(PLACE.HOST))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user