简体   繁体   English

php -f file.php?

[英]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". 因此,无论如何,我正在与某人谈论PHP,以消除对PHP代码的混淆,他说“将eval更改为echo,然后运行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? 我了解将eval更改为echo的含义(在代码中),但是php -f file.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 file.php是运行特定文件的简单命令,假定与反混淆PHP代码无关

在此处输入图片说明

He means: "Run ' php -f <filename> ' on the command line." 他的意思是:“在命令行上运行' php -f <filename> '。”

How that is supposed to deobfuscate anything, I haven't the slightest. 我应该不会怎么混淆这东西。 It merely compiles and executes the php-script in the file. 它仅编译并执行文件中的php-script。

That means run the command php -f <file> from the command line. 这意味着从命令行运行命令php -f <file> 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. 就像打开它并查看它一样。

As everyone pointed out this is actually running the php script on command line. 正如所有人指出的那样,这实际上是在命令行上运行php脚本。 On unix like systems you will need php-cli or similar named package. 在类似Unix的系统上,您将需要php-cli或类似的命名包。 Do not that CLI version of PHP uses somewhat different php.ini settings and even have its own ini file. 不要认为CLI的PHP版本使用的php.ini设置有所不同,甚至拥有自己的ini文件。 For example on my Debian Squeeze box, it is located in /etc/php5/cli 例如,在我的Debian Squeeze框中,它位于/etc/php5/cli

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM