Saturday, October 29, 2005

another sms script

this works with a gprs router/modem attched to your box. can be easily modified to work with mobile phones as well. just replace the telnet part with maybe with a serial connection or connect throug bluetooth. then use the AT commands. In this case I am using a SARIAN 2000 Series EDGE Router, connect through eth. the script here works with xchat. so ppl just need to send you the msg !sms number message

#!/usr/bin/perl
#sms send script from xchat by darkm00n

use Net::Telnet ();

IRC::register("darkm00nSMS",1.0,"","");

IRC::add_message_handler("PRIVMSG", "privmsg_handler");
IRC::print("[darkm00n SMS Loaded]");

sub privmsg_handler {
$irc_message = shift(@_);
$irc_message =~ ~ /:(.*)!(.*@.*).*(#.*) :(.*)/;
$irc_nick = lc $1;

my @msgs = split(' ', $irc_message);

if ($msgs[3] eq ":!sms") {
$t = new Net::Telnet (Timeout => 10, Prompt => '/ss32263>/');
$t->open("192.168.0.99");
$t->login("username","password");
$words = @msgs;

$text= " ";
for ($r=5;$r<=$words;$r++){
$text = $text . " " . $msgs[$r];
}

$number = $msgs[4];
@lines = $t->cmd('sendsms '. $number . ' "'. $text . ' - darkm00n sms script-"');
$t->close;
sleep(1);
IRC::print(@lines);
}

return 0;
}

Tuesday, October 18, 2005

thaana for xchat


was in IRC tonight; and thought i'd have some fun with perl. so here is a little perl script for xchat which you can use to type in thaana. you need to have a thaana unicode font installed. then after you load this perl script. type /thaana swlWmc. might be useful.

---------------------- xcthaana.pl-------------------------------------------------

#!/usr/bin/perl -w

## thaana for x-chat
## v1.0 by darkm00n

IRC::register("thaana", "1.0", "", "");
IRC::print("[thaana Loaded]");
IRC::add_command_handler("thaana", "thaana");


sub thaana
{
$in=shift;
$out="";
for ( $i=0; $i <= length($in); $i++){
$_=substr($in,$i,1);
#convert thaana
if ("A" eq $_ ) { $_ = "\x{07A2}"; };
if ("B" eq $_ ) { $_ = "\x{079E}"; };
if ("C" eq $_ ) { $_ = "\x{0797}"; };
if ("D" eq $_ ) { $_ = "\x{0791}"; };
if ("E" eq $_ ) { $_ = "\x{07AD}"; };
if ("F" eq $_ ) { $_ = "\x{079F}"; };
if ("G" eq $_ ) { $_ = "\x{07A3}"; };
if ("H" eq $_ ) { $_ = "\x{0799}"; };
if ("I" eq $_ ) { $_ = "\x{07A9}"; };
if ("J" eq $_ ) { $_ = "\x{079B}"; };
if ("K" eq $_ ) { $_ = "\x{079A}"; };
if ("L" eq $_ ) { $_ = "\x{0785}"; };
if ("M" eq $_ ) { $_ = "\x{0789}"; };
if ("N" eq $_ ) { $_ = "\x{078F}"; };
if ("O" eq $_ ) { $_ = "\x{07AF}"; };
if ("P" eq $_ ) { $_ = "\x{0795}"; };
if ("Q" eq $_ ) { $_ = "\x{07A4}"; };
if ("R" eq $_ ) { $_ = "\x{079C}"; };
if ("S" eq $_ ) { $_ = "\x{0781}"; };
if ("T" eq $_ ) { $_ = "\x{0793}"; };
if ("U" eq $_ ) { $_ = "\x{07AB}"; };
if ("V" eq $_ ) { $_ = "\x{07A5}"; };
if ("W" eq $_ ) { $_ = "\x{07A7}"; };
if ("X" eq $_ ) { $_ = "\x{0798}"; };
if ("Y" eq $_ ) { $_ = "\x{07A0}"; };
if ("Z" eq $_ ) { $_ = "\x{07A1}"; };
if ("a" eq $_ ) { $_ = "\x{0787}"; };
if ("b" eq $_ ) { $_ = "\x{0784}"; };
if ("c" eq $_ ) { $_ = "\x{07B0}"; };
if ("d" eq $_ ) { $_ = "\x{078B}"; };
if ("e" eq $_ ) { $_ = "\x{07AC}"; };
if ("f" eq $_ ) { $_ = "\x{078A}"; };
if ("g" eq $_ ) { $_ = "\x{078E}"; };
if ("h" eq $_ ) { $_ = "\x{0780}"; };
if ("i" eq $_ ) { $_ = "\x{07A8}"; };
if ("j" eq $_ ) { $_ = "\x{0796}"; };
if ("k" eq $_ ) { $_ = "\x{0786}"; };
if ("l" eq $_ ) { $_ = "\x{078D}"; };
if ("m" eq $_ ) { $_ = "\x{0789}"; };
if ("n" eq $_ ) { $_ = "\x{0782}"; };
if ("o" eq $_ ) { $_ = "\x{07AE}"; };
if ("p" eq $_ ) { $_ = "\x{0795}"; };
if ("q" eq $_ ) { $_ = "\x{07A4}"; };
if ("r" eq $_ ) { $_ = "\x{0783}"; };
if ("s" eq $_ ) { $_ = "\x{0790}"; };
if ("t" eq $_ ) { $_ = "\x{078C}"; };
if ("u" eq $_ ) { $_ = "\x{07AA}"; };
if ("v" eq $_ ) { $_ = "\x{0788}"; };
if ("w" eq $_ ) { $_ = "\x{07A6}"; };
if ("x" eq $_ ) { $_ = "\x{079D}"; };
if ("y" eq $_ ) { $_ = "\x{0794}"; };
if ("z" eq $_ ) { $_ = "\x{0792}"; };
$out=$out.$_;
}
IRC::command($out);
return 1;
}

Saturday, October 15, 2005

released?

ever been in jail? i have once; for like 17 days. when i came out it was a feeling of freedom; but what i feel now is beyond that too. just for some reason i feel free! but sad part is freedom too comes with responsibilities. i’ve like spend a few years in a state of mind; from which i am free now. i hope :)

just one wish; want to enjoy this for a while; and catch up on TV and books, etc. Why? its not the time; but it’s the state of mind in which you dive into them. self confidence is the next thing which needs to be patched. my version is buggy. when you are told for a long time that everything you do is wrong, and nothing will be right; you start to believe it. now thats not a very good thing ey? anyway wish me luck. i am no more scared or pissed; just happy and optimistic. i really do feel good. :P

14 years from now; my work is done. if i live long enough. i guess you have to go through bad to get to good. as one of my very good friend says; all ugly things are made by people who are trying to make something beautiful, i can’t remember the real words though. so its a stage in life and a process where you just experience hurt, guilt, frustrations, etc... but important thing i always believed in was not to give up. never to give up on what you believe and whom you love. don’t let them down or give up on them, and never to bring your own selfish reasons for an excuse to dump or hurt them. end of the day; they are what reflects you, and who will be your strength. somethings are momentary; like money, sex, fame and etc. if one decides to hang on to it and seek it; then i guess all hopes are gone. one day you will wake up; and realize what you have lost. worst part is then it’s too late. days pass by for each of us. we won’t be the same in 20 years.

one good experience i’ve learned is don’t hold on to people who don’t hold on to others. if someone who comes to you by dumping someone else, will do the same to you too. look for people who have a moral and have ethics. who are willing to sacrifice their own happiness over their own self. never depend on someone who is self centered; trying to hold on to people like this will result in a major chaos. if you don’t love you own family; you won’t love anything else. no matter what you say or do. now i am happy to know i have a family whom i can always depend on and have learned so much from. now the challenge is to make my children feel the same and say the same. damn!

Sunday, October 09, 2005

To Java or NOT to Java?

I have been grinding my brain off over a simple issues. But I wonder if it’s simple anymore. By tomorrow I need to decide on If I would say Java is my choice for corporate development or Mirco$oft dot Net. Now this is way too simple if it was a personnel choice, I would say Java. Why Java. hey! it’s cool too. Java simple is cool thats the first things. But there is a lot more then Java being a cool platform. Things I like about Java include, starting from source code for the core libraries being open. I still feel Java us a better platform then ASP when it comes to Web Services and preferred by more people. Better integration with SQL servers like Oracle in terms of things like writing of stored procedures. Java is more future proof unlike M$ stuff; example codes written in VB 6 is now old and can’t be easily ported to dot Net. When doing stuff beyond forms and windows, dot Net just can’t beat Java. Java runs on other planets, dot Net has yet to leave Terra Firma; stupid reason but it’s the fact. Good integration and support with UML tools.

I can go; but the sad part is with all these advantages; who will develop the applications in Java her in Maldives? I am finding it hard to get even developers to do simple php stuff; keep aside Java. So just wondering if I decide to make Java I guess it’s cool and good; but not practical. But lets see; to now Java is the choice.... HELP!

Wednesday, October 05, 2005

Dieting season

Dieting season has start. today is the second day of the season of this year. yesterday couple of us sat in front of my apartment; watching the bikes hiss by. Man male’ sure has a lot of people compared to the land space we have; unbelievable.

Allmost everyone gets all ready for a bike ride around 5 and there is a continuous flow of guys until the magrib prayer calls. As the time closes by; you’d find some crazy guys speeding down. I guess it’s the hunger that drives. Few girls come out at this time; as it’s assumed they are busy preparing food for the final call. So it’s not much of a show to watch. People are active and this is the health time of the year. you diet all day; and at night you go for sports. Biggest difference you will notice is we don’t get people smoking out on the roads during the day (except for a few whom I know); and everyone has an excuse to be carefree and angry.

Sunday, October 02, 2005

Paul Allen's Octopus in Maldives

Billionaire Paul Allen (Microsoft's co founder) owns the world's largest yacht (it's more like a cruise liner) and cost a whopping $200 million. I was told by a friend last week that it's here in Maldives. Today I saw it near male' just off feydhoo finolhu. hmmmmm! Software surely pays off.

Anyway here is some info about the Octopus
Octopus cost Allen over US$200 million and has Permanent crew of 60, including several former Navy Seals.It has two helicopters, seven boats, a 10 man submarine and a remote controlled vehicle for crawling on the Ocean floor. The submarine has the capacity to sleep eight for up to two weeks underwater.

On average, owners must spend a minimum of 10 percent of the purchase price every year to keep these yachts in good working condition and cover crew salaries. Therefore “Octopus” which cost Allen US$200 million requires a US$20 million annual budget.