<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Citizen Tools &#187; Wordpress</title>
	<atom:link href="http://citizentools.netalyst.com/category/technology/wordpress/feed" rel="self" type="application/rss+xml" />
	<link>http://citizentools.netalyst.com</link>
	<description>It's up to us.</description>
	<lastBuildDate>Sat, 04 Sep 2010 20:26:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Dealing with WordPress blog spam</title>
		<link>http://citizentools.netalyst.com/2009/dealing-with-wordpress-blog-spam</link>
		<comments>http://citizentools.netalyst.com/2009/dealing-with-wordpress-blog-spam#comments</comments>
		<pubDate>Sun, 01 Feb 2009 22:48:18 +0000</pubDate>
		<dc:creator>Chris Berendes</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://citizentools.netalyst.com/?p=29</guid>
		<description><![CDATA[Off-topic, but as a minor &#8220;giving back&#8221; to everyone who helps WordPress bloggers fight spammers. I discovered this afternoon that a few of my posts had 200 or so links each to sites selling various pain medications. You probably missed it, as did I, because they were embedded between tags styled display:none, so they would [...]]]></description>
			<content:encoded><![CDATA[<p>Off-topic, but as a minor &#8220;giving back&#8221; to everyone who helps WordPress bloggers fight spammers.</p>
<p>I discovered this afternoon that a few of my posts had 200 or so links each to sites selling various pain medications. You probably missed it, as did I, because they were embedded between tags styled <code>display:none</code>, so they would show only to search engines. That&#8217;s still bad, because it increases my bandwidth load and could lead to Google deciding that this was a spam site and dropping it from their index.</p>
<p>So it had to be fixed.</p>
<p>I read up here:</p>
<ul>
<li><a href="http://ocaoimh.ie/2008/06/08/did-your-wordpress-site-get-hacked/">
<p>http://ocaoimh.ie/2008/06/08/did-your-wordpress-site-get-hacked/</a></p>
<li><a href="http://thenondesigner.com/wordpress/hidden-spam-in-wordpress-displaynone/">http://thenondesigner.com/wordpress/hidden-spam-in-wordpress-displaynone/</a>
<li><a href="http://wordpress.org/support/topic/221431">http://wordpress.org/support/topic/221431</a> </ul>
<p>and installed the <a href="http://wordpress.org/extend/plugins/bad-behavior/">Bad Behavior</a> plugin.</p>
<p>Then I went to work in the database. <em>If any of the following puzzles you, PLEASE STOP READING HERE. I&#8217;m not guaranteeing that this will work for you. It may blow up your blog, translate your categories into French (or perhaps English), or cause your hair (or mine) to fall out. </em></p>
<ol>
<li>I backed up the entire database via the phpMyAdmin interface, and also copied the table containing my posts, citizentools_posts in this case.
<li>I was able to determine that the infected posts had the spam text right at the end, i.e. those posts ended with &lt;u style=display:none&gt; 100&#8242;s of bad links &lt;/u&gt;
<li> so I used this criterion to find them:<br />
<code><br />
SELECT * from citizentools_posts<br />
WHERE<br />
REPLACE( `post_content` , "&lt;/u&gt;", CHAR( 10 ) )<br />
REGEXP<br />
CONCAT( '^.*&lt;u style=display:none&gt;.+', CHAR( 10 ) , '$' )<br />
</code> and</p>
<li> then ran this SQL to fix them, tagging each fixed post with &lt;&#8211;nospam&#8211;&gt; so I could backtrack if needed<br />
<code><br />
UPDATE citizentools_posts<br />
SET `post_content` =<br />
CONCAT('&lt;!--nospam--&gt;',SUBSTRING_INDEX(post_content,'&lt;u style=display:none&gt;',1))<br />
WHERE<br />
REPLACE( `post_content` , "&lt;/u&gt;", CHAR( 10 ) )<br />
REGEXP<br />
CONCAT( '^.*&lt;u style=display:none&gt;.+', CHAR( 10 ) , '$' )<br />
</code>
</ol>
<p>Thanks to the posters before me &#8211; at the links above and elsewhere &#8211; who dealt with this and left careful notes.</p>
]]></content:encoded>
			<wfw:commentRss>http://citizentools.netalyst.com/2009/dealing-with-wordpress-blog-spam/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
