mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-28 20:43:49 +03:00
trying some more encoding as the file wasnt exactly the same - issue #742
This commit is contained in:
parent
5c4c4c6abe
commit
9c583bc96e
|
@ -175,6 +175,16 @@ class Filesystem(GenericFilesystem):
|
|||
encodedFileContent = base64encode(wFileContent)
|
||||
#psString = "[System.Text.Encoding]::Default.GetString([System.Convert]::FromBase64String(\"%s\")) | Out-File \"%s\"" % (encodedFileContent, dFile)
|
||||
psString = "[System.Text.Encoding]::Default.GetString([System.Convert]::FromBase64String(\"%s\")) ^> \"%s\"" % (encodedFileContent, dFile)
|
||||
#psString = "[System.Text.Encoding]::UTF8.GetBytes([System.Convert]::FromBase64String(\"%s\")) | Out-File \"%s\"" % (encodedFileContent, dFile)
|
||||
#psString = "[System.Text.Encoding]::UTF8.GetBytes([System.Convert]::FromBase64String(\"%s\")) ^> \"%s\"" % (encodedFileContent, dFile)
|
||||
#psString = """$Content = Get-Content -Path %s -Encoding Byte
|
||||
#$Base64 = [System.Convert]::ToBase64String($Content)
|
||||
psString = """
|
||||
$Base64 = [System.Convert]::ToBase64String($Content)
|
||||
$Content = [System.Convert]::FromBase64String("%s")
|
||||
Set-Content -Path %s -Value $Content -Encoding Byte
|
||||
""" % (encodedFileContent, randPSScriptPath)
|
||||
psString = binToHexQuery.replace(" ", "").replace("\n", ";")
|
||||
|
||||
logger.debug("uploading the PowerShell script to %s, please wait.." % randPSScriptPath)
|
||||
self.xpCmdshellWriteFile(psString, tmpPath, randPSScript)
|
||||
|
|
Loading…
Reference in New Issue
Block a user