glue_lookup

From nat, 5 Years ago, written in Bash, viewed 292 times.
URL https://code.nat.moe/view/cb78bed0 Embed
Download Paste or View Raw
  1. #!/bin/bash
  2.  
  3. [ -z $1 ] && echo -e 'lookup glue records for a domain name.\nusage: '$0' <name>' && exit 1
  4.  
  5. rev <<< "$1" | cut -d. -f1 | rev | {
  6.   read tld && dig +short ${tld}. NS | head -n1 | {
  7.     read ns && dig +norec @$ns $1. NS
  8.   }
  9. } | grep -Ev '^$|^;'

Reply to "glue_lookup"

Here you can reply to the paste above

captcha