Possible Duplicate:
My server's been hacked EMERGENCY
Hello, my whole site got hacked possibly by a wordpress exploit, i am in a hurry to explain in detail, but PLEASE do me a favor and look at the following site:
In there it says at some point:
Now, you have to type in the following to get to your folder where you have your html/php files and all the installations (don’t forget to hit enter after):
cd html
You almost cleaned up your website. The following code has to be copy pasted into the the PUTTY window:
find . -type f -name "*.php" -exec sed -i '/base64_decode/d' {} \;
For pasting into the PUTTY window, just press right click where you should insert the code. (The code here is searching all the php files for the base64_decode tag and if it finds it, then it removes it together with the entire malware code. This will check all files and folders under the one you have accessed earlier, in this case the “html” folder which is the root of your files)
Can someone tell me if the explanation of this guy is true?
find . -type f -name "*.php" -exec sed -i '/base64_decode/d' {} \;
Is the above command safe? Will it edit the infected files or just remove them alltogether?
THANKS for any replies.
UPDATE: Unfortunately the command deleted the whole line where the base64_encode line was. The problem is that this line also contained the opening <?php
tag of the file! So right now, all my index.php pages (only index.php was infected) display all the code instead of executing it :( Is it possible to run another command that adds the <?php
tag in every index.php that does not begin with "any number of white space<?php
"?
UPDATE 2: Thanks for anyone who answered. Also congrats to everyone who downvoted a person for not taking the proper action while in panic mode. Good luck if it happens to your site...