I just felt like it.
property default : "macscripter.net"
set button to button returned of (display dialog "What do you want to do?" buttons {"Ping", "Whois"} default button {"Whois"})
if button is "Ping" then
set numb to (choose from list {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20} with prompt "How many packets do you want sent?") as integer
set s to "s"
if numb is 1 then set s to ""
ping(numb, text returned of (display dialog "What site do you want to ping " & numb & " time" & s & "?" default answer default buttons {"Whois"} default button 1))
else
whois(text returned of (display dialog "What site do you want to whois?" default answer default buttons {"Whois"} default button 1))
end if
on ping(numb, thesite)
display dialog "This might take time. Continue?" buttons {"Cancel", "OK"} cancel button {"Cancel"} default button {"OK"}
try
set ping to do shell script "ping -c " & numb & space & quoted form of thesite
set siteping to paragraphs of ping
choose from list siteping with prompt "" OK button name "Finish" cancel button name "Finish"
on error e
display dialog "An error has occured:" & return & return & return & e
end try
end ping
on whois(thesite)
try
set whois to do shell script "whois " & quoted form of thesite
set sitewhois to paragraphs of whois
choose from list sitewhois with prompt "" OK button name "Finish" cancel button name "Finish"
on error e
display dialog "An error has occured:" & return & return & return & e
end try
end whois