mirror of
				https://github.com/sqlmapproject/sqlmap.git
				synced 2025-11-04 18:07:46 +03:00 
			
		
		
		
	fix for a bug reported by m4l1c3 (AttributeError: 'NoneType' object has no attribute 'replace')
This commit is contained in:
		
							parent
							
								
									02eeeccd33
								
							
						
					
					
						commit
						ae4ea0af45
					
				| 
						 | 
					@ -50,6 +50,7 @@ from lib.core.convert import htmlunescape
 | 
				
			||||||
from lib.core.convert import urldecode
 | 
					from lib.core.convert import urldecode
 | 
				
			||||||
from lib.core.convert import urlencode
 | 
					from lib.core.convert import urlencode
 | 
				
			||||||
from lib.core.enums import DBMS
 | 
					from lib.core.enums import DBMS
 | 
				
			||||||
 | 
					from lib.core.enums import HTTPHEADER
 | 
				
			||||||
from lib.core.enums import PLACE
 | 
					from lib.core.enums import PLACE
 | 
				
			||||||
from lib.core.enums import PAYLOAD
 | 
					from lib.core.enums import PAYLOAD
 | 
				
			||||||
from lib.core.enums import SORTORDER
 | 
					from lib.core.enums import SORTORDER
 | 
				
			||||||
| 
						 | 
					@ -1012,6 +1013,12 @@ def parseTargetUrl():
 | 
				
			||||||
    conf.url = "%s://%s:%d%s" % (conf.scheme, conf.hostname, conf.port, conf.path)
 | 
					    conf.url = "%s://%s:%d%s" % (conf.scheme, conf.hostname, conf.port, conf.path)
 | 
				
			||||||
    conf.url = conf.url.replace(URI_QUESTION_MARKER, '?')
 | 
					    conf.url = conf.url.replace(URI_QUESTION_MARKER, '?')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if not conf.referer and conf.level >= 3:
 | 
				
			||||||
 | 
					        debugMsg = "setting the HTTP Referer header to the target url"
 | 
				
			||||||
 | 
					        logger.debug(debugMsg)
 | 
				
			||||||
 | 
					        conf.httpHeaders = filter(lambda (key, value): key != HTTPHEADER.REFERER, conf.httpHeaders)
 | 
				
			||||||
 | 
					        conf.httpHeaders.append((HTTPHEADER.REFERER, conf.url))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def expandAsteriskForColumns(expression):
 | 
					def expandAsteriskForColumns(expression):
 | 
				
			||||||
    # If the user provided an asterisk rather than the column(s)
 | 
					    # If the user provided an asterisk rather than the column(s)
 | 
				
			||||||
    # name, sqlmap will retrieve the columns itself and reprocess
 | 
					    # name, sqlmap will retrieve the columns itself and reprocess
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1079,12 +1079,6 @@ def __setHTTPReferer():
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        conf.httpHeaders.append((HTTPHEADER.REFERER, conf.referer))
 | 
					        conf.httpHeaders.append((HTTPHEADER.REFERER, conf.referer))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    elif conf.level >= 3:
 | 
					 | 
				
			||||||
        debugMsg = "setting the default HTTP Referer header"
 | 
					 | 
				
			||||||
        logger.debug(debugMsg)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        conf.httpHeaders.append((HTTPHEADER.REFERER, conf.url))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
def __setHTTPCookies():
 | 
					def __setHTTPCookies():
 | 
				
			||||||
    """
 | 
					    """
 | 
				
			||||||
    Set the HTTP Cookie header
 | 
					    Set the HTTP Cookie header
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user