Cleaned up DNS record functions
This commit is contained in:
parent
ce1bdb93b9
commit
eebfbac692
@ -8,6 +8,10 @@ api = Api(app)
|
|||||||
class WhoIS():
|
class WhoIS():
|
||||||
def __init__(self, domain):
|
def __init__(self, domain):
|
||||||
self.domain = domain
|
self.domain = domain
|
||||||
|
self.getWhois()
|
||||||
|
|
||||||
|
def getWhois(self):
|
||||||
|
self.registrar = 'Synergy Wholesale'
|
||||||
self.registrant = {'name': 'Test Case', 'email': 'tcase@test.com',
|
self.registrant = {'name': 'Test Case', 'email': 'tcase@test.com',
|
||||||
'eligibilitytype': 'Company', 'eligibilityid': '123456789'}
|
'eligibilitytype': 'Company', 'eligibilityid': '123456789'}
|
||||||
self.nameservers = ['ns1.dommain.tld', 'ns2.domain.tld']
|
self.nameservers = ['ns1.dommain.tld', 'ns2.domain.tld']
|
||||||
@ -15,25 +19,14 @@ class WhoIS():
|
|||||||
|
|
||||||
class DNS():
|
class DNS():
|
||||||
def __init__(self, domain):
|
def __init__(self, domain):
|
||||||
self.getARecords()
|
self.domain = domain
|
||||||
self.getAAAARecords()
|
self.getRecords()
|
||||||
self.getMXRecords()
|
|
||||||
self.getTXTRecords()
|
|
||||||
self.getNSRecords()
|
|
||||||
|
|
||||||
def getARecords(self):
|
def getRecords(self):
|
||||||
self.a = '1.2.3.4'
|
self.a = '1.2.3.4'
|
||||||
|
|
||||||
def getAAAARecords(self):
|
|
||||||
self.aaaa = '2001:0db8:85a3:0000:0000:8a2e:0370:7334'
|
self.aaaa = '2001:0db8:85a3:0000:0000:8a2e:0370:7334'
|
||||||
|
|
||||||
def getMXRecords(self):
|
|
||||||
self.mx = {'mail.domain.tld': 10}
|
self.mx = {'mail.domain.tld': 10}
|
||||||
|
|
||||||
def getTXTRecords(self):
|
|
||||||
self.txt = 'v=spf1 +a +mx +include:spf.hostingplatform.net.au'
|
self.txt = 'v=spf1 +a +mx +include:spf.hostingplatform.net.au'
|
||||||
|
|
||||||
def getNSRecords(self):
|
|
||||||
self.ns = ['ns1.domain.tld', 'ns2.domain.tld']
|
self.ns = ['ns1.domain.tld', 'ns2.domain.tld']
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user