IP Locator

By Jagfire on Jul 29, 2008

Finds a user's IP address, assuming their host is not masked. Locates the IP address on the map and displays all of the information available, including country, region/state, and city. To use, right click a user's name in the nicklist and click "Locate."

menu nicklist {
  .Locate:set %ipnick $$1 | checkloc $address($$1,2)
}

alias checkloc {
  var %o = $remove($gettok($1,2,$asc(@)),.)
  if (%o isnum) {
    echo -a 2Nick: %ipnick
    checkip $gettok($1,2,$asc(@))
    halt
  }
  if (%o isalpha) || (*undernetorg iswm %o) {
    echo -at %ipnick $+ 's host/IP is masked! Cannot continue.
    sockclose checkip
    unset %ipadd
    unset %ipon
    halt
  }
  else {
    .dns $1
    set %ipon on
  }
}

alias checkip {
  if (*.*.*.* iswm $1) {
    set %ipadd $1
    sockopen checkip geobytes.com 80
  }
  else echo -at Use /checkip <valid IP address>
}
on *:sockread:checkip:{
  if ($sockerr) {
    echo -a Error.
    sockclose checkip
    unset %ipadd
    unset %ipon
    halt
  }
  else {
    var %', %boo, %get
    sockread %'
    %boo = $z(%')
    %get = $gettok(%',6,$asc("))
    if (*ro-no_bots_pls13* iswm %') echo -a 2Country: %get
    if (*ro-no_bots_pls15* iswm %') echo -a 2Region/State: %get
    if (*ro-no_bots_pls17* iswm %') echo -a 2City: %get
    if (*</html>* iswm %') {
      sockclose checkip
      unset %ipadd
      unset %ipon
      halt
    }
  }
}
on *:DNS:{
  if (%ipon == on) {
    checkip $dns(1).ip
    echo -a 2Nick: %ipnick
    unset %ipnick
  }
}
alias -l z {
  var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x,&nbsp;)
  return %x
}

on *:sockopen:checkip:{
  sockwrite -n $sockname GET /IpLocator.htm?getlocation&ipaddress= $+ %ipadd HTTP/1.1
  sockwrite -n $sockname Host: geobytes.com $+ $crlf $+ $crlf
}

Comments

Sign in to comment.
masterlatino   -  Mar 21, 2010

How make for the results are in a single line ?: Nick Country State City <Los Ángeles>

 Respond  
Techlover   -  Feb 18, 2009

ok, i did a click on user name & it says Nick : "user name" don't get anything else...

 Respond  
Techlover   -  Feb 18, 2009

Hi, I have loaded this script using Alt R, now how do I find the IP add & location of a nick? Please guide.

 Respond  
sunslayer   -  Oct 26, 2008

good job but whenever i locate someone it returns with
2Nick: nick
2Country: United States
2Region/State: Colorado
2City: Arvada

 Respond  
AlexHopper   -  Oct 26, 2008

Good job

 Respond  
rsb   -  Aug 17, 2008

Nifty

 Respond  
SweeTCooL   -  Aug 08, 2008

Hmmm Do have Somthing like That u Can Find It From The Domain Not The Reall Ip Addres ??

 Respond  
Eugenio   -  Aug 01, 2008

Its alright

 Respond  
mostafa_basha   -  Aug 01, 2008

its awesome man

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.