Removed all my old HTMLParser BS

This commit is contained in:
Benjamyn Love 2017-05-31 05:20:56 +10:00
parent a4d0ae9f11
commit a2429d3192

View File

@ -2,46 +2,18 @@
#Lookup jsonWhois.com, easy json API for whois lookups ;D #Lookup jsonWhois.com, easy json API for whois lookups ;D
#Might need to run this in windows/on laptop/ in VM #Might need to run this in windows/on laptop/ in VM
from HTMLParser import HTMLParser
import httplib
import argparse import argparse
import subprocess import subprocess
import re # YAY REVERSE ENGINEER... wait its just regex import re # YAY REVERSE ENGINEER... wait its just regex
#Made this work with linux magic #Made this work with linux magic
# OLD SHIT PLZ REMOVE <FUCK WANDOWS>
currtag = ""
conf_temp = "pre"
inInput = "" inInput = ""
#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
print("Domain: ") 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): def iterate(inArray):
count = 0 count = 0
@ -79,12 +51,6 @@ whois(inInput)
# whois(tmp) # whois(tmp)
# dig(tmp) # dig(tmp)
#conn = httplib.HTTPSConnection("www.whois.com")
#conn.request("GET", "/whois/" + domain)
#r1 = conn.getresponse()
#parser = MyHTMLParser()
#parser.feed(r1.read())
# Debugs # Debugs
# print domain # print domain