For those of you unaware earlier my website looked like this:
The reason for this was an exploit that a spambot used in the TinyMCE editor on my site. (Which has since been fixed).
But what is more interesting is what it did. It wrote a huge string to every single php file in my website.
Getting it out proved a royal pain in the butt, but I finally came up with the following command (Had to do it twice because the string was so long).
perl -p -i -e ‘s/oldstring/newstring/g’ $(find . -name \*.php)
If you use this remember to use \ before any characters that aren’t numbers or letters, and use \x27 for the ‘ character.
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 |
36 queries. 0.060 seconds