对 eval() 进行 base64_encode;
有没有一种方法可以对这样的内容进行编码:
eval("echo 'String';");
使用base64_encode,然后调用base64_decode并获取结果String
而没有任何回显 或额外的eval 函数?
Is threre a way to encode something like this :
eval("echo 'String';");
with base64_encode, and then to call base64_decode and get the result String
without any echo or additional eval functions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您要求
base64_decode
来执行任意代码?那是行不通的。它对数据进行操作,而不是代码,因此您解码的任何内容都必须是数据字符串。直接编码'String'
不行吗?否则,您必须再次运行eval
将数据转换为代码:eval(base64_decode($mysterydata));
。You are asking for
base64_decode
to execute arbitrary code? That doesn't work. It operates on data, not code, and so whatever you decode has to be a data string. Can't you just encode'String'
directly? Otherwise, you'll have to runeval
again to turn data into code:eval(base64_decode($mysterydata));
.eval('die(base64_decode("bla"))');
像这样的东西?
如果你想混淆你的代码,请查看这个网站:
http://demo.dmwtechnologies.com/PHP/PhpObfuscator/index.php
eval('die(base64_decode("bla"))');
something like this?
if you want to obfuscate your code have a look at this site:
http://demo.dmwtechnologies.com/PHP/PhpObfuscator/index.php
不能在
eval
中使用echo
,但是这样怎么样?:Not with
echo
in theeval
, but how about this?: