Skip to content

Commit 5c4c4c6

Browse files
committed
minor cleanup, prefer powershell to the other two techniques to upload files - issue sqlmapproject#742
1 parent fcc5019 commit 5c4c4c6

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

plugins/dbms/mssqlserver/filesystem.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ def unionWriteFile(self, wFile, dFile, fileType, forceCheck=False):
166166

167167
def _stackedWriteFilePS(self, tmpPath, wFileContent, dFile, fileType):
168168
infoMsg = "using PowerShell to write the %s file content " % fileType
169-
#infoMsg += "to file '%s', please wait.." % dFile
170169
infoMsg += "to file '%s'" % dFile
171170
logger.info(infoMsg)
172171

@@ -332,21 +331,21 @@ def stackedWriteFile(self, wFile, dFile, fileType, forceCheck=False):
332331
with open(wFile, "rb") as f:
333332
wFileContent = f.read()
334333

335-
self._stackedWriteFileVbs(tmpPath, wFileContent, dFile, fileType)
334+
self._stackedWriteFilePS(tmpPath, wFileContent, dFile, fileType)
336335
written = self.askCheckWrittenFile(wFile, dFile, forceCheck)
337336

338337
if written is False:
339338
message = "do you want to try to upload the file with "
340-
message += "the PowerShell technique? [Y/n] "
339+
message += "the custom Visual Basic script technique? [Y/n] "
341340
choice = readInput(message, default="Y")
342341

343342
if not choice or choice.lower() == "y":
344-
self._stackedWriteFilePS(tmpPath, wFileContent, dFile, fileType)
343+
self._stackedWriteFileVbs(tmpPath, wFileContent, dFile, fileType)
345344
written = self.askCheckWrittenFile(wFile, dFile, forceCheck)
346345

347346
if written is False:
348347
message = "do you want to try to upload the file with "
349-
message += "the debug.exe technique? [Y/n] "
348+
message += "the built-in debug.exe technique? [Y/n] "
350349
choice = readInput(message, default="Y")
351350

352351
if not choice or choice.lower() == "y":

0 commit comments

Comments
 (0)