mirror of
				https://github.com/sqlmapproject/sqlmap.git
				synced 2025-11-04 09:57:38 +03:00 
			
		
		
		
	Minor bug fix, %TEMP% is expanded only in xp_cmdshell (MSSQL), so disabled for MySQL/PGSQL
This commit is contained in:
		
							parent
							
								
									091e0b2e05
								
							
						
					
					
						commit
						762781e94d
					
				| 
						 | 
				
			
			@ -49,23 +49,10 @@ class Miscellaneous:
 | 
			
		|||
    def getRemoteTempPath(self):
 | 
			
		||||
        if not conf.tmpPath:
 | 
			
		||||
            if kb.os == "Windows":
 | 
			
		||||
                # NOTES:
 | 
			
		||||
                #
 | 
			
		||||
                # * The system-wide temporary files directory is
 | 
			
		||||
                # C:\WINDOWS\Temp
 | 
			
		||||
                #
 | 
			
		||||
                # * MySQL runs by default as SYSTEM
 | 
			
		||||
                #
 | 
			
		||||
                # * PostgreSQL runs by default as postgres user and the
 | 
			
		||||
                #   temporary files directory is C:\Documents and Settings\postgres\Local Settings\Temp,
 | 
			
		||||
                #   however the system-wide folder is writable too
 | 
			
		||||
                #
 | 
			
		||||
                #infoMsg  = "retrieving remote absolute path of temporary files "
 | 
			
		||||
                #infoMsg += "directory"
 | 
			
		||||
                #logger.info(infoMsg)
 | 
			
		||||
                #
 | 
			
		||||
                #conf.tmpPath = self.evalCmd("echo %TEMP%")
 | 
			
		||||
                conf.tmpPath = "%TEMP%"
 | 
			
		||||
                if kb.dbms == "Microsoft SQL Server":
 | 
			
		||||
                    conf.tmpPath = "%TEMP%"
 | 
			
		||||
                else:
 | 
			
		||||
                    conf.tmpPath = "C:/WINDOWS/Temp"
 | 
			
		||||
            else:
 | 
			
		||||
                conf.tmpPath = "/tmp"
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user