-
-
Save notelseit/e28b941e11c2ad1c2e6eae105a89e2b4 to your computer and use it in GitHub Desktop.
Simple script for bulk IP whois lookup
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 characters
| ### Install DMitry pacakge before use | |
| ### sudo apt-get install dmitry | |
| ### | |
| import sys, subprocess | |
| if __name__ == "__main__": | |
| if len(sys.argv) != 2: | |
| print "usage: %s <file with IP list>" % sys.argv[0] | |
| sys.exit(1) | |
| source_file = open(sys.argv[1], "r") | |
| ip_list = list(source_file) | |
| total_ip = len(ip_list) | |
| for line in ip_list: | |
| ip = line.strip('\r\n') | |
| subprocess.call(["dmitry","-io",ip]) | |
| source_file.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment