-
-
Save abhishekbhardwaj/eb19786c3c9b179ca66f8e71b93b4e8c to your computer and use it in GitHub Desktop.
Revisions
-
kolobus created this gist
Feb 12, 2014 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ #!/bin/bash # 1 wget -qO root.zone http://www.internic.net/domain/root.zone # 2 cat root.zone | grep "IN\sNS" | awk '{print $1}' | uniq | sort | sed -r 's/\.//g' | sed '/^$/d' > zone.list 2> /dev/null # 3 mkdir zones # Generating whois.iana.db.php echo "<?php" > whois.iana.db.php echo "\$ianawhois = Array (" >> whois.iana.db.php for zn in `cat zone.list`; do whois -h whois.iana.org $zn > zones/$zn.whois echo " \"$zn\" => \"`cat zones/$zn.whois | grep "whois:\s" | awk '{print $2}'`\"," >> whois.iana.db.php sleep 2 done echo ");" >> whois.iana.db.php echo "?>" >> whois.iana.db.php # Yaiks rm -rf zones rm -f root.zone rm -f zone.list