Removed all my old HTMLParser BS
This commit is contained in:
parent
a4d0ae9f11
commit
a2429d3192
34
HTTPy.py
34
HTTPy.py
@ -2,46 +2,18 @@
|
||||
#Lookup jsonWhois.com, easy json API for whois lookups ;D
|
||||
#Might need to run this in windows/on laptop/ in VM
|
||||
|
||||
from HTMLParser import HTMLParser
|
||||
import httplib
|
||||
import argparse
|
||||
import subprocess
|
||||
import re # YAY REVERSE ENGINEER... wait its just regex
|
||||
|
||||
#Made this work with linux magic
|
||||
|
||||
|
||||
# OLD SHIT PLZ REMOVE <FUCK WANDOWS>
|
||||
currtag = ""
|
||||
conf_temp = "pre"
|
||||
inInput = ""
|
||||
#URL https://www.whois.com/whois/benjamyn-testing.com
|
||||
#class df-block-raw
|
||||
|
||||
print("Domain: ")
|
||||
|
||||
class MyHTMLParser(HTMLParser):
|
||||
def handle_starttag(self, tag, attrs):
|
||||
global conf_temp
|
||||
global currtag
|
||||
if tag == conf_temp:
|
||||
# starttag = tag
|
||||
for name, value in attrs:
|
||||
if name == "class" and value == "df-raw":
|
||||
print tag
|
||||
currtag = tag
|
||||
# pass
|
||||
#print starttag
|
||||
|
||||
def handle_endtag(self, tag):
|
||||
global currtag
|
||||
if tag == "pre":
|
||||
currtag = ""
|
||||
|
||||
def handle_data(self, data):
|
||||
#print starttag
|
||||
if currtag == conf_temp:
|
||||
print data
|
||||
|
||||
def iterate(inArray):
|
||||
count = 0
|
||||
@ -79,12 +51,6 @@ whois(inInput)
|
||||
# whois(tmp)
|
||||
# dig(tmp)
|
||||
|
||||
#conn = httplib.HTTPSConnection("www.whois.com")
|
||||
#conn.request("GET", "/whois/" + domain)
|
||||
#r1 = conn.getresponse()
|
||||
#parser = MyHTMLParser()
|
||||
|
||||
#parser.feed(r1.read())
|
||||
|
||||
# Debugs
|
||||
# print domain
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user