Advertisement
Seb

iptrace.mrc

Seb
Feb 26th, 2014
613
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 2.19 KB | None | 0 0
  1. menu nicklist {
  2.   IP Tracker:dns $$1
  3. }
  4.  
  5. on *:DNS: {
  6.   haltdef
  7.   set %tracknick $nick
  8.   set %trackip  $iaddress
  9.   if ($iaddress == $null) set %trackip $naddress
  10.   set %Body  IP= $+ %trackip $+ &button=Search  ; prepare the body for the POST
  11.   sockopen ip-tracker clientn.free-hideip.com 80
  12. }
  13.  
  14. on *:SOCKOPEN:ip-tracker: {
  15.   if ($sockerr) {
  16.     echo -a Error: $sock(tracert).wsmsg  
  17.   }
  18.   else {
  19.     sockwrite -n $sockname POST /map/whatismyip.php HTTP/1.1
  20.     sockwrite -n $sockname Host: clientn.free-hideip.com
  21.     sockwrite -n $sockname User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0
  22.     sockwrite -n $sockname Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
  23.     sockwrite -n $sockname Accept-Language: en-US,en;q=0.5
  24.     sockwrite -n $sockname Accept-Encoding: gzip, deflate
  25.     sockwrite -n $sockname Referer: http://clientn.free-hideip.com/map/whatismyip.php
  26.     sockwrite -n $sockname Connection: keep-alive
  27.     sockwrite -n $sockname Content-Type: application/x-www-form-urlencoded
  28.     sockwrite -n $sockname Content-Length: $len(%Body)
  29.     sockwrite -n $sockname $crlf
  30.     sockwrite -n $sockname %Body
  31.   }
  32. }
  33.  
  34. on *:SOCKREAD:ip-tracker: {
  35.   if ($sockerr > 0) return
  36.   sockread %ip-tracker
  37.   if $regex(%ip-tracker,/<td><div align="left">Country:([^<>]+)/)   { set %country $regml(1) }
  38.   if $regex(%ip-tracker,/<td><div align="left">Region:([^<>]+)/)    { set %region $regml(1) }
  39.   if $regex(%ip-tracker,/<td><div align="left">City:([^<>]+)/)      { set %city $regml(1) }
  40.   if $regex(%ip-tracker,/<td><div align="left">Latitude:([^<>]+)/)  { set %lat $regml(1) }
  41.   if $regex(%ip-tracker,/<td><div align="left">Longitude:([^<>]+)/) { set %lon $regml(1)
  42.     ; We have collected all that we need
  43.     sockclose ip-tracker
  44.     echo -a 14=-4 %tracknick IP: 2 %trackip
  45.     echo -a 14=-4 LongIP: 2 $longip(%trackip)  
  46.     echo -a 14=-4 Country: 2 %country  
  47.     echo -a 14=-4 Region: 2 %region 14-4 City: 2 %city
  48.     echo -a 14=-4 Latitude: 2 %lat 14-4 Longitude: 2 %lon
  49.     echo -a 14=-4 Link: 2 http://maps.google.com/maps?ll= $+ $remove(%lat,$chr(32)) $+ , $+ $remove(%lon,$chr(32))
  50.     return
  51.   }
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement