After passing up on the idea of writing scripts to message my friends on yahoo messenger many times, i finally decided to research if there’s a quick and dirty way. As always, to do some off-beat thing like this, my order of action is…..
- search on sourceforge is some wise guy has already done it before
- search on cpan if there is a perl module which is close to what i need
- search for c++/java programs which are close
- postpone till i get the same idea again
In any case, as for connecting to yahoo, my mega-plan was to write a small perl script to fool my friends into believing they are chatting with some hot girl/guy (yep, just like that ebaumsworld aim prank). So how does it work……
- create a few (3-4) yahoo accounts
- find a good chat bot, there’s a whole bunch of them these days……there’s actually a good competetion called the chatter box challenge (http://www.chatterboxchallenge.org). there are some pretty good chat bots in there.
- find a way to interface with yahoo messenger
- redirect input/output between the chatbot and yahoo messenger, so that ppl on yahoo think they are chatting with humans when they are actually talking to a bot
Ok, that sounds easy…..but try and find a open source chat bot….its a little hard because they are always in c++ and have all kinds of neural networks/markov model/other AI stuff. Luckily, we don’t care as we will try and use the web versions of those chat-bots. Some of the bots use flash/frames/etc in their websites, we want to avoid those. Instead look for a simple one like Ultrahal (www.ultrahal.com); this bot has a really nice simple interface, where everything is posted to a ASP form (http://www.ultrahal.com/halrep/UltraHal.asp?WCI=Chat).
Using the “Tamper Data” extension in firefox, it is fairly easy to see what variables are being posted. All said and done, I was able to post and receive a chat message back using LWP (in perl) fairly easily.
The next thing to do is to figure out a way to interface with YM. Now, a quick search on CPAN brings up a library or two which do just that. The primary one seems to be Net::Yahoo-Messenger.
To be continued…..