Domain Whois Lookup — File Browser

DomainWhoisLookupv1.2 / DomainWhoisLookupv1.2 / whois / whois.mrc

whois.mrc — 3.72 KB — Download this file

;###                                                                                                
;##                        XciD²ºº³ Whois Lookup Utility                                         
;#                                      Author: fachos                             
;
alias whoisD { if ($dialog(whoisD) == $null) { dialog -dm whoisD whoisD } } 

dialog WhoisD {
  title "XciD - Domain Whois Utility v1.2"
  size -1 -1 365 354
  icon $mircdir\whois\whois.ico, 0
  button "&CLOSE", 200, 285 329 74 22, flat cancel
  text " HostName / IP :", 10, 20 25 100 15, right
  edit "www.", 12, 124 23 220 22
  combo 13, 125 48 219 200, edit drop 
  text " DataBase From :", 11, 19 51 100 15, right
  list 15, 18 76 329 219, hsbar vsbar 
  button "clear screen", 20, 90 297 81 16, flat
  button "&Whois!", 24, 192 295 155 22, push flat
  box "Domain Whois Lookup", 16, 4 5 358 319
  text "©2003 - 2004 by fachos", 17, 22 332 125 16, disable
}
on 1:DIALOG:WhoisD:init:0: {
  var %nSCount = 0
  while (%nSCount < $ini($mircdir\whois\Internic.ini,0)) {
    inc %nSCount
    did -a WhoisD 13 $ini($mircdir\whois\Internic.ini,%nSCount)
  }
  did -c WhoisD 13 1
  did -a WhoisD 15 ?: If Hostname or IP not show up...
  did -a WhoisD 15 ?: Change the Database and try again.
  did -a WhoisD 15
  did -a WhoisD 15 0: READY
  did -a WhoisD 15 

  if (%online.DomWhoisHost != $null) did -ra WhoisD 12 %online.DomWhoisHost
  unset %online.DomWhoisHost
}

on 1:DIALOG:WhoisD:sclick:20: { did -r WhoisD 15 }
on 1:DIALOG:WhoisD:sclick:8: { did -r WhoisD 15 }

on 1:DIALOG:WhoisD:sclick:24: {
  if ($did(WhoisD,12).text == $null) { did -a WhoisD 15 0: Please enter or paste an IP/Hostname  | did -c WhoisD 15 $did(WhoisD,15).lines | return }
  did -b WhoisD 24
  did -r WhoisD 15
  did -a WhoisD 15 Whois from $did(WhoisD,13).text for $did(WhoisD,12).text
  did -c WhoisD 15 $did(WhoisD,15).lines
  .enable #WhoisD | .dns $did(WhoisD,12).text
}

on 1:DIALOG:WhoisD:sclick:200: { unset %cWhoisD.* | sockclose WhoisD }

#WhoisD off
on 1:DNS: {
  set %cWhoisD.numip $deltok($iaddress,-1,46)
  set %cWhoisD.alphaip $deltok($naddress,1,46)
  did -a WhoisD 15 Resolved DNS lookup $did(WhoisD,12).text -> $raddress
  did -a WhoisD 15 Target domain : $iif(%cWhoisD.alphaip == $null,unknown,%cWhoisD.alphaip)
  did -a WhoisD 15
  WhoisD.Doing
  .disable #WhoisD
}
#WhoisD end

alias WhoisD.Doing {
  var %cWhoisDServer = $did(WhoisD,13).text
  var %cWhoisDServerPort = $readini $mircdir\whois\Internic.ini $did(WhoisD,13).text Port
  if (%cWhoisDServerPort == $null) var %cWhoisDServerPort = 43

  sockclose WhoisD
  sockopen WhoisD %cWhoisDServer %cWhoisDServerPort

  did -e WhoisD 24
}

on 1:SOCKOPEN:WhoisD:  {
  if ($sockerr > 0) { sockclose $sockname | did -a WhoisD 15 0: Sorry, cannot connect the Database... | did -c WhoisD 15 $did(WhoisD,15).lines | return }
  var %cWhoisDServerMetod = $readini $mircdir\whois\Internic.ini $did(WhoisD,13).text Metod
  var %cWhoisDServerMetod = $iif(%cWhoisDServerMetod == IP,%cWhoisD.numip,%cWhoisD.alphaip)
  var %cWhoisDServerMetod = $iif(%cWhoisDServerMetod == $null,%cWhoisD.numip,%cWhoisDServerMetod)
  sockwrite -tn $sockname %cWhoisDServerMetod
}

on 1:SOCKREAD:WhoisD:  {
  if ($sockerr > 0) { sockclose $sockname | did -a WhoisD 15 0: Sorry, Database read conflict. Procedure canceled. | did -c WhoisD 15 $did(WhoisD,15).lines | return }
  :nextread
  sockread %cSockData
  if ($sockbr == 0) return
  if (%cSockData == $null) set %cSockData $chr(32)
  did -a WhoisD 15 %cSockData $chr(32)
}

on 1:SOCKCLOSE:WhoisD:  {
  did -a WhoisD 15
  did -a WhoisD 15 0: READY
}
menu status,menubar {
  Domain WhoisD
  .Lookup: WhoisD
  .-
  .Unload: unload -rs whois\whois.mrc 
}