|
TCL buat cek/whois IP.
Bisa buat IPv4 atopun IPv6
set whoisinfo(port) 43
set whoisinfo(ripe) "whois.ripe.net"
set whoisinfo(arin) "whois.arin.net"
set whoisinfo(apnic) "whois.apnic.net"
set whoisinfo(lacnic) "whois.lacnic.net"
set whoisinfo(afrinic) "whois.afrinic.net"
bind pub - !ip pub_whoisinfo
bind pub - .ip pub_whoisinfo
proc whoisinfo_setarray {} {
global query
set query(netname) "(none)"
set query(country) "(none)"
set query(orgname) "(none)"
set query(orgid) "(none)"
set query(range) "(none)"
}
proc whoisinfo_display { chan } {
global query
putlog "Firstline: $query(firstline)"
putquick "PRIVMSG $chan :Range : $query(range) - NetName : $query(netname) - Organization : $query(orgname) - Country : $query(country)"
}
proc pub_whoisinfo {nick uhost handle chan search} {
global whoisinfo
global query
whoisinfo_setarray
if {[whoisinfo_whois $whoisinfo(arin) $search]==1} {
if {[string compare [string toupper $query(orgid)] "RIPE"]==0} {
if {[whoisinfo_whois $whoisinfo(ripe) $search]==1} {
whoisinfo_display $chan
}
} elseif {[string compare [string toupper $query(orgid)] "APNIC"]==0} {
if {[whoisinfo_whois $whoisinfo(apnic) $search]==1} {
whoisinfo_display $chan
}
} elseif {[string compare [string toupper $query(orgid)] "LACNIC"]==0} {
if {[whoisinfo_whois $whoisinfo(lacnic) $search]==1} {
whoisinfo_display $chan
}
} elseif {[string compare [string toupper $query(orgid)] "AFRINIC"]==0} {
if {[whoisinfo_whois $whoisinfo(afrinic) $search]==1} {
whoisinfo_display $chan
}
} else {
whoisinfo_display $chan
}
} else {
if { [info exist query(firstline)] } {
puthelp "PRIVMSG $chan :$query(firstline)"
} else {
puthelp "PRIVMSG $chan :Error!"
}
}
}
proc whoisinfo_whois {server search} {
global whoisinfo
global query
set desccount 0
set firstline 0
set reply 0
putlog "Whois: $server:$whoisinfo(port) -> $search"
if {[catch {set sock [socket -async $server $whoisinfo(port)]} sockerr]} {
puthelp "PRIVMSG $chan :Error: $sockerr. Try again later."
close $sock
return 0
}
puts $sock $search
flush $sock
while {[gets $sock whoisline]>=0} {
putlog "Whois: $whoisline"
if {[string index $whoisline 0]!="#" && [string index $whoisline 0]!="%" && $firstline==0} {
if {[string trim $whoisline]!=""} {
set query(firstline) [string trim $whoisline]
set firstline 1
}
}
if {[regexp -nocase {netname:(.*)} $whoisline all item]} {
set query(netname) [string trim $item]
set reply 1
} elseif {[regexp -nocase {owner-c:(.*)} $whoisline all item]} {
set query(netname) [string trim $item]
set reply 1
} elseif {[regexp -nocase {country:(.*)} $whoisline all item]} {
set query(country) [string trim $item]
set reply 1
} elseif {[regexp -nocase {descr:(.*)} $whoisline all item] && $desccount==0} {
set query(orgname) [string trim $item]
set desccount 1
set reply 1
} elseif {[regexp -nocase {orgname:(.*)} $whoisline all item]} {
set query(orgname) [string trim $item]
set reply 1
} elseif {[regexp -nocase {owner:(.*)} $whoisline all item]} {
set query(orgname) [string trim $item]
set reply 1
} elseif {[regexp -nocase {orgid:(.*)} $whoisline all item]} {
set query(orgid) [string trim $item]
set reply 1
} elseif {[regexp -nocase {inetnum:(.*)} $whoisline all item]} {
set query(range) [string trim $item]
set reply 1
} elseif {[regexp -nocase {netrange:(.*)} $whoisline all item]} {
set query(range) [string trim $item]
set reply 1
}
}
close $sock
return $reply
}
|
23-12-2011
19:56:07
Does some one know what happens if I make multiple searches from a single source IP on WHOIS database or even Google for that matter? Like if I have multiple simultaneous sessions to a WHOIS database from a single source IP, do they block it or something? thinking of it as a spam attack or etc?
05-01-2012
01:21:28
There is no good or bad in life, except what is good according to its own UGG outlet season.I think this was his greatness; he took human life largely as it was, and intruded himself as little upon the general scheme of things as he did upon the characters of his plays. Shakespeare UGG bailey button 5803 boots was like Nature itself, and that is the greatest compliment we can pay to a UGG cardy Boots black writer or thinker.The third enemy inside is doubt.Sure, there’s room for healthy skepticism. You can’t believe UGG classic tall grey everything. http://www.uggoutletsalestore.com/ CF
11-01-2012
18:14:19
They can elevate men from obscurity to national prominence within a week. Soccer Cleats can reward some politicians with national exposure and ignore others. http://www.soccershoesclearance.com/ lzle
13-01-2012
18:19:45
Tonight I want to talk to you on a subject of deep concern to all adidas predator x and to many people in all parts of the world, the war in Vietnam. http://www.soccers-cleats.com/ PZZ
16-01-2012
19:56:21
TCP provides a communication service at an intermediate level between an application program and the internet protocol (IP). That is, when an application program desires to send a large chunk of data across the Internet using IP, instead of breaking the data into IP-sized pieces and issuing a series of IP requests, the software can issue a single request to TCP and let TCP handle the IP details.
30-01-2012
04:08:42
igp http://www.howcast.com/users/juliuslester1214 stlouiscardinals
30-01-2012
05:11:28
local weather http://pikavipithelposti.wordpress.com/2012/01/25/pari-tuhoavat-lopen-merkityksellisen-palvelun-maaseutuineen-nykyinen-asianlaita-vihta-idean-ajastajan-vippi/ bipolar disorder
05-02-2012
20:41:47
I have multiple IP addresses with port numbers. How can I find the site or find out who the IP address is?
06-02-2012
01:14:50
I really like your message and that way i like this post, keep posting more.thank you.
13-02-2012
21:30:59
Particularly does this observation apply to those who have lost sight and hearing in louis vuitton suppliers. But those who have never suffered impairment of sight or hearing seldom make the fullest use of these blessed louis vuitton clutch bags. http://www.lv-outletsale.com/ ZXJ