4 ms·
It's pretty idiotic to try this on in the first place, given that theme code has to be under the GPL anyway. I suppose one should give the author of this artic
by ionfish 17y ago
It's pretty idiotic to try this on in the first place, given that theme code has to be under the GPL anyway.
I suppose one should give the author of this article the benefit of the doubt and assume that this is something they figured out for themselves, but there's a lot of prior art out there, e.g. [1], [2].
The other point to be made is that of course HTML output is not necessarily the only result of evaluating that obfuscated code (there could be side effects etc.), so a better approach would be to just run base64_decode on it so the source code gets returned, and then replace the obfuscated code plus eval call with that (and then modify it as desired).
[1] http://wordpress.org/support/topic/300761 http://wordpress.org/support/topic/300761
[2] http://justfreetemplates.com/blog/2009/07/22/decrypting-encrypted-wordpress-footers.html http://justfreetemplates.com/blog/2009/07/22/decrypting-encr...
- timdorr 17y agoNot true. WP theme files get loaded by the application and the theme runs its own code while talking to the API that WP makes available. It would be similar to saying every application running on Linux would require GPL licensing because the kernel itself is GPL. The GPL is infectious, but not that far.
- ionfish 17y agoThat's not the line taken by the core WP team, and the SFLC agrees with them. http://wordpress.org/development/2009/07/themes-are-gpl-too/ http://wordpress.org/development/2009/07/themes-are-gpl-too/