Jump to content

[WORKING] !lookup (!trace) script, shows Country & City !!!!


DiZuM

Recommended Posts

Ok,

I have just finished my !lookup script (You can run this one with Lil Toady's trace script!) what shows City & Country. That may be usefull, i dont know, but however it works :D I spent lot of my time to do it working, and it works now... Quite fast too. Ok, there it is:

on *:SIGNAL:mta.command:{
 var %a = $iif((!$4),$2,$iif($mta.getid($1,* $+ $4 $+ *),$v1,$2))
 if ($3 == !lookup) do.lookup $1 %a
}
alias do.lookup {
 set %do.lookup $1 $2
 if (!$sock(do.lookup $+ $mta.ip($1,$2))) sockopen do.lookup $+ $mta.ip($1,$2) api.hostip.info 80
}
on *:SOCKOPEN:do.lookup*:{
 tokenize 32 %do.lookup
 if ($sockerr > 0) {
   sockclose $sockname
   mta.text $1 Trace: An error has occured.
 }
 else {
   sockwrite -n $sockname GET /get_html.php?ip= $+ $mta.ip($1,$2) $+ &display=whois HTTP/1.1
   sockwrite -n $sockname User-Agent: MSIE 6.0
   sockwrite -n $sockname Host: api.hostip.info
   sockwrite $sockname $crlf
 }
}
on *:SOCKCLOSE:do.lookup*:{
 unset %tr.*
}
on *:SOCKREAD:do.lookup*:{
 var %t
 sockread %t
 if (Country isin %t) {
   tokenize 32 %do.lookup
   mta.text $1 $mta.nick($1,$2) 's Country: $gettok(%t,2-,58)}
}
 elseif (City isin %t) {
   tokenize 32 %do.lookup
   mta.text $1 $mta.nick($1,$2) 's City: $gettok(%t,2-,58)}
   sockclose $sockname
 }
}
on *:SIGNAL:mta.command: {
 if ($3 == !sanzor) {
   mta.text $1 SanZoR pWnZ 24/7 !!! 
   mta.pm $1 $2 Im sure you know that!
}

If you want, you can remove that !sanzor script, but i hope you not :D

Btw, that database what this script use, is not very big. It wont shows everyone's City/Country alltime. Sometimes you got unknown city / country. But usually it shows them both right. Thats why i make it working with Lil Toadys !trace script, cause its better to show country.

Well... I hope you like it :wink:

- SanZoR a.k.a DiZuM

Link to comment

There wasnt really any need to try tho, it worked fine b4, he just changed a few words and calls it his own.

Its not even bug free, it has errors. I know its kinda harsh moaning about it, but imagine if u had sat and wrote this script, spent maybe an hour making it, for the public, only for some1 to rob it, change a few commands then repost it as their own. i know he mentioned toadys name etc, but im sure he wasnt asked.

Link to comment
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...