bash - Unix script to resolve hostnames from IP addresses -


i've got text file bunch of ipv4 addresses, , i'd know hostname of each 1 in order know if tor addresses. there simple script can me ?

you can loop using dig:

#!/bin/bash  while read line     dig -x "$line" +short done 

then given ips 1 per line, can run ./reverse.sh < addrs.txt.

caveats: dns not 1-to-1 mapping, , reverse dns less reliable forward dns.


Comments

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -