Time for an 2014 update…
This commit is contained in:
parent
372c577f83
commit
09687c4926
2520 changed files with 34227 additions and 7318 deletions
16
Task/DNS-query/REXX/dns-query.rexx
Normal file
16
Task/DNS-query/REXX/dns-query.rexx
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
/*REXX pgm displays IPv4 and IPv6 addresses for a supplied domain name. */
|
||||
trace off /*don't show the PING return code*/
|
||||
parse arg dn . /*get the optional domain name. */
|
||||
if dn=='' then dn='www.kame.net' /*Not specified? Then use default*/
|
||||
tmp='\TEMP\TEMP.PING' /*define temp file to store IPv4.*/
|
||||
|
||||
do j=4 to 6 by 2 /*handle IPv4 and IPv6 addresses.*/
|
||||
'PING' (-j) '-l 0 -n 1' dn ">" tmp /*restrict PING's output to min. */
|
||||
q=charin(tmp,1,999) /*read output file from PING cmd.*/
|
||||
parse var q '[' IPA ']' /*parse IP a ddress from output.*/
|
||||
say 'IPv'j 'for domain name ' dn " is " IPA /*IPv4 | IPv6 addr.*/
|
||||
call lineout tmp /*needed by most REXXes to force */
|
||||
end /*j*/ /* [↑] file integrity. */
|
||||
|
||||
'ERASE' tmp /*clean up the temporary file. */
|
||||
/*stick a fork in it, we're done.*/
|
||||
Loading…
Add table
Add a link
Reference in a new issue