danielbohannon / Invoke-Obfuscation

PowerShell Obfuscator
Apache License 2.0
3.59k stars 759 forks source link

No ScriptPath input? #33

Closed G-e-V-e closed 6 years ago

G-e-V-e commented 6 years ago

Hello there,

I just downloaded and tested since yesterday. Looking into the "Invoke-Obfuscation.ps1" code at line 87, I notices it reads "[Parameter(Position = 0, ParameterSetName = 'ScriptBlock')]" while it should be "[Parameter(Position = 0, ParameterSetName = 'ScriptPath')]" I think. Anyway, after manually changing it, I could get it to obfuscate by filename.

Doing so, it would also be nice to hide Show-AsciiArt and the next Start-Sleep to speed up bulk obfucations with the "-Quiet" option. Had to do that manually too.

Kind regards, Geeeert

cobbr commented 6 years ago

I agree, it looks like a typo.

What's funny is that it seems like the ScriptPath parameter works anyway, despite the typo, because the script uses If(PSBoundParameters['ScriptPath']) as opposed to checking the ParameterSetName.

Either way, I'll change the ParameterSetName to ScriptPath. Nice catch!