18 Jul 2008

Project Honeybot

Twitter is a great platform for expressing ideas and keeping up with what is going on in the world, but there is also a downside and thats spam. There seems to be alot of twitter users which are just spam bots they just keep following people hopeing to sell you viagra. I think I have found away to name and shame them.

Enter Honeybot

Honeybot is my counter defense to this, what it does is constantly posts to the public time line a warning not to follow it. Now I believe that spambots constantly scrape the public timeline and follow whoevers on there. So they should in theory follow Honeybot automaticly.

The second thing it does is keeps a record of its followers, allowing me to create a public blacklist of it's followers.

Creating a Blacklist of Spambots

What I intend to do is post the list of followers on my website where people can see if they are being followed by spammers. It's basicly a copy of the xml file of followers you can obtain from the twitter API, but I am going to parse it into a more readable format.

Source Code

below is a copy of the source code so you can see how it works:

#!/usr/bin/perl -w
## Honeybot - This bot attempts to attract spam bots and creates a spambot blacklist
## James Januszka, 2008, http://blog.jamesjanuszka.com
##
use strict;
use LWP;
use LWP::Simple;
use URI;
my $agent ='Honeybot/0.1';my $statusurl = 'http://twitter.com/statuses/update.xml';
my $followerurl = 'http://twitter.com/statuses/followers.xml?lite=true';
my $server ='twitter.com:80';
my $realm ="Twitter API";
my $username = "enteryourusername";
my $password ="enteryourpassword";
my $file="followers.xml";
my $string ="Please do not follow this bot as any followers will be added to the blacklist. See http://tinyurl.com/5bomg4 for more details.".int(rand(100000));
my $browser = LWP::UserAgent->new(agent =>$agent);
$browser->credentials($server,$realm,$username=>$password);
print "Content-type: text/html\n\n";

&updatestatus();
&getfollowers();

sub updatestatus {
my $response =$browser->post($statusurl,['status'=>$string]);
die "OMG, WTF: ",$response->header('WWW-Authenticate'), $response->status_line unless $response->is_success;
}

sub getfollowers {
system("wget --http-user=$username --http-passwd=$password -O $file -U $agent $followerurl");
}

I hope that this will be a useful service for twitter users, if you have any comments about how I can improve Honeybot let me know.

11 Jul 2008

Creative Commons and Flickr

Owl at Southend Airshow 2008 I have just opened an account at Flickr so I can upload some photos to it. One of the reasons I choose Flickr, is that you have the option of registering your images photos under a Creative Commons License(CC), instead of them being copyrighted by default.

Copyright v Creative Commons

Traditionally people have wanted to protect their ideas and artworks, this enables them to retain control of who does what with their property. Copyright works in this area, and is the norm in commercial circles. Nowadays people are writing blogs and uploading their photos to various social media websites. CC allows people to use other peoples media on their blogs, whilst still giving the owner of the media some rights on how their media is used.

Creative Commons Licenses

The thing with CC is it allows you to set various levels of restrictions on your work. Below is a brief summary of each license copy & pasted from http://creativecommons.org/about/license/.

Attribution (by)

This license lets others distribute, remix, tweak, and build upon your work, even commercially, as long as they credit you for the original creation. This is the most accommodating of licenses offered, in terms of what others can do with your works licensed under Attribution.

Attribution Share Alike (by-sa)
This license lets others remix, tweak, and build upon your work even for commercial reasons, as long as they credit you and license their new creations under the identical terms. This license is often compared to open source software licenses. All new works based on yours will carry the same license, so any derivatives will also allow commercial use.

Attribution No Derivatives (by-nd)
This license allows for redistribution, commercial and non-commercial, as long as it is passed along unchanged and in whole, with credit to you.

Attribution Non-commercial (by-nc)
This license lets others remix, tweak, and build upon your work non-commercially, and although their new works must also acknowledge you and be non-commercial, they don’t have to license their derivative works on the same terms.

Attribution Non-commercial Share Alike (by-nc-sa)
This license lets others remix, tweak, and build upon your work non-commercially, as long as they credit you and license their new creations under the identical terms. Others can download and redistribute your work just like the by-nc-nd license, but they can also translate, make remixes, and produce new stories based on your work. All new work based on yours will carry the same license, so any derivatives will also be non-commercial in nature.

Attribution Non-commercial No Derivatives (by-nc-nd)
This license is the most restrictive of our six main licenses, allowing redistribution. This license is often called the “free advertising” license because it allows others to download your works and share them with others as long as they mention you and link back to you, but they can’t change them in any way or use them commercially.

In summary I believe that if more people are aware of CC both media owners and media users, then this will have a positive effect as blog writers will use more good quality media in their blogs.