简体   繁体   中英

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?

php -f file.php is a simple command to run the specific file.This is assume has nothing to do with deobfuscating PHP code

在此处输入图片说明

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.

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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