Recently I’ve encounter list of IPs that are related to CoinHive. So I want to check for these IPs DNS. We can do that by using dig command to perform reverse DNS (rDNS).
Reverse DNS (rDNS) is a method of resolving an IP address into a domain name, just as the domain name system (DNS) resolves domain names into associated IP addresses.
I found this script at this site:
1 2 3 4 5 6 7 8 9 10 11 12 |
#!/bin/bash for item do domain=$(dig -x "$item" +short) if [ -n "$domain" ] ; then echo "$item" - "$domain" else echo "$item" result is NULL fi done |
Just save this code above in your Linux/*nix machine, and run this command as below:
1 |
root@box:~# cat ip.txt | xargs bash reverse_dns |