#Shax@Quakenet.org

Home­FAQ­Search­Memberlist­Usergroups­Register­Log in
Share | 
 

 /whoisip <IP>

View previous topic View next topic Go down 
AuthorMessage
capurro



Posts: 8
Join date: 2008-12-14
Age: 19
Location: TÜRKEY C*

PostSubject: /whoisip <IP>   Tue Dec 16, 2008 4:41 pm

Code:
; IP WHOIS INFORMATION v0.2 by magic <magic@mirc.net>
; ---------------------------------------------------
; To use the addon load it in your copy of mirc: /load -rs whoisip.mrc
; and to use the addon type /whoisip IP/HOST/NICKNAME in any window and
; the result should echo into yoru active window.
; You are free to use this code any way you want aslong you give me credit for it.
; A special thanks to tidy_trax for his recomendations and $regex help.
 
alias whoisip {
  sockclose whois
  if ($regex($1,/^(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})$/))  {
    sockopen whois whois.cyberabuse.org 43
    set %whois.ip $1-
  }
  if (!$regex($1,/^(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})$/)) {
    .enable #DNS
    .dns $1-
  }
}
 
#DNS on
on *:DNS:{
  if ($dns(0).ip) {
    set %whois.ip $dns(0).ip
    sockopen whois whois.cyberabuse.org 43
  }
  else {
    echo -ac Info Invalid ip, host or nickname.
  }
  .disable #DNS
  halt
}
#DNS end
 
on *:sockopen:whois: {
  if ($sockerr) {
    echo -a Unable to connect to whois server.
    sockclose whois
  }
  else {
    sockwrite -nt whois %whois.ip
  }
}
 
on *:sockread:whois: {
  sockread %data
  if %data {
    if (%data == % http://www.cyberabuse.org/whois/)  {
      sockclose $sockname
      echo -a 
      echo -a Data from the CyberAbuse Whois Server
      echo -a Copyright 2003-2004, Philippe Bourcier
      echo -a http://www.cyberabuse.org/whois/
    }
    if (% $+ * !iswm %data) {
      echo -a %data
    }
  }
}
Back to top Go down
View user profile http://www.capurro.tk
 

/whoisip <IP>

View previous topic View next topic Back to top 
Page 1 of 1

Permissions of this forum:You cannot reply to topics in this forum
#Shax@Quakenet.org :: MSL-