using nmap to get a list of DNS host names

Sometimes you want to update your hosts file, but you don't remember what all your hostnames are, or some have been added that didn't follow whatever process you've got in place, so are unlisted.

This little deal will list all the host names for a particular range (in this example, through

nmap -sL | tr -d '()' | awk '{print $3 "\t" $2}'

You obviously need nmap, tr, and awk for this to work.

End Of Line

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
BlogCFC was created by Raymond Camden. This blog is running version Contact Blog Owner