Made linux magic happen with subprocess
This commit is contained in:
parent
de29c5af21
commit
38d12188ec
20
HTTPy.py
20
HTTPy.py
@ -5,12 +5,18 @@
|
|||||||
from HTMLParser import HTMLParser
|
from HTMLParser import HTMLParser
|
||||||
import httplib
|
import httplib
|
||||||
import argparse
|
import argparse
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
|
||||||
|
#Make this work with linux magic
|
||||||
|
|
||||||
currtag = ""
|
currtag = ""
|
||||||
conf_temp = "pre"
|
conf_temp = "pre"
|
||||||
#URL https://www.whois.com/whois/benjamyn-testing.com
|
#URL https://www.whois.com/whois/benjamyn-testing.com
|
||||||
#class df-block-raw
|
#class df-block-raw
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class MyHTMLParser(HTMLParser):
|
class MyHTMLParser(HTMLParser):
|
||||||
def handle_starttag(self, tag, attrs):
|
def handle_starttag(self, tag, attrs):
|
||||||
global conf_temp
|
global conf_temp
|
||||||
@ -42,11 +48,15 @@ print partDomain
|
|||||||
#run code
|
#run code
|
||||||
#else tell user they suck :D
|
#else tell user they suck :D
|
||||||
|
|
||||||
conn = httplib.HTTPSConnection("www.whois.com")
|
lookup = subprocess.check_output(["whois", domain])
|
||||||
conn.request("GET", "/whois/" + domain)
|
print "========================================================"
|
||||||
r1 = conn.getresponse()
|
print lookup
|
||||||
parser = MyHTMLParser()
|
|
||||||
|
|
||||||
parser.feed(r1.read())
|
#conn = httplib.HTTPSConnection("www.whois.com")
|
||||||
|
#conn.request("GET", "/whois/" + domain)
|
||||||
|
#r1 = conn.getresponse()
|
||||||
|
#parser = MyHTMLParser()
|
||||||
|
|
||||||
|
#parser.feed(r1.read())
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user