Created
August 27, 2014 16:38
-
-
Save hackingbutlegal/30b10aa60d9fc646d5f9 to your computer and use it in GitHub Desktop.
Query Whois using IP's in a text file and output the important bits to a separate file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for a in `awk -F: '{print $1}' ip1.txt` | |
do | |
echo "$((i++)) $1:" >> whoisdb.txt | |
whois $a | awk '/NetName/ || /OrgName/{print}' >> whoisdb.txt | |
echo -e "\n" >> whoisdb.txt | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment