-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdnstwister.py
32 lines (28 loc) · 2.27 KB
/
dnstwister.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
from core import plugin, model
class _dnstwister(plugin._plugin):
version = 0.2
def install(self):
# Register models
model.registerModel("dnstwisterIPResolution","_dnstwisterIPResolution","_action","plugins.dnstwister.models.action")
model.registerModel("dnstwisterParkedCheck","_dnstwisterParkedCheck","_action","plugins.dnstwister.models.action")
model.registerModel("dnstwisterWhois","_dnstwisterWhois","_action","plugins.dnstwister.models.action")
model.registerModel("dnstwisterGoogleSafeBrowsing","_dnstwisterGoogleSafeBrowsing","_action","plugins.dnstwister.models.action")
model.registerModel("dnstwisterFuzz","_dnstwisterFuzz","_action","plugins.dnstwister.models.action")
model.registerModel("dnstwisterReport","_dnstwisterReport","_action","plugins.dnstwister.models.action")
model.registerModel("dnstwisterObserve","_dnstwisterObserve","_trigger","plugins.dnstwister.models.trigger")
model.registerModel("dnstwister","_dnstwister","_document","plugins.dnstwister.models.dnstwister",True)
return True
def uninstall(self):
# deregister models
model.deregisterModel("dnstwisterIPResolution","_dnstwisterIPResolution","_action","plugins.dnstwister.models.action")
model.deregisterModel("dnstwisterParkedCheck","_dnstwisterParkedCheck","_action","plugins.dnstwister.models.action")
model.deregisterModel("dnstwisterWhois","_dnstwisterWhois","_action","plugins.dnstwister.models.action")
model.deregisterModel("dnstwisterGoogleSafeBrowsing","_dnstwisterGoogleSafeBrowsing","_action","plugins.dnstwister.models.action")
model.deregisterModel("dnstwisterFuzz","_dnstwisterFuzz","_action","plugins.dnstwister.models.action")
model.deregisterModel("dnstwisterReport","_dnstwisterReport","_action","plugins.dnstwister.models.action")
model.deregisterModel("dnstwisterObserve","_dnstwisterObserve","_trigger","plugins.dnstwister.models.trigger")
model.deregisterModel("dnstwister","_dnstwister","_document","plugins.dnstwister.models.dnstwister")
return True
def upgrade(self,LatestPluginVersion):
if self.version < 0.2:
model.registerModel("dnstwister","_dnstwister","_document","plugins.dnstwister.models.dnstwister",True)