danielbohannon / Invoke-Obfuscation

PowerShell Obfuscator
Apache License 2.0
3.7k stars 765 forks source link

Fix null bytes in output file #47

Closed 4d4c closed 5 years ago

4d4c commented 5 years ago

Output file contains NULL bytes (more info). Replaced function for saving the output file.

Example command:

Invoke-Obfuscation -ScriptPath 'C:\script.ps1' -Command 'String\3,String\1,String\2,Encoding\3,Launcher\ps\0,out C:\obf_script.ps1' -Quiet

Hex view of the output file: image

danielbohannon commented 5 years ago

Thanks for the fix! Great catch.