alias ipwhois {
if ($1 == $null) {
set %temp.ad $?=\\"Enter Address: \\"
sockopen wip $+ $r(1,10000) completewhois.com 80
}
if ($1 != $null) {
set %temp.ad $1
sockopen wip $+ $r(1,10000) completewhois.com 80
}
}
on 1:sockopen:wip*: {
sockwrite -n $sockname POST /cgi-bin/whois.cgi?query= $+ %temp.ad HTTP/1.1
sockwrite -n $sockname Host: $sock($sockname).ip $+ $str($crlf ,2)
}
on 1:sockread:wip*:{
window -e @Whois
aline @Whois Getting Info... done.
if ($sockerr > 0) return
:nextread
sockread %temp
if ($sockbr == 0) return
if (%temp == $null) %temp = -
if ($nohtml(%temp) != $null) {
aline @Whois $nohtml(%temp)
goto nextread
sockclose wip*
}
}
on 1:sockopen:wh*: {
sockwrite -n $sockname GET /whois.cgi2?d= $+ %temp.ho HTTP/1.1
sockwrite -n $sockname Host: whois.net $+ $str($crlf ,2)
}
on 1:sockread:wh*:{
if (%whoisrdy == 1) {
if (15f9 isin %temp) {
set %whoisrdy 0
}
window -e @Whois
sockread %temp
if ($nohtml(%temp) != $Null) {
aline @Whois $+ $nohtml(%temp)
.timerss 1 3 /sockclose wh*
}
}
}
alias -l nohtml {
var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x, )
return %x
}