Skip to content

Commit

Permalink
#33 add piecemeal dependencies to plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
gingeleski committed Feb 26, 2019
1 parent 78e7908 commit be1413f
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 10 deletions.
20 changes: 14 additions & 6 deletions plugins/_interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,16 @@ class IPlugin(abc.ABC):
Params:
name (str)
type (PluginType)
dependencies (list)
"""

@abc.abstractmethod
def __init__(self, name):
def __init__(self, name, dependencies):
"""Abstract - constructor, should set plugin name and type.
Params:
name (str)
dependencies (list)
"""
pass

Expand Down Expand Up @@ -57,15 +59,16 @@ class IBrowserPagePlugin(IPlugin):
type (.PluginType)
"""

def __init__(self, name):
"""
Constructor, sets plugin name and type.
def __init__(self, name, dependencies):
"""Constructor, sets plugin name and type.
Params:
name (str)
dependencies (list)
"""
self.name = name
self.type = PluginType.BROWSER_PAGE
self.dependencies = dependencies

@abc.abstractmethod
def executePerPageAction(self, page):
Expand All @@ -85,14 +88,16 @@ class IDomainPlugin(IPlugin):
type (.PluginType)
"""

def __init__(self, name):
def __init__(self, name, dependencies):
"""Constructor, sets plugin name and type.
Params:
name (str)
dependencies (list)
"""
self.name = name
self.type = PluginType.DOMAIN
self.dependencies = dependencies

@abc.abstractmethod
def executePerDomainAction(self, domain):
Expand All @@ -110,13 +115,16 @@ class IAuxiliaryPlugin(IPlugin):
Params:
name (str)
type (.PluginType)
dependencies (list)
"""

def __init__(self, name):
def __init__(self, name, dependencies):
"""Constructor, sets plugin name and type.
Params:
name (str)
dependencies (list)
"""
self.name = name
self.type = PluginType.AUXILIARY
self.dependencies = dependencies
3 changes: 2 additions & 1 deletion plugins/nmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ class NmapPlugin(IDomainPlugin):

def __init__(self):
self.name = 'nmap port scan'
super(NmapPlugin, self).__init__(self.name)
self.dependencies = [ 'python-nmap==0.6.1' ]
super(NmapPlugin, self).__init__(self.name, self.dependencies)

def executePerDomainAction(self, domain):
"""
Expand Down
3 changes: 2 additions & 1 deletion plugins/nslookup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ class NslookupPlugin(IDomainPlugin):

def __init__(self):
self.name = 'nslookup'
super(NslookupPlugin, self).__init__(self.name)
self.dependencies = []
super(NslookupPlugin, self).__init__(self.name, self.dependencies)

def executePerDomainAction(self, domain):
"""
Expand Down
12 changes: 11 additions & 1 deletion plugins/sslyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,17 @@ class SslyzePlugin(IDomainPlugin):

def __init__(self):
self.name = 'sslyze certificate information'
super(SslyzePlugin, self).__init__(self.name)
self.dependencies = [\
'asn1crypto==0.24.0',\
'cffi==1.12.1',\
'cryptography==2.5',\
'nassl==2.1.2',\
'pycparser==2.19',\
'six==1.12.0',\
'sslyze==2.0.6',\
'tls-parser==1.2.1'\
]
super(SslyzePlugin, self).__init__(self.name, self.dependencies)

def executePerDomainAction(self, domain):
"""
Expand Down
3 changes: 2 additions & 1 deletion plugins/whatweb.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ class WhatWebPlugin(IDomainPlugin):

def __init__(self):
self.name = 'WhatWeb scanner'
super(WhatWebPlugin, self).__init__(self.name)
self.dependencies = []
super(WhatWebPlugin, self).__init__(self.name, self.dependencies)

def executePerDomainAction(self, domain):
"""
Expand Down
Binary file modified requirements.txt
Binary file not shown.

0 comments on commit be1413f

Please sign in to comment.