Hack

Launch Your Own Twitter Bot (PHP, Python, Ruby)

Tuesday, July 14th, 2009 | code, Hack, Mashup, Open Source, RSS, Tools, Twitter | 2 Comments

reddy-robot.jpg

If you use twitter you’ve undoubtably come across a twitter bot, sadly there’s a very good chance it was because it was spamming you. In this post I’ll provide you with all the tools, source code and know-how to be able to build and launch your own twitter bot, and i’ll even give you resources to do it in the programming language of your choice. Why? Because there are so many positive uses for a twitter bot….including anti-spam! Go take a look at the twitter tag project for some good examples of bots currents on twitter if you’re not able to come up with any on your own.

First, if you’d like to fool around with an automated bot on twitter but lack the technical knowhow, go pay a visit to the Botomatic site. There you can create your own bot using their easy-to-use GUI. It’ll take you two seconds and you will be up and running.

If you’re a beginner, have no fear there’s a pre-configured setup for you as well. Go download and install the Twitterbotscript from Tyler Colwell. It’s 100% free and was coded to include a helpful GUI to control the bot functionality. It’s actually a pretty cool package that uses the API. I’ve taken a lot of his code and re-used it in various test bots of my own so i’d definitely recommend anyone looking to script their own bot in PHP to download his app.

Now for the PHP programmers out there, the first example of a great PHP5 twitter bot framework is from the folks over at ohloh.net (Jason Allen and Scott Collison). This one is setup to allow you to search and retweet what you’ve found.

If you’d like to incorporate Jabber/XMPP into the bot (that way you can access it via gchat), then there’s a great tutorial over on jazzychad.com. Tenderapp.com has on their blog a PHP tutorial with full source-code for a twitter bot that will look up the traffic conditions and tweet them when messaged. This one also has a walk-through for getting it up on xmpp/jabber. Here’s the source for a similar bot that looks up the weather and retweets it on command.

If you’d like to setup a twitter bot using Python, Halotis.com has a great tutorial that uses a sqlite backend to keep track of what it’s messaged. For a more elaborate version of an automated bot using python, there’s a script over on the flowingdata.com blog that also incorporates a local mail server to send and receive messages to the bot.

Last but not least, all of you Ruby folks….here’s a Twitter Ruby Gem to go along with the Twitter4R and Twitter Ruby Gems already found in the library. The site also takes you through a few different commands available with this new gem. For complete source-code of a twitter bot written in Ruby, head on over to this snippet of a Ruby RSS Twitter Bot.

Easy as pie and now you’ve got your very own automated twitter bot!

Share with your friends: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Reddit
  • StumbleUpon
  • Slashdot
  • DZone
  • BlinkList
  • Furl
  • MisterWong
  • Spurl
  • Propeller
  • Folkd
  • Sphinn

Tags: , , ,

Twitter Exploit – User Was Able To Register @hOME

Monday, July 6th, 2009 | Hack, Twitter, Unusual | No Comments

twitter_home_serp
I did a google search for ‘twitter’ the other day and the strangest result showed up as #2. Look at the way home was spelled = hOME….
That was odd for a number of reasons, the biggest being that the URL alias for your profile page (if you’re logged in to your twitter account) is www.twitter.com/home. Twitter has never (to the best of my knowledge) been caps sensitive, meaning that if you registered your username as @tonythetiger, you could capitalize it in any way, shape or form and it will still always take you to the same page.

BUT! If you go visit that url ( twitter.com/hOME), you’ll find that it’s a dormant account that just so happens to have 28k+ followers! Now just for comparison go and try to visit twitter.com/home. See what I’m talking about! It takes you to either your profile page or the main twitter.com homepage!

Here’s another oddity about this account – 95% of @hOME’s followers joined twitter.com on one of two days. Strange coincidence don’t you think?

screenshot_03

So what I’m guessing happened was a potential spammer discovered that twitter allowed him to register @hOME so he loaded up 28k of new twitter accounts to make it look like it was a popular user. What happened after that is anybody’s guess, the twitter account has 0 tweets and isn’t following anyone back. If you know anything about this account, please tell us more!

Share with your friends: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Reddit
  • StumbleUpon
  • Slashdot
  • DZone
  • BlinkList
  • Furl
  • MisterWong
  • Spurl
  • Propeller
  • Folkd
  • Sphinn

New Twittercut Worm Targets The Desperate

Wednesday, May 27th, 2009 | Hack, News, Twitter | No Comments

Twittercut worm

A new twitter worm is running rampant through the microblogging community infecting those who are easily enticed with the idea of gaining more followers. It’s actually very simple, all it does it tweet out to the infected hosts followers, “OMG I just got over 1000 followers today from http://twittercut.com.” Anyone who visits the site will be prompted to enter their twitter login credentials in order to “access the twittercut tool” however upon submitting the info it then just goes and mass-tweets to all of your followers and the cycle continues. Playing of the desperation many seem to have when it comes to becoming ‘popular’ on the network, A twitter search pulled up thousands of folks who fell victim to this trap.
If you see one of your friends twittering “OMG I just got over 1000 followers today from http://twittercut.com”, you might want to tell them to change their password ASAP before it’s changed for them.

So the source of twittercut apparently is a Twitter user named JordanEmbry. It’s also the same name used on the whois records for the twittercut.com domain. Twitter has already disabled his account but using the Google cache you can still see the profile + recent tweets. You’d have to be a moron to use your real info on a scam like this, so I can’t imagine this is really the culprit.

He’s hosting it on free-webhost 110MB.com, so I just sent them a message letting them know about the TOS/Abuse Violation… hopefully they’ll take the site down soon.

Share with your friends: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Reddit
  • StumbleUpon
  • Slashdot
  • DZone
  • BlinkList
  • Furl
  • MisterWong
  • Spurl
  • Propeller
  • Folkd
  • Sphinn

Tags: , , , , ,

Track Swine-Flu On Google Maps!

Tuesday, April 28th, 2009 | google, Hack, Mashup, News | No Comments

pig
Thanks to a quick mash-up, you can now track the out-break of Swine Flu via Google Maps. AHHHHHHHH it’s getting closer!!

Google Maps Swine Flu Updates

Share with your friends: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Reddit
  • StumbleUpon
  • Slashdot
  • DZone
  • BlinkList
  • Furl
  • MisterWong
  • Spurl
  • Propeller
  • Folkd
  • Sphinn

Tags: , , , ,

Google.com Shows Up As Malware!

Saturday, January 31st, 2009 | google, Hack, News, Unusual | No Comments

google_malware

This morning it seems that all of a sudden every result in the US-based Google.com search engine now is tagged as being Malware, even prompting users to not visit the site due to potential harm to their computer. This includes searches for Google.com (which also for some reason are showing Google ads in Spanish).

Google Fail.

Share with your friends: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Reddit
  • StumbleUpon
  • Slashdot
  • DZone
  • BlinkList
  • Furl
  • MisterWong
  • Spurl
  • Propeller
  • Folkd
  • Sphinn

Tags: , ,

Other Places You Can Find Me: