mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 09:36:35 +03:00
minor cleanup, prefer powershell to the other two techniques to upload files - issue #742
This commit is contained in:
parent
fcc50193b3
commit
5c4c4c6abe
|
@ -166,7 +166,6 @@ class Filesystem(GenericFilesystem):
|
|||
|
||||
def _stackedWriteFilePS(self, tmpPath, wFileContent, dFile, fileType):
|
||||
infoMsg = "using PowerShell to write the %s file content " % fileType
|
||||
#infoMsg += "to file '%s', please wait.." % dFile
|
||||
infoMsg += "to file '%s'" % dFile
|
||||
logger.info(infoMsg)
|
||||
|
||||
|
@ -332,21 +331,21 @@ class Filesystem(GenericFilesystem):
|
|||
with open(wFile, "rb") as f:
|
||||
wFileContent = f.read()
|
||||
|
||||
self._stackedWriteFileVbs(tmpPath, wFileContent, dFile, fileType)
|
||||
written = self.askCheckWrittenFile(wFile, dFile, forceCheck)
|
||||
|
||||
if written is False:
|
||||
message = "do you want to try to upload the file with "
|
||||
message += "the PowerShell technique? [Y/n] "
|
||||
choice = readInput(message, default="Y")
|
||||
|
||||
if not choice or choice.lower() == "y":
|
||||
self._stackedWriteFilePS(tmpPath, wFileContent, dFile, fileType)
|
||||
written = self.askCheckWrittenFile(wFile, dFile, forceCheck)
|
||||
|
||||
if written is False:
|
||||
message = "do you want to try to upload the file with "
|
||||
message += "the debug.exe technique? [Y/n] "
|
||||
message += "the custom Visual Basic script technique? [Y/n] "
|
||||
choice = readInput(message, default="Y")
|
||||
|
||||
if not choice or choice.lower() == "y":
|
||||
self._stackedWriteFileVbs(tmpPath, wFileContent, dFile, fileType)
|
||||
written = self.askCheckWrittenFile(wFile, dFile, forceCheck)
|
||||
|
||||
if written is False:
|
||||
message = "do you want to try to upload the file with "
|
||||
message += "the built-in debug.exe technique? [Y/n] "
|
||||
choice = readInput(message, default="Y")
|
||||
|
||||
if not choice or choice.lower() == "y":
|
||||
|
|
Loading…
Reference in New Issue
Block a user