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
|
||||
import httplib
|
||||
import argparse
|
||||
import subprocess
|
||||
|
||||
|
||||
#Make this work with linux magic
|
||||
|
||||
currtag = ""
|
||||
conf_temp = "pre"
|
||||
#URL https://www.whois.com/whois/benjamyn-testing.com
|
||||
#class df-block-raw
|
||||
|
||||
|
||||
|
||||
class MyHTMLParser(HTMLParser):
|
||||
def handle_starttag(self, tag, attrs):
|
||||
global conf_temp
|
||||
@ -42,11 +48,15 @@ print partDomain
|
||||
#run code
|
||||
#else tell user they suck :D
|
||||
|
||||
conn = httplib.HTTPSConnection("www.whois.com")
|
||||
conn.request("GET", "/whois/" + domain)
|
||||
r1 = conn.getresponse()
|
||||
parser = MyHTMLParser()
|
||||
lookup = subprocess.check_output(["whois", domain])
|
||||
print "========================================================"
|
||||
print lookup
|
||||
|
||||
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