mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 09:36:35 +03:00
working on #742 - minor fixes
This commit is contained in:
parent
563c73c4c7
commit
aa076013a7
|
@ -181,10 +181,14 @@ class Filesystem(GenericFilesystem):
|
|||
#psString = "[System.Text.Encoding]::ASCII.GetString([System.Convert]::FromBase64String(%s)) > %s" % (encodedFileContent, dFile)
|
||||
#psString = "[System.Text.Encoding]::ASCII.GetString([System.Convert]::FromBase64String(\"%s\")) | Out-File -Encoding \"ASCII\" %s" % (encodedFileContent, dFile)
|
||||
psString = "[System.Text.Encoding]::ASCII.GetString([System.Convert]::FromBase64String(\"%s\")) > %s" % (encodedFileContent, dFile)
|
||||
psString = psString.encode('utf-16le')
|
||||
psString = base64encode(psString)
|
||||
|
||||
logger.debug("converting the base64-encoded file utilizing PowerShell")
|
||||
print "psString:", psString
|
||||
|
||||
commands = ("cd \"%s\"" % tmpPath, "powershell -EncodedCommand %s" % base64encode(psString))
|
||||
logger.debug("executing the base64-encoded PowerShell command to write the file")
|
||||
|
||||
commands = ("cd \"%s\"" % tmpPath, "powershell -EncodedCommand %s" % psString)
|
||||
complComm = " & ".join(command for command in commands)
|
||||
|
||||
self.execCmd(complComm)
|
||||
|
|
Loading…
Reference in New Issue
Block a user