@@ -67,11 +67,11 @@ def _updateDestChunk(self, fileContent, tmpPath):
6767 chunkName = randomStr (lowercase = True )
6868 fileScrLines = self ._dataToScr (fileContent , chunkName )
6969
70- logger .debug ("uploading debug script to %s\%s, please wait.." % (tmpPath , randScr ))
70+ logger .debug ("uploading debug script to %s\\ %s, please wait.." % (tmpPath , randScr ))
7171
7272 self .xpCmdshellWriteFile (fileScrLines , tmpPath , randScr )
7373
74- logger .debug ("generating chunk file %s\%s from debug script %s" % (tmpPath , chunkName , randScr ))
74+ logger .debug ("generating chunk file %s\\ %s from debug script %s" % (tmpPath , chunkName , randScr ))
7575
7676 commands = (
7777 "cd \" %s\" " % tmpPath ,
@@ -174,10 +174,10 @@ def _stackedWriteFilePS(self, tmpPath, wFileContent, dFile, fileType):
174174
175175 encodedFileContent = base64encode (wFileContent )
176176 encodedBase64File = "tmpf%s.txt" % randomStr (lowercase = True )
177- encodedBase64FilePath = "%s\%s" % (tmpPath , encodedBase64File )
177+ encodedBase64FilePath = "%s\\ %s" % (tmpPath , encodedBase64File )
178178
179179 randPSScript = "tmpps%s.ps1" % randomStr (lowercase = True )
180- randPSScriptPath = "%s\%s" % (tmpPath , randPSScript )
180+ randPSScriptPath = "%s\\ %s" % (tmpPath , randPSScript )
181181
182182 wFileSize = len (encodedFileContent )
183183 chunkMaxSize = 1024
@@ -212,15 +212,15 @@ def _stackedWriteFileDebugExe(self, tmpPath, wFile, wFileContent, dFile, fileTyp
212212 logger .info (infoMsg )
213213
214214 dFileName = ntpath .basename (dFile )
215- sFile = "%s\%s" % (tmpPath , dFileName )
215+ sFile = "%s\\ %s" % (tmpPath , dFileName )
216216 wFileSize = os .path .getsize (wFile )
217217 debugSize = 0xFF00
218218
219219 if wFileSize < debugSize :
220220 chunkName = self ._updateDestChunk (wFileContent , tmpPath )
221221
222- debugMsg = "renaming chunk file %s\%s to %s " % (tmpPath , chunkName , fileType )
223- debugMsg += "file %s\%s and moving it to %s" % (tmpPath , dFileName , dFile )
222+ debugMsg = "renaming chunk file %s\\ %s to %s " % (tmpPath , chunkName , fileType )
223+ debugMsg += "file %s\\ %s and moving it to %s" % (tmpPath , dFileName , dFile )
224224 logger .debug (debugMsg )
225225
226226 commands = (
@@ -248,7 +248,7 @@ def _stackedWriteFileDebugExe(self, tmpPath, wFile, wFileContent, dFile, fileTyp
248248 debugMsg = "appending chunk "
249249 copyCmd = "copy /B /Y %s+%s %s" % (dFileName , chunkName , dFileName )
250250
251- debugMsg += "%s\%s to %s file %s\%s" % (tmpPath , chunkName , fileType , tmpPath , dFileName )
251+ debugMsg += "%s\\ %s to %s file %s\ \ %s" % (tmpPath , chunkName , fileType , tmpPath , dFileName )
252252 logger .debug (debugMsg )
253253
254254 commands = (
@@ -275,7 +275,7 @@ def _stackedWriteFileVbs(self, tmpPath, wFileContent, dFile, fileType):
275275
276276 randVbs = "tmps%s.vbs" % randomStr (lowercase = True )
277277 randFile = "tmpf%s.txt" % randomStr (lowercase = True )
278- randFilePath = "%s\%s" % (tmpPath , randFile )
278+ randFilePath = "%s\\ %s" % (tmpPath , randFile )
279279
280280 vbs = """Dim inputFilePath, outputFilePath
281281 inputFilePath = "%s"
@@ -338,7 +338,7 @@ def _stackedWriteFileVbs(self, tmpPath, wFileContent, dFile, fileType):
338338
339339 self .xpCmdshellWriteFile (encodedFileContent , tmpPath , randFile )
340340
341- logger .debug ("uploading a visual basic decoder stub %s\%s, please wait.." % (tmpPath , randVbs ))
341+ logger .debug ("uploading a visual basic decoder stub %s\\ %s, please wait.." % (tmpPath , randVbs ))
342342
343343 self .xpCmdshellWriteFile (vbs , tmpPath , randVbs )
344344
@@ -359,7 +359,7 @@ def _stackedWriteFileCertutilExe(self, tmpPath, wFile, wFileContent, dFile, file
359359 chunkMaxSize = 500
360360
361361 randFile = "tmpf%s.txt" % randomStr (lowercase = True )
362- randFilePath = "%s\%s" % (tmpPath , randFile )
362+ randFilePath = "%s\\ %s" % (tmpPath , randFile )
363363
364364 encodedFileContent = base64encode (wFileContent )
365365
0 commit comments