mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-16 19:40:37 +03:00
Use %TEMP% environment variable as temporary directory (--tmp-path overwrites this btw) folder with direct connection (-d). Via SQL injection, env variables do not work apparently
This commit is contained in:
parent
08bf8c201f
commit
f55ad46119
|
@ -39,14 +39,17 @@ class Miscellaneous:
|
||||||
def getRemoteTempPath(self):
|
def getRemoteTempPath(self):
|
||||||
if not conf.tmpPath:
|
if not conf.tmpPath:
|
||||||
if Backend.isOs(OS.WINDOWS):
|
if Backend.isOs(OS.WINDOWS):
|
||||||
self.checkDbmsOs(detailed=True)
|
if conf.direct:
|
||||||
|
conf.tmpPath = "%TEMP%"
|
||||||
if Backend.getOsVersion() in ("2000", "NT"):
|
|
||||||
conf.tmpPath = "C:/WINNT/Temp"
|
|
||||||
elif Backend.getOsVersion() in ("2003", "XP"):
|
|
||||||
conf.tmpPath = "C:/Documents and Settings/All Users/Application Data/TEMP"
|
|
||||||
else:
|
else:
|
||||||
conf.tmpPath = "C:/Users/All Users/Application Data/TEMP"
|
self.checkDbmsOs(detailed=True)
|
||||||
|
|
||||||
|
if Backend.getOsVersion() in ("2000", "NT"):
|
||||||
|
conf.tmpPath = "C:/WINNT/Temp"
|
||||||
|
elif Backend.getOsVersion() in ("2003", "XP"):
|
||||||
|
conf.tmpPath = "C:/Documents and Settings/All Users/Application Data/TEMP"
|
||||||
|
else:
|
||||||
|
conf.tmpPath = "C:/Users/All Users/Application Data/TEMP"
|
||||||
else:
|
else:
|
||||||
conf.tmpPath = "/tmp"
|
conf.tmpPath = "/tmp"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user