forked from gonewind73/scrapy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDomainHunter.py
70 lines (43 loc) · 1.08 KB
/
DomainHunter.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
'''
Created on 2016年5月11日
@author: heguofeng
DomainHunter
1\find domain
2\test is https
3\if https get certificate,check issuer and validate
4\if not https get whois,get contact email & telephone
5\write in database
'''
import unittest
class DomainHunter(object):
def __init__(self):
pass
class Domain(object):
def __init__(self):
self.domainName=''
self.hasCertificate=False
self.certficate=""
self.contact=""
class Contact(object):
def __init__(self):
self.name=""
self.telephone=""
self.email=""
pass
class https(object):
def __init__(self):
pass
def isHttps(self):
return True
class Test(unittest.TestCase):
def setUp(self):
self.hs=https()
pass
def tearDown(self):
pass
def testHttps(self):
print("test1")
self.assertTrue(self.hs.isHttps(),"test failure")
if __name__ == "__main__":
#import sys;sys.argv = ['', 'Test.testName']
unittest.main()