Created
June 22, 2015 05:14
-
-
Save Miserlou/3e3e5e5a2c2f5a9344e9 to your computer and use it in GitHub Desktop.
Remove that annoying disclaimer noice from the whois command
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
#! /usr/bin/env python | |
from subprocess import Popen, PIPE | |
import sys | |
domain = sys.argv[1] | |
proc = Popen(["whois", domain], stdout=PIPE) | |
output = proc.communicate()[0] | |
notice_loc = output.find('NOTICE') | |
output = output[:notice_loc] | |
server_info = output.find('for detailed information.') | |
output = output[server_info+25:] | |
print output |
KingGame0
commented
May 14, 2024
<style type="text/css"></style>
KingGame
--
Gold99
PGasia
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment