TCL - DNS Resolver

buat cek ip resolve ato gak

bind pub - .dns dns:res
bind raw * 311 raw:host
bind raw * 401 raw:fail
proc dns:res {nick uhost hand chan text} {
 if {$text == ""} {
  putquick "NOTICE $nick :Syntax: .dns <host or ip>"
 } else {
  set hostip [split $text]
  dnslookup $hostip resolve_rep $chan $hostip
 }
}
proc resolve_rep {ip host status chan hostip} {
 if {!$status} {
  putquick "privmsg $chan :Ga bisa resolve $hostip"
 } elseif {[regexp -nocase -- $ip $hostip]} {
  putquick "privmsg $chan :Resolve $ip ke $host"
 } else {
  putquick "privmsg $chan :Resolve $host ke $ip"
 }
}

Add comment

Fill out the form below to add your own comments

User data





Add your comment