naneau / php-obfuscator

A parsing PHP obfuscator
585 stars 180 forks source link

How to use it in Windows machine? #48

Open Nirvanatin opened 7 years ago

Nirvanatin commented 7 years ago

I have tried different ways to address the path in Windows CMD.

./bin/obfuscate obfuscate C:/xampp/htdocs/phptest/before C:/xampp/htdocs/phptest/after
bin/obfuscate obfuscate C:/xampp/htdocs/phptest/before C:/xampp/htdocs/phptest/after
./bin/obfuscate obfuscate C:\xampp\htdocs\phptest\before C:\xampp\htdocs\phptest\after
bin/obfuscate obfuscate C:\xampp\htdocs\phptest\before C:\xampp\htdocs\phptest\after
obfuscate C:/xampp/htdocs/phptest/before C:/xampp/htdocs/phptest/after
obfuscate C:\xampp\htdocs\phptest\before C:\xampp\htdocs\phptest\after
obfuscate /before /after

Whatever path I use it gives me the below error:

  [Symfony\Component\Console\Exception\CommandNotFoundException]
  There are no commands defined in the "C" namespace.
ivanramosnet commented 6 years ago

You must run obfuscate through PHP like this:

php ./bin/obfuscate obfuscate C:/xampp/htdocs/phptest/before C:/xampp/htdocs/phptest/after

Brain8torm commented 4 years ago

For Windows servers works:

cd bin
php ./obfuscate obfuscate D:\SRV\WPTMP\OSPanel\domains\domain.vv\input D:\SRV\WPTMP\OSPanel\domains\domain.vv\output
Mr-Lion commented 3 years ago

None of this works anyway ... I keep getting error messages

[Symfony\Component\Console\Exception\CommandNotFoundException] There are no commands defined in the "D" namespace.

I have already tested all the variations. This is just one variation PS D:\projects\phpencode\obfuscator\bin> php ./obfuscate D:\projects\phpencode\obfuscator\bin\input D:\projects\phpencode\obfuscator\bin\output

Could anyone help me, please?

andycrulez commented 3 years ago

you are missing obfuscate option in your command (after ./obfuscate) command should look like: php ./obfuscate obfuscate D:\projects\phpencode\obfuscator\bin\input D:\projects\phpencode\obfuscator\bin\output