You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
487 B
Fish
22 lines
487 B
Fish
###
|
|
# Looks up the IPv6 address of the given hostname and tries to find the reverse record of that IP
|
|
#
|
|
# Globals:
|
|
# None
|
|
# Arguments:
|
|
# $domain string Hostname to look up
|
|
# Returns:
|
|
# None
|
|
###
|
|
function nsreverse6
|
|
# lookup IP
|
|
set ip (dig "$argv[1]" AAAA +short); or return 1
|
|
|
|
# lookup reverse record
|
|
set reverse (dig -x "$ip" +short); or return 1
|
|
|
|
# output
|
|
echo -e "\033[1mIPv6: \033[0;34m $ip\033[0m"
|
|
echo -e "\033[1mReverse lookup:\033[0;34m $reverse\033[0m"
|
|
end
|