xecho -b Nslookup script loaded xecho -b Written by gircobain 18/05/2002 assign NSLNAME Nome* assign NSLADDR Address* alias dns { if ([$0] != []) { ^assign nick $0 }{ ^assign nick $N } whois -cmd { ^assign ip $12 exec -name DNS nslookup $ip > c:/nslookup.txt } $nick ^on ^exec_exit "DNS % %" { @:fd = open(//c/nslookup.txt r) repeat 2 @read($fd) while (!eof($fd)) { @::line = read($fd) if (match($NSLNAME $line)) { @::line = rightw(1 $line) break } } @close($fd) @unlink(//c/nslookup.txt) xecho -c -b DNS for \($nick\) $ip ->${line == [] ? [ ] : line} assign -nick assign -ip assign -line on exec_exit -"DNS % %" } ^on #-404 1256 "user is not currently online." { assign -nick on #404 1256 -"user is not currently online." } } alias nslookup { if ([$0] != []) { ^assign dns $0 if (iptolong($0) == iptolong($0)*1) { @::tomatch = NSLNAME }{ @::tomatch = NSLADDR } exec -name NSLOOKUP nslookup $dns > c:/nslookup.txt ^on ^exec_exit "NSLOOKUP % %" { @:fd = open(//c/nslookup.txt r) repeat 2 @read($fd) while (!eof($fd)) { @::line = read($fd) if (match($tomatch $line)) { @::line = rightw(1 $line) break } } @close($fd) @unlink(//c/nslookup.txt) xecho -c -b DNS for $dns -> ${line == [] ? [] : line} assign -dns assign -line assign -tomatch on exec_exit -"NSLOOKUP % %" } } }