<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Get rid of those injected iframes in index.html and index.php files</title>
	<atom:link href="http://blog.unixy.net/2009/04/get-rid-of-those-injected-iframes-in-indexhtml-and-indexphp-files/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.unixy.net/2009/04/get-rid-of-those-injected-iframes-in-indexhtml-and-indexphp-files/</link>
	<description>Fully Managed Dedicated Servers</description>
	<lastBuildDate>Wed, 16 Mar 2011 08:26:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>By: UNIXy</title>
		<link>http://blog.unixy.net/2009/04/get-rid-of-those-injected-iframes-in-indexhtml-and-indexphp-files/comment-page-1/#comment-471</link>
		<dc:creator>UNIXy</dc:creator>
		<pubDate>Thu, 30 Apr 2009 05:14:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.unixy.net/?p=9#comment-471</guid>
		<description>&lt;a href=&quot;#comment-468&quot; rel=&quot;nofollow&quot;&gt;@Cursors&lt;/a&gt; 
It removes the iframe and all text in between (the -i flag stands for inline substitution). It can be dangerous because if your HTML codes makes use of iframes, it could end up deleting &quot;innocent&quot; iframes that are in your code (make a backup of the files/folder before running the code).

For example, if you had this code in your HTML files, all of it will be removed:

&lt;blockquote&gt;&lt;strong&gt;&lt;&lt;/strong&gt;iframe src=&quot;frame&quot; &gt;frame#1&lt;strong&gt;&lt;&lt;/strong&gt;/iframe&gt;&lt;strong&gt;&lt;&lt;/strong&gt;iframe src=&quot;anotherframe&#039;&gt;frame#2&lt;strong&gt;&lt;&lt;/strong&gt;/iframe&gt;&lt;/blockquote&gt;

One way to avoid removing the &quot;innocent&quot; iframes is to match specific ones. If your iframes have a more specific string to match, that&#039;ll work. For example, let&#039;s say that you found out that the injected iframes were something like this:

&lt;blockquote&gt;&lt;strong&gt;&lt;&lt;/strong&gt;iframe src=&quot;http://maliciousurl.tld&quot;&gt;frame&lt;strong&gt;&lt;&lt;/strong&gt;/iframe&gt;&lt;/blockquote&gt;

Your sed code will look like:

&lt;blockquote&gt;
cd /home/username/public_html &amp;&amp; find ./ \( -iname &#039;index.html&#039; -o -iname &#039;index.php&#039; \)&#124;while read file; do sed -i &#039;s/&lt;strong&gt;&lt;&lt;/strong&gt;iframe src=\&quot;http:\/\/maliciousurl.*&lt;strong&gt;&lt;&lt;/strong&gt;\/iframe&gt;//g;&#039; ${file}; done &amp;&lt;/blockquote&gt;

If you don&#039;t want sed to make changes to your files, replace the -i flag with -e. This will simply print out the file content so you can have a chance to see how it&#039;d look like.

Best</description>
		<content:encoded><![CDATA[<p><a href="#comment-468" rel="nofollow">@Cursors</a><br />
It removes the iframe and all text in between (the -i flag stands for inline substitution). It can be dangerous because if your HTML codes makes use of iframes, it could end up deleting &#8220;innocent&#8221; iframes that are in your code (make a backup of the files/folder before running the code).</p>
<p>For example, if you had this code in your HTML files, all of it will be removed:</p>
<blockquote><p><strong>< </strong>iframe src=&#8221;frame&#8221; >frame#1</strong><strong>< </strong>/iframe></strong><strong>< </strong>iframe src=&#8221;anotherframe&#8217;>frame#2</strong><strong>< </strong>/iframe></strong></p></blockquote>
<p>One way to avoid removing the &#8220;innocent&#8221; iframes is to match specific ones. If your iframes have a more specific string to match, that&#8217;ll work. For example, let&#8217;s say that you found out that the injected iframes were something like this:</p>
<blockquote><p><strong>< </strong>iframe src=&#8221;http://maliciousurl.tld&#8221;>frame</strong><strong>< </strong>/iframe></strong></p></blockquote>
<p>Your sed code will look like:</p>
<blockquote><p>
cd /home/username/public_html &#038;&#038; find ./ \( -iname &#8216;index.html&#8217; -o -iname &#8216;index.php&#8217; \)|while read file; do sed -i &#8216;s/<strong>< </strong>iframe src=\&#8221;http:\/\/maliciousurl.*</strong><strong>< </strong>\/iframe>//g;&#8217; ${file}; done &#038;</strong></p></blockquote>
<p>If you don&#8217;t want sed to make changes to your files, replace the -i flag with -e. This will simply print out the file content so you can have a chance to see how it&#8217;d look like.</p>
<p>Best</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cursors</title>
		<link>http://blog.unixy.net/2009/04/get-rid-of-those-injected-iframes-in-indexhtml-and-indexphp-files/comment-page-1/#comment-468</link>
		<dc:creator>Cursors</dc:creator>
		<pubDate>Wed, 29 Apr 2009 22:19:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.unixy.net/?p=9#comment-468</guid>
		<description>Thanks man.  One quick question, does that just search for the  or does it actually remove it?  Or could you further explain the code?  Like does it look for stuff between iframe and /iframe?  Does that include every piece of iframe code on your site?</description>
		<content:encoded><![CDATA[<p>Thanks man.  One quick question, does that just search for the  or does it actually remove it?  Or could you further explain the code?  Like does it look for stuff between iframe and /iframe?  Does that include every piece of iframe code on your site?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic page generated in 0.111 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-02-06 05:15:00 -->

