Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2323d85

Browse files
committed
modification of temporary directory from C:/Windows/Temp to %TEMP%
1 parent 2fdac83 commit 2323d85

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

plugins/dbms/mssqlserver/filesystem.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def stackedWriteFile(self, wFile, dFile, fileType, confirm=True):
160160

161161
logger.debug("moving binary file %s to %s" % (sFile, dFile))
162162

163-
commands = ("cd %s" % tmpPath,
163+
commands = ("cd \"%s\"" % tmpPath,
164164
"ren %s %s" % (chunkName, dFileName),
165165
"move /Y %s %s" % (dFileName, dFile))
166166
complComm = " & ".join(command for command in commands)

plugins/generic/filesystem.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def updateBinChunk(self, binaryData, tmpPath):
211211

212212
for scrLine in fileScrLines:
213213
forgedScrLine = "echo %s " % scrLine
214-
forgedScrLine += ">> %s\%s" % (tmpPath, randScr)
214+
forgedScrLine += ">> \"%s\%s\"" % (tmpPath, randScr)
215215
forgedScrLines.append(forgedScrLine)
216216

217217
for forgedScrLine in forgedScrLines:

plugins/generic/misc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def getRemoteTempPath(self):
6565
#logger.info(infoMsg)
6666
#
6767
#conf.tmpPath = self.evalCmd("echo %TEMP%")
68-
conf.tmpPath = "C:/WINDOWS/Temp"
68+
conf.tmpPath = "%TEMP%"
6969
else:
7070
conf.tmpPath = "/tmp"
7171

0 commit comments

Comments
 (0)