danielbohannon / Invoke-Obfuscation

PowerShell Obfuscator
Apache License 2.0
3.62k stars 763 forks source link

TOKEN obfuscation problem with filter names #9

Closed cobbr closed 7 years ago

cobbr commented 7 years ago

Problem

I might be going crazy here, but I'm still experiencing #4

Steps to Reproduce

PS> git clone https://github.com/danielbohannon/Invoke-Obfuscation.git
PS> wget https://github.com/EmpireProject/Empire/raw/master/data/module_source/situational_awareness/network/powerview.ps1 -OutFile powerview.ps1
PS> Import-Module .\Invoke-Obfuscation\Invoke-Obfuscation.psd1
PS> Invoke-Obfuscation -ScriptPath .\powerview.ps1 -Command "TOKEN,ALL,1" -Quiet | Out-File -Encoding ASCII out
Exception calling "Create" with "1" argument(s): "At line:445 char:7
+ filter ("{5}{0}{3}{2}{1}{4}" -f'w','iewCS','V','er','V','Export-Po')  ...
+       ~
Missing name after filter keyword.
At line:445 char:70
+ ... ilter ("{5}{0}{3}{2}{1}{4}" -f'w','iewCS','V','er','V','Export-Po') {
+                                                                         ~
Unexpected token '{' in expression or statement.
At line:476 char:7
+ filter ("{3}{1}{2}{0}" -f 'ress','t-I','PAdd','Ge') {
+       ~
Missing name after filter keyword.
At line:476 char:53
+ filter ("{3}{1}{2}{0}" -f 'ress','t-I','PAdd','Ge') {
+                                                     ~
danielbohannon commented 7 years ago

Thanks for the bug find, @cobbr. This should be resolved in 3d9758bca12a59d7fab40cf5182033452391542c.