解码 stripslashes gzinflate base64
我对 WordPress 主题有疑问。我不是一名从头开始编写主题的程序员,所以我一直在寻找一个免费的主题。当我在本地服务器上安装主题以更改外观时,出现错误。我在functions.php 上遇到错误,该行是这样的代码:
<?php eval(stripslashes(gzinflate(base64_decode("VZBNS8QwEIbvC/0PcyikhbJ611rY9QPZxZOKSKCUyYSETZOSpB4U/7uztCLCHGbeZ767m+sO9Owx2+ABDeGpNzQoilX9VWwAoHStFE+7l9cd7t/swd0e3h+OUlwtULfKRj+MVPX9/ePxru/rrRQXS4vtZKa/TNXqMJGvSt1IEaWoV4CtjpzOumq0dZTsJ3FQr1yjC+ksqFWwuko5TiFVJTalq9v2cl0VgNAEkOLZ2ATZ0EjATiRHQyIFs+elAHlath8EGMYx+ATOInmkBgbnOPCnBNafy0GHkLkimTA7xX3GgYH1ecD8exeAsrS438WG7f8PmRSbjp/8Aw==")))); ?>
我花了几个小时试图通过解码使其工作,但一次又一次失败。我得到了更多垃圾......我尊重别人的工作,但当有人免费发布一些东西但你意识到实际上并不是“免费”时,我真的很沮丧。另外,我想更改页脚的设计并添加更多内容,而不是删除学分,但由于同样的问题而不能。如果有人可以帮助我,我将不胜感激。这也是页眉和页脚:
页眉
<?php eval(stripslashes(gzinflate(base64_decode("VZDLSsUwEIb3hb7DLAppoRzFjQuNBUVBcCXiKlDKZGLGkyYlSV0ovrs5tCLCLGb+b+7DzfUAZvWYOXhAS3gcTQiZYtt91RUANE4qcbfm1/f14vKW38wzK3G1ISM1Rz/N1I7jw+PT/Th2ByXOtgaHxS5/mVqasJBvG9MrEZXodoDSRJp00XVv2FHiTypBt3ODLqSToHeBTZtyXEJqG+wb10l5vi8KQGgDKPFiOUG2NBMUJ5KjKZGG1WuKgGVa5g8CDPMcfALHSB6ph8m5EvhjAvanctjOgGTD6nTpM08FsM8T5t+7ADTT5n7XVbH/Hyykroby4h8=")))); ?>
页脚
<?php eval(stripslashes(gzinflate(base64_decode("dVLBSgMxED0r+A9DC7aCutVju27BigfRi+1FWCjZ3dkmmGZCkrrdvzfZbSxYmkuSN/PeTN5knqWV+AFRPeWDmsihyQfZ1eVFh5aSWfsXkFi7Pnhdkm5nkFrNFFjXSvRJJUky0+FkMpn5rHSuuYZC0kaomsb5SLEt5qObGcyzNAnEDF7Qio3CCooWUgbcYO11uHN6miQLg80bFfa+pK3XC1cI9zRhGQgFvpxkBRnmBClohOOnGu9YMIUWV+wbWcPag1aEIeJB8/aU/kU7s+BGWCeYWmpWYmwmgvCxs6I8Q39G617J4P6TCnLxIQGFDoYeD+xgeOIdP+O8ERt+sP5Y5cRhY+3jemfkwWWf/7lcBnXPiUPyhlVo7sIopw96D5akqGBYdsvPLYoPObKq+wsr0v86jPvx1LfS6HXf7rirH8IFVW134G4r/Z/4BQ==")))); ?>
提前谢谢您!
I have a problem with a wordpress theme. I am not a programmer to write a theme from scratch so i was looking for one free. When I installed the theme on the local server to make change the look, error. I get an error on the functions.php and on that line is this code:
<?php eval(stripslashes(gzinflate(base64_decode("VZBNS8QwEIbvC/0PcyikhbJ611rY9QPZxZOKSKCUyYSETZOSpB4U/7uztCLCHGbeZ767m+sO9Owx2+ABDeGpNzQoilX9VWwAoHStFE+7l9cd7t/swd0e3h+OUlwtULfKRj+MVPX9/ePxru/rrRQXS4vtZKa/TNXqMJGvSt1IEaWoV4CtjpzOumq0dZTsJ3FQr1yjC+ksqFWwuko5TiFVJTalq9v2cl0VgNAEkOLZ2ATZ0EjATiRHQyIFs+elAHlath8EGMYx+ATOInmkBgbnOPCnBNafy0GHkLkimTA7xX3GgYH1ecD8exeAsrS438WG7f8PmRSbjp/8Aw==")))); ?>
I've spent couple of hours trying to make it work by decoding it but fail after fail. I get more junk... I respect the work of others but is really frustrating when someone release something for free but then you realize is not actually "free". Also i would like to to change the design on the footer and add some more stuff, not to delete the credits but can't because of the same issue. I would appreciate if someone can help me with this. Here is the header and footer also:
header
<?php eval(stripslashes(gzinflate(base64_decode("VZDLSsUwEIb3hb7DLAppoRzFjQuNBUVBcCXiKlDKZGLGkyYlSV0ovrs5tCLCLGb+b+7DzfUAZvWYOXhAS3gcTQiZYtt91RUANE4qcbfm1/f14vKW38wzK3G1ISM1Rz/N1I7jw+PT/Th2ByXOtgaHxS5/mVqasJBvG9MrEZXodoDSRJp00XVv2FHiTypBt3ODLqSToHeBTZtyXEJqG+wb10l5vi8KQGgDKPFiOUG2NBMUJ5KjKZGG1WuKgGVa5g8CDPMcfALHSB6ph8m5EvhjAvanctjOgGTD6nTpM08FsM8T5t+7ADTT5n7XVbH/Hyykroby4h8=")))); ?>
footer
<?php eval(stripslashes(gzinflate(base64_decode("dVLBSgMxED0r+A9DC7aCutVju27BigfRi+1FWCjZ3dkmmGZCkrrdvzfZbSxYmkuSN/PeTN5knqWV+AFRPeWDmsihyQfZ1eVFh5aSWfsXkFi7Pnhdkm5nkFrNFFjXSvRJJUky0+FkMpn5rHSuuYZC0kaomsb5SLEt5qObGcyzNAnEDF7Qio3CCooWUgbcYO11uHN6miQLg80bFfa+pK3XC1cI9zRhGQgFvpxkBRnmBClohOOnGu9YMIUWV+wbWcPag1aEIeJB8/aU/kU7s+BGWCeYWmpWYmwmgvCxs6I8Q39G617J4P6TCnLxIQGFDoYeD+xgeOIdP+O8ERt+sP5Y5cRhY+3jemfkwWWf/7lcBnXPiUPyhlVo7sIopw96D5akqGBYdsvPLYoPObKq+wsr0v86jPvx1LfS6HXf7rirH8IFVW134G4r/Z/4BQ==")))); ?>
Thank you in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
更改评估-> echo 查看源代码
Change eval -> echo to view source
请注意,所有 Wordpress 主题始终必须在 GPL 许可证下发布,因为 Wordpress 本身也遵循 GPL(版本 2)。
以下是自由软件基金会回答的几个常见问题解答:
http://www.gnu.org/licenses/old-licenses/gpl-2.0-faq.html#GPLAndPlugins
http://www.gnu.org/licenses/old-licenses/gpl-2.0-faq.html#IfLibraryIsGPL
http://www.gnu.org/licenses/old-licenses /gpl-2.0-faq.html#MereAggregation
http://www.gnu.org/licenses/old-licenses/gpl-2.0-faq.html#GPLInProprietarySystem
这意味着任何在 GPL 以外的任何其他许可证下发布代码的 WordPress 主题作者都侵犯了版权WordPress 开发人员。
不幸的是,您对此无能为力,但 WP 开发人员本身将不得不起诉主题开发人员。这是 GPL 最悲伤的部分,作为用户你无法强制执行它:-/
Note that all Wordpress themes always must be released under the GPL license because Wordpress itself is under the GPL (version 2).
Here are a couple of FAQ questions where the Free Software Foundation answers such questions:
http://www.gnu.org/licenses/old-licenses/gpl-2.0-faq.html#GPLAndPlugins
http://www.gnu.org/licenses/old-licenses/gpl-2.0-faq.html#IfLibraryIsGPL
http://www.gnu.org/licenses/old-licenses/gpl-2.0-faq.html#MereAggregation
http://www.gnu.org/licenses/old-licenses/gpl-2.0-faq.html#GPLInProprietarySystem
This means that any Wordpress theme author who release code under any other license than GPL is infringing the copyrights of the Wordpress developers.
Unfortunately there is nothing you can do about that, but the WP developers themselves will have to sue the theme developer. This is the saddest part about the GPL, that you as a user cannot enforce it :-/
“那一行”:
页眉:
页脚:
编辑:复制了错误的行
"That line":
Header:
Footer:
edit: copied the wrong line
使用
eval
是一种常见的代码混淆形式(该特定代码使用 PHPgzinflate
函数来解压自身),但它很容易被破解。可以用print
替换eval
来确定正在执行的内容。作为第一步,我对 标题 和 页脚。标头检查
footer.php
以确保它没有被更改。它将整个文件读入内存 (fread(...);
),然后检查 gzip 压缩数据的特定部分 (if(strpos($c,$l) ==0)
)。如果文件中不存在,则使用die
命令关闭 WordPress 软件。以完全相同的方式,主题检查标题。然而,一旦弱混淆被打破,这一切都可以轻易被击败。页脚并不是很特别,只是它 a) 像主题和头文件一样被混淆; b) 包括指向其他几个网站的超链接。创建者的动机可能是为了提高这些网站的搜索引擎排名(如果网站有更多的入站链接,搜索引擎会对网站排名更高)。
总而言之,
eval
进行代码混淆来模糊代码的含义。Using
eval
is a common form of code obfuscation (this particular code uses the PHPgzinflate
function to unzip itself), but it is easily defeated. It is possible to replaceeval
withprint
to determine what is being executed. As a first step, I've done this to the header and the footer.The header checks
footer.php
to ensure that it was not changed. It reads the entire file into memory (fread(...);
) and then checks for a specific part of the gzip-compressed data (if(strpos($c,$l)==0)
). If it is not present in the file, then thedie
command is used to close the WordPress software. In exactly the same way, the theme checks the header. All this, however, can be easily defeated once the weak obfuscation is broken.The footer is not very special except that it is a) obfuscated like the theme and header files; and b) includes hyperlinks to several other web sites. The creator's motive is probably to boost the search engine ranking of those sites (search engines rank sites higher if they have more inbound links).
To conclude all this,
eval
is used to obscure the meaning of the code.