<?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>David Burch &#187; Twitter</title>
	<atom:link href="http://yourgotoguy.com/category/twitter/feed" rel="self" type="application/rss+xml" />
	<link>http://yourgotoguy.com</link>
	<description>Your Go-To Guy</description>
	<lastBuildDate>Mon, 15 Feb 2010 20:39:35 +0000</lastBuildDate>
	<meta name="generator" content="Blog 2.6" />
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>10 Steps to Removing Br.it.ney *Pron* Avatars and Spamming Spammers from your  Stream by Automagically Blocking them</title>
		<link>http://yourgotoguy.com/10-steps-to-removing-br-it-ney-pron-avatars-and-spamming-spammers-from-your-stream-by-automagically-blocking-them</link>
		<comments>http://yourgotoguy.com/10-steps-to-removing-br-it-ney-pron-avatars-and-spamming-spammers-from-your-stream-by-automagically-blocking-them#comments</comments>
		<pubDate>Sat, 21 Nov 2009 21:45:42 +0000</pubDate>
		<dc:creator>David Burch</dc:creator>
				<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://yourgotoguy.com/?p=80</guid>
		<description><![CDATA[

I misspelled &#8220;Pron&#8221; on purpose so that the spam bots won&#8217;t send me unwanted followers.
Disclaimer: This tutorial contains Alpha-level code (It is not ready for prime time). It comes with no warranty or assurance that it is suitable for any purpose. In fact, I urge you not to use it because &#8212; depending on how [...]]]></description>
			<content:encoded><![CDATA[<p></p><div class="LessonContent">
<div class="LessonSummary">
<p><em>I misspelled &#8220;Pron&#8221; on purpose so that the spam bots won&#8217;t send me unwanted followers.</em></p>
<p><strong>Disclaimer: </strong>This tutorial contains Alpha-level code (It is not ready for prime time). It comes with no warranty or assurance that it is suitable for any purpose. In fact, I urge you not to use it because &#8212; depending on how you use it &#8212; it can be overly aggressive in blocking people, in which case it may cause more harm than good. I take no responsibility, whatsoever, of the outcomes should you decide to use it.</p>
<p>The program is written in the Perl programming language: a difficult to read language that some have likened to line noise. You will have to be able to install Perl on your computer, unzip files into particular locations, edit files to add the words/phrases that you want blocked, and schedule a process to run on your computer. Restrictions on my time mean that, unfortunately, I can offer you no support.</p>
<p><strong>Limitations:</strong> IMHO only Twitter has the access and the abiilty to do this type of filtering right. This program can only look at the last few Tweets in your stream so you might find it misses things if<br />
1) You don&#8217;t have it scheduled to run frequently and<br />
2) if your Twitter stream is more like a river.</p>
<p>The program also requires you to add some very specific block words/phrases and cannot go back in time. Pay very special attention to my explanation of how aggressive this program is. This program blocks people without asking you for confirmation. This is necessary for a program that runs at scheduled times when you are not present.</p>
<p><strong>Other OS: </strong>These instructions are for Windows users. This program should work on other operating systems as well. Mac and Linux users already have Perl installed. You just need to unzip the program files to a location where you can get to them from the command line. You also need to know how to schedule processes in cron. These are details that I&#8217;ll leave to you and/or your techie friends.</p>
<p><strong>Origins: </strong>This program is a quick-and-dirty hack that I put together in the span of a few hours in attempt to ease the pain of a particular Twitter user: my Reiki instructor @gassho. I think @gassho is right and Twitter should address this problem directly. <a href="http://yourgotoguy.com/aai">Sign @gassho&#8217;s petition here if you think so too</a>.</p>
<p><span style="color: #800000;">I personally believe that Twitter should develop a filter like the Askimet and other SPAM prevention plugins available for WordPress and give users the option to use it or not. This type of spam is difficult to combat programmatically; however, shared community action has been proven to be quite effective.</span></p>
<p><strong><em>Okay, if you&#8217;re still with me, then read on&#8230;</em></strong></p>
</div>
</div>
<div class="LessonStep top">
<h3 class="StepTitle">Step 1: Install Perl</h3>
<div class="StepImage"><img src="http://yourgotoguy.com/wp-content/uploads/2009/11/media_1258827315381.png" alt="media_1258827315381.png" width="400" height="227" /></div>
<div class="StepInstructions">
<p>1. Go to <a href="http://www.activestate.com/activeperl/">http://www.activestate.com/activeperl/</a><br />
2. Download and install ActivePerl</p>
</div>
</div>
<div class="LessonStep top">
<h3 class="StepTitle">Step 2: Download the zip file containing the program and needed libraries.</h3>
<div class="StepImage"><img src="http://yourgotoguy.com/wp-content/uploads/2009/11/media_1258828164003.png" alt="media_1258828164003.png" width="400" height="288" /></div>
<div class="StepInstructions">
<p>1. Right-click on this link and save the zip file to your Desktop: <a href="http://dl.dropbox.com/u/121222/zen-twitter-tools.zip">http://dl.dropbox.com/u/121222/zen-twitter-tools.zip</a><br />
2. Extract the contents of the zip file using your favorite Zip archive utility: right-clicking in Windows XP &amp; Vista, 7-zip, Win Zip, etc.</p>
</div>
</div>
<div class="LessonStep top">
<h3 class="StepTitle">Step 3: Copy the folder to the root level of your C: drive</h3>
<div class="StepImage"><img src="http://yourgotoguy.com/wp-content/uploads/2009/11/media_1258828415725.png" alt="media_1258828415725.png" width="400" height="127" /></div>
<div class="StepInstructions">
<p>1. Open &#8220;My Computer&#8221;<br />
2. Click on the zen-twitter-tools folder with your left mouse button<br />
3. Holding down the mouse button, drag the folder over to your C: drive<br />
4. Drop the folder on the C: drive</p>
<p>Note: If you&#8217;re using Vista or Windows 7, you may receive a &#8220;permission denied&#8221; message and have to create this folder first.</p>
</div>
</div>
<div class="LessonStep top">
<h3 class="StepTitle">Step 4: Add your Twitter user name and password to the configuration.xml file</h3>
<div class="StepImage"><img src="http://yourgotoguy.com/wp-content/uploads/2009/11/media_1258829479259.png" alt="media_1258829479259.png" width="400" height="233" /></div>
<div class="StepInstructions">
<p>1. Click on the zen-twitter-tools directory in Windows Explorer<br />
2. Right-click on the credentials.xml file<br />
3. Click on Open With<br />
4. Click on Notepad<br />
5. Change the username and password to your own Twitter account credentials and select File | Save</p>
</div>
</div>
<div class="LessonStep top">
<h3 class="StepTitle">Step 5: Taking Great Care and with Much Thought, Add Words / Phrases to Block</h3>
<div class="StepImage"><img src="http://yourgotoguy.com/wp-content/uploads/2009/11/media_1258830210182.png" alt="media_1258830210182.png" width="400" height="216" /></div>
<div class="StepInstructions">
<p>1. Right-click on block_in_names.txt and open it in notepad<br />
2. Right-click on block_in_tweets.txt and open it in notepad<br />
3. Add words to block in block_in_names.txt<br />
4. Add words and phrases to block in block_in_tweets.txt</p>
<p><span style="color: #ff0000;"><strong>Take great care and put much thought into this. The matching algorithm is very aggressive. In technical terms it uses case-insensitive, greedy matching. Take responsibilty for your actions: you are defining rules for a robot program to perform actions for you in your absence.</strong></span></p>
<p>This means that if you say that you want to block Twitter names containing the word &#8220;an&#8221; it will also block &#8220;Anthony&#8221; and &#8220;Brian&#8221; and all your other friends with the consecutive letters &#8220;AN&#8221; or &#8220;An&#8221; or &#8220;aN&#8221; or &#8220;an&#8221; in their name. Britney will not block Br.it.ney or B.r.i.t.n.ey or B_r_t_n_y. If you block the word follow, you&#8217;ll block all your #Follow Friday friends.</p>
<p>This also means that if you want to block tweets spammers tweeting the phrase &#8220;100 followers in a day&#8221; that you will also block your friend who DM&#8217;s you saying &#8220;Don&#8217;t you hate those spam DM&#8217;s promising 100 followers in a day?&#8221;</p>
<p>It&#8217;s very difficult to match all possible permutations. In general, you want your block words and phrases to be as long and specific as possible to avoid blocking people who have done no wrong.</p>
<p><em>At this point, I hope you have some insight into 1) some of the difficulty of writing programs like this, 2) why Twitter needs to get involved, and 3) why a community-based system like Askimet could be more effective, 4) why you&#8217;ll want to monitor the agressive-block.log file to find people who have been blocked my mistake and unblock them.*</em></p>
<p><em>* This is that &#8220;more harm than good&#8221; stuff that I mentioned at the beginning. </em></p>
</div>
</div>
<div class="LessonStep top">
<h3 class="StepTitle">Step 6: Check your Credentials</h3>
<div class="StepImage"><img src="http://yourgotoguy.com/wp-content/uploads/2009/11/media_1258833583567.png" alt="media_1258833583567.png" width="400" height="85" /></div>
<div class="StepInstructions">
<p>This program runs from the CMD tool, also known as the Command Prompt or DOS Prompt.<br />
1. Run CMD.exe: Search for CMD or Start | Run | CMD<br />
2. Change directories to your zen-twitter-tools directory: cd \zen* or cd \zen-twitter-tools<br />
3. Run the command: perl account_verify_credentials.pl</p>
<p>Example: C:\zen-twitter-tools&gt;perl account_verify_credentials.pl</p>
<p>You entered your username and password incorrectly if you get this: Login failed. Verify credentials.xml<br />
Edit the credentials.xml file and correct the problem.</p>
<p>You&#8217;re good to go if you get this: Successfully logged in as [Your Name]</p>
</div>
</div>
<div class="LessonStep top">
<h3 class="StepTitle">Step 7: Block the S.O.B.s and Most Likely Some of your Friends</h3>
<div class="StepImage"><img src="http://yourgotoguy.com/wp-content/uploads/2009/11/media_1258836096482.png" alt="media_1258836096482.png" width="400" height="94" /></div>
<div class="StepInstructions">
<p>1. Run the command: perl aggressive-block.pl</p>
<p>There is no output in the above screenshot, indicating that no one was blocked (there were no matches in the last ten tweets in your stream or in the last ten direct messages to you).</p>
<p>Here&#8217;s some fake examples on how it&#8217;ll look when the program blocks someone:</p>
<p>C:\zen-twitter-tools&gt;perl aggressive-block.pl<br />
You are now blocking @B.r.i.t.n.e.y: Spam Bot Britney<br />
Type: Mention<br />
Blocked @B.r.i.t.n.e.y<br />
for having &#8220;B.r.i.t.n.e.y&#8221; in screen_name:<br />
@B.r.i.t.n.e.y</p>
<p>You are now blocking @Br.it.ney: Fake Britney<br />
Type: Direct Message<br />
Blocked @Br.it.ney<br />
for saying &#8220;Join my Mafia Family!&#8221; in this tweet<br />
@YourGoToGuy Join my Mafia Family! http://fakeurl.com</p>
</div>
</div>
<div class="LessonStep top">
<h3 class="StepTitle">Step 8: Unblock your Friends <img src='http://yourgotoguy.com/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </h3>
<div class="StepImage"><img src="http://yourgotoguy.com/wp-content/uploads/2009/11/media_1258836446116.png" alt="media_1258836446116.png" width="400" height="64" /></div>
<div class="StepInstructions">
<p>If you specified text that matched your friends, you&#8217;ll need to manually unblock therm, either by 1) searching for their name in Twitter or by 2) running the block_destroy.pl program from the command line.</p>
<p><strong>Note: </strong>The program logs all it&#8217;s blocks in the aggressive_block.log file, so review it often. You can also see the people you&#8217;ve blocked using the command: perl block_blocking.pl</p>
<p>This is looking more and more like a bad idea. <span style="color: #ff0000;"><strong>Twitter Give Us The Tools to Save Ourselves From Pron Spam! Clone Askimet for Twitter!</strong></span></p>
</div>
</div>
<div class="LessonStep top">
<h3 class="StepTitle">Step 9: Schedule the Program to Run Unattended</h3>
<div class="StepImage"><img src="http://yourgotoguy.com/wp-content/uploads/2009/11/media_1258838813165.png" alt="media_1258838813165.png" width="400" height="344" /></div>
<div class="StepInstructions">
<p>Ah, this is hard part because it is different for every operating system, even better different Window Versions. So you&#8217;ll to google this for instructions for your particular operating system. On older versions of Windows, the scheduling program is called &#8220;at&#8221; as in run this program at this time. On Linux and Macs, the command is cron.</p>
<p>On newer versions of Windows, go into the Control Panel | Administrative Tools | Task Scheduler.</p>
<p>You want to schedule a job to run this command several times daily:<br />
c:\perl\bin\perl.exe c:\zen-twitter-tools\aggressive_block.pl</p>
<p>You&#8217;ll have to experiment with the frequency, but the program only checks the last 10 tweets or DMs in your stream, so you&#8217;ll probably need to run it every 5-15 minutes. You can&#8217;t run it too frequently or you&#8217;ll run out of Twitter API tokens.</p>
</div>
</div>
<div class="LessonStep top">
<h3 class="StepTitle">Step 10: Petition Twitter to Put their New Cash Injection to the Best Possible Use</h3>
<div class="StepImage"><img src="http://yourgotoguy.com/wp-content/uploads/2009/11/media_1258838928587.png" alt="media_1258838928587.png" width="400" height="201" /></div>
<div class="StepInstructions">
<p>Only after creating this program, did I realize that ultimately this program is just a band-aid which will most likely cause more harm than good. I feel that Twitter should aggressive tackle this problem. <a href="http://yourgotoguy.com/aai">Sign @gassho&#8217;s petition if you agree</a>.</p>
<p>Why is this a problem? <a href="http://yourgotoguy.com/aai">Read this</a>.</p>
</div>
</div>
      <a class="retweet" href="http://twitter.com/home?status=RT+%40yourgotoguy%3A+10+Steps+to+Removing+Br.it.ney+%2APron%2A+Avatars+and+Spamming+Spammers+from+your++Stream+by+Aut+http%3A%2F%2Fyourgotoguy.com%2Fzv2" rel="nofollow" target="_blank"><img src="http://prettylinkpro.s3.amazonaws.com/tweets/retweet-20.png" border="0" style="border: 0;"/></a>		]]></content:encoded>
			<wfw:commentRss>http://yourgotoguy.com/10-steps-to-removing-br-it-ney-pron-avatars-and-spamming-spammers-from-your-stream-by-automagically-blocking-them/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
