Added proper wandows support
This commit is contained in:
parent
3344f8ab80
commit
aa03438280
@ -5,5 +5,6 @@
|
||||
"colour_good":"green",
|
||||
"colour_pretty":"cyan",
|
||||
"colour_default":"reset",
|
||||
"colour_none":"",
|
||||
"country_codes":"codes.csv"
|
||||
}
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
import files as f
|
||||
import json
|
||||
import os
|
||||
|
||||
def readConf():
|
||||
def readConf(fileLoc):
|
||||
try:
|
||||
jsonData = json.loads(f.openFile("config.json").read())
|
||||
jsonData = json.loads(f.openFile(os.path.expanduser(fileLoc)).read())
|
||||
except Exception as e:
|
||||
print e
|
||||
jasonData = ""
|
||||
|
||||
BIN
libs/config.pyc
BIN
libs/config.pyc
Binary file not shown.
28
main.py
28
main.py
@ -1,10 +1,11 @@
|
||||
#!/usr/bin/python2.7
|
||||
import whois
|
||||
import readline
|
||||
import signal
|
||||
import dns.resolver
|
||||
import json
|
||||
import warnings
|
||||
import os
|
||||
import platform
|
||||
from dns import reversename
|
||||
from ipwhois.net import Net
|
||||
from ipwhois.asn import IPASN
|
||||
@ -13,15 +14,8 @@ from libs import config
|
||||
from libs import colours as gc
|
||||
from libs import cc
|
||||
|
||||
running = 1
|
||||
prompt = ': '
|
||||
indent = '~ '
|
||||
whoisrecs = ["NotFound", "DomainName", "Registrar", "Status", "UpdatedDate", "CreationDate", "ExpirationDate", "RegistrantName", "RegistrantEmail", "EligibilityName", "EligibilityType", "EligibilityID", "RegistrantID", "NameServer"]
|
||||
#ipData = ["asn_country_code", "asn_description"]
|
||||
ipData = {"asn_country_code":"Country", "asn_description":"Owner"}
|
||||
|
||||
# Loaded from the config file
|
||||
jsonData = config.readConf()
|
||||
jsonData = config.readConf("~/config.json")
|
||||
|
||||
subdomains = jsonData["subdomains"]
|
||||
dnsrecords = jsonData["dnsrecords"]
|
||||
@ -32,6 +26,22 @@ colour_default = gc.getColour(jsonData["colour_default"])
|
||||
CSVFile = jsonData["country_codes"]
|
||||
# Endconfig block
|
||||
|
||||
if platform.system().lower() == "linux":
|
||||
import readline
|
||||
else:
|
||||
#do windows stuff here
|
||||
colour_attn = ""
|
||||
colour_good = ""
|
||||
colour_pretty = ""
|
||||
colour_default = ""
|
||||
|
||||
running = 1
|
||||
prompt = ': '
|
||||
indent = '~ '
|
||||
whoisrecs = ["NotFound", "DomainName", "Registrar", "Status", "UpdatedDate", "CreationDate", "ExpirationDate", "RegistrantName", "RegistrantEmail", "EligibilityName", "EligibilityType", "EligibilityID", "RegistrantID", "NameServer"]
|
||||
#ipData = ["asn_country_code", "asn_description"]
|
||||
ipData = {"asn_country_code":"Country", "asn_description":"Owner"}
|
||||
|
||||
CountryDict = cc.parseCSV(cc.openCSV(CSVFile))
|
||||
|
||||
def domainWhois(inData):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user