How can I redefine the file_get_contents function in php, so that if it is called somewhere in my script, then in the logs to output those parameters that are passed to it?

    2 answers 2

    This idea is from Evil =) go under ssh to the server in the folder where the site is and enter the command:

     find . -name "*.php" -exec grep -H "file_get_contents" {} \; 

    Below you will receive immediately the issue of all files where it is called with quotes. You can also search for the parameter eval .

    Or check the antivirus website https://www.revisium.com/ai/ - it's free.

    It seems to me that it is so more correct.

      There is a function http://php.net/manual/en/function.override-function.php - it does what you need. However, for this to be able to put the extension.

      If you want to look for a virus on the site this way, then there are more simple methods.

      • what methods?)) - aat
      • Above described. Also, I in your question about viruses recommended the utility from Yandex. A separate issue is the complete download of the project to itself, with antivirus enabled. The same NOD catches scripted viruses with its analyzer. - Andrewus