danielbohannon / Invoke-Obfuscation

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

Accepts scriptpath, but won't encode #32

Closed teknowledgist closed 6 years ago

teknowledgist commented 6 years ago

Thank you for this project.

I have used it a few times successfully, but now when I attempt to do any obfuscating, I am getting:

ERROR: Cannot execute obfuscation commands without setting ScriptPath or ScriptBlock values in SHOW OPTIONS menu. Set these by executing SET SCRIPTBLOCK script_block_or_command or SET SCRIPTPATH path_to_script_or_URL.

despite:

Successfully set ScriptPath:
c:\users\user\desktop\code.ps1

and:

Invoke-Obfuscation\Encoding> show options

SHOW OPTIONS :: Yellow options can be set by entering SET OPTIONNAME VALUE.

[*] ScriptPath : c:\users\user\desktop\code.ps1
[*] ScriptBlock:
[*] CommandLineSyntax: Invoke-Obfuscation -ScriptPath 'c:\users\user\desktop\code.ps1'
[*] ExecutionCommands:
[*] ObfuscatedCommand:
[*] ObfuscationLength:

I download/unpack the latest zip and (re-)import the module. I'm on Win10.

Any ideas?

Thanks.

teknowledgist commented 6 years ago

Totally my mistake! (Egg on my face).

The file I was using in the scriptpath somehow was emptied of content. Thus the file was correct, but there was no code to obfuscate.

Sorry to raise the alarm.