php -f 文件.php?
所以无论如何,我正在和某人谈论 PHP 关于 PHP 代码反混淆的问题,他说“将 eval 更改为 echo,然后运行 php -f file.php”。
我明白将 eval 更改为 echo (在代码中)意味着什么,但是,他所说的 php -f file.php 是什么意思?
So anyways, I was talking to someone about PHP about deobfuscating PHP code and he said "Change the eval to echo and then run php -f file.php".
I understand what it means to change eval to echo (in the code), however, what does he mean by php -f file.php?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
php -f file.php
是运行特定文件的简单命令。假设与反混淆 PHP 代码无关php -f file.php
is a simple command to run the specific file.This is assume has nothing to do with deobfuscating PHP code他的意思是:“在命令行上运行 '
php -f
'”。这应该如何消除混淆,我一点也不知道。它只是编译并执行文件中的 php 脚本。
He means: "Run '
php -f <filename>
' on the command line."How that is supposed to deobfuscate anything, I haven't the slightest. It merely compiles and executes the php-script in the file.
这意味着从命令行运行命令
php -f
。但是,我看不出这对反混淆有什么帮助,因为它实际上只是将文件呈现到命令提示符。就像打开它并查看它一样。That means run the command
php -f <file>
from the command line. However, I can't see how that would help in deobfuscating anything, because it would effectively just render the file to the command prompt. The same as opening it up and looking at it.正如每个人都指出的那样,这实际上是在命令行上运行 php 脚本。在类 Unix 系统上,您将需要 php-cli 或类似的命名包。不要认为 PHP 的 CLI 版本使用有些不同的 php.ini 设置,甚至有自己的 ini 文件。例如,在我的 Debian Squeeze 盒子上,它位于
/etc/php5/cli
As everyone pointed out this is actually running the php script on command line. On unix like systems you will need php-cli or similar named package. Do not that CLI version of PHP uses somewhat different php.ini settings and even have its own ini file. For example on my Debian Squeeze box, it is located in
/etc/php5/cli