IRcap — File Browser

ircap871-mircscripts_2799 / ircap871-mircscripts_2799 / s / util / g-infodom.mrc

g-infodom.mrc — 2.53 KB — Download this file

;IRcap8 a8c1236f4938cff78c0f1375a5b212fe

on 1:load: if (%tmp.ss1) infodom %tmp.ss1 | else { var %a = $?=" $mg(ipdom) " | if ($len(%a) > 0) infodom %a | else infodom.sale }

alias INFODOM {
  %infodom.servers = whois.networksolutions.com 43 no matchçwhois.ripe.net 43 no entries foundçwhois.lacnic.net 43 Not assigned to LACNICçwhois.apnic.net 43 Not allocated by APNICçwhois.arin.net 43 no matchçwhois.nic.mil 43 no matchçwhois.nic.gov 43 no matchçwhois.apnic.net 43 no entries found
  .enable #infodom | .dns $$1
}

#infodom off
on 1:DNS: {
  .disable #infodom
  %infodom.dom = $iaddress
  if %infodom.dom == $null { echo -se IP not resolved | INFODOM.sale | halt }
  %infodom.host = $naddress
  window -c @infodom | window -hk @infoDOM 100 50 500 700
  %infodom.sn = 0
  echo -s 2Whois IP:12 %infodom.dom 3( %infodom.host )
  if (.com isin %infodom.host) || (.net isin %infodom.host) || (.org isin %infodom.host) {
    var %temp.ntk = $numtok(%infodom.host,46)
    %infodom.nic = $gettok(%infodom.host,$calc(%temp.ntk - 1),46) $+ . $+ $gettok(%infodom.host,%temp.ntk,46)
  }
  infodom.con
}
#infodom end

alias INFODOM.con {
  inc %infodom.sn 1 | %infodom.serv = $gettok(%infodom.servers,%infodom.sn,231)
  if %infodom.serv == $null { echo -s No data for %infodom.dom ( %infodom.host ) | raya | INFODOM.sale | halt }
  sockclose INFODOM | sockopen INFODOM $gettok(%infodom.serv,1,32) $gettok(%infodom.serv,2,32)
  %infodom.ok = ok
  echo -s >> $gettok(%infodom.serv,1,32) ...
  clear @infodom | echo @infodom Whois IP: %infodom.dom ( %infodom.host )
}

on 1:sockopen:INFODOM: {
  if $sockerr > 0 { .timer 1 1 infodom.con | echo -s Can't connect: $gettok(%infodom.serv,1,32) | return }
  if (networksolu isin %infodom.serv) && (%infodom.nic != $null) { sockwrite -tn INFODOM %infodom.nic }
  else sockwrite -tn INFODOM %infodom.dom
}

on 1:sockread:INFODOM: {
  sockread %tnet | if %tnet == $null { set %tnet  }
  if $gettok(%tnet,1,32) == COUNTRY: { %infodom.pais = $readini s\irsys\paises.txt paises $gettok(%tnet,2,32) }
  echo @infodom  $+ %tnet
  if ($gettok(%infodom.serv,3-99,32) isin %tnet) || (The whole IPv4 address space isin %tnet) { set %infodom.ok NO }
  unset %tnet
}
on 1:sockclose:INFODOM: {
  if %infodom.ok == ok { echo @infodom - | echo @infodom  $+ %infodom.pais | echo @infodom DataBase: $gettok(%infodom.serv,1,32) | window -a @infodom | raya | sss wina | INFODOM.sale | halt }
  .timer -mo 1 300 infodom.con
}

alias INFODOM.sale unset %infodom.* | .timer 1 1 .unload -rs g-infodom.mrc

;EOF-dt