RosettaCodeData/Task/DNS-query/FutureBasic/dns-query-2.basic

25 lines
478 B
Plaintext

Str255 UnixCommand
Str255 UnixResponse
print "DNS IPv4 resolved for www.kame.net:"
UnixCommand = "nslookup -querytype=A www.kame.net"
open "UNIX", 1, UnixCommand
while ( not eof( 1 ) )
input #1, UnixResponse
print UnixResponse
wend
close 1
print ""
print "DNS IPv6 resolved for www.kame.net:"
UnixCommand = "nslookup -querytype=AAAA www.kame.net"
open "UNIX", 1, UnixCommand
while ( not eof( 1 ) )
input #1, UnixResponse
print UnixResponse
wend
close 1
HandleEvents