diff options
| author | bicker <bickerkards@gmail.com> | 2017-06-14 14:34:17 +0200 |
|---|---|---|
| committer | bicker <bickerkards@gmail.com> | 2017-06-14 14:34:17 +0200 |
| commit | 9a3b2702bbcbd67eab592b043b7dcd50b48afe3b (patch) | |
| tree | 36738aecfc47f3ace6e29f1d5ec724b1a4d8e92a /backup/old/whois_script.py | |
first commit
Diffstat (limited to 'backup/old/whois_script.py')
| -rw-r--r-- | backup/old/whois_script.py | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/backup/old/whois_script.py b/backup/old/whois_script.py new file mode 100644 index 0000000..a4a6a6e --- /dev/null +++ b/backup/old/whois_script.py @@ -0,0 +1,32 @@ +from pprint import pprint + +import json +import subprocess +import whois + +if __name__ == "__main__": + f = open('output', 'r') + d = json.loads(f.read()) + # bashCommand = "whois -h whois.cymru.com \" -v 192.42.173.30\"" + # process = subprocess.Popen(bashCommand.split(), stdout=subprocess.PIPE) + # output, error = process.communicate() + # + # r = [] + # x = output.split('\n')[2:-1] + # + # for y in x: + # z = y.split('|') + # r.append(z[0].strip(' ')) + # + # print r + + f = open('list03', 'w') + f.write('begin\n') + + + for tld in d: + print tld + for host in d[tld]: + f.write(d[tld][host][0] + '\n') + + f.write('end\n') |