trying some more encoding as the file wasnt exactly the same - issue #742

This commit is contained in:
Bernardo Damele 2014-06-30 20:23:57 +01:00
parent 9c583bc96e
commit 3ec37b14a6

View File

@ -184,7 +184,8 @@ class Filesystem(GenericFilesystem):
$Content = [System.Convert]::FromBase64String("%s")
Set-Content -Path %s -Value $Content -Encoding Byte
""" % (encodedFileContent, randPSScriptPath)
psString = binToHexQuery.replace(" ", "").replace("\n", ";")
psString = psString.replace(" ", "").replace("\n", ";")
logger.debug("uploading the PowerShell script to %s, please wait.." % randPSScriptPath)
self.xpCmdshellWriteFile(psString, tmpPath, randPSScript)