I have a plugin, which was obfuscated by plugin developer with sourcecop. At some point it began sending out lots of php warnings to debug.log. I couldn’t debug it myself since it was obfuscated, but plugin support was also silent. Online Deobfuscateors I tried didn’t help. How to Deobfuscate it?
Leave a Reply
You must be logged in to post a comment.
I came up with a single (linux) terminal command to deal with this. Logic is to just change
eval( code_to_eval )
in obfuscated php files tofile_put_contents( __FILE__, code_to_eval )
. At least that worked for me (my problematic plugin was “Wishlist 1Click Registration” by “HappyPlugins”). Here’s the command:What the command does:
eval()
in them,eval( code )
withfile_put_contents( __FILE__, code )
,php
available from command line) – this runs allfile_put_contents()
statements and replaces all current obfuscated code in .php file with whatever was passed toeval()
.?>
from beginning of each of those files afterwards – it was used for eval code to work for some reason, but now it would just echo “?>” to browser, which we don’t need.Afterwards, you can also probably delete the “scopbin” folder in plugin’s root – it contains one, now unused, .php file.