mirror of
https://github.com/byt3bl33d3r/MITMf.git
synced 2025-07-06 13:02:24 -07:00
initial commit
This commit is contained in:
parent
fbf31c220a
commit
6fa335183c
37 changed files with 2698 additions and 0 deletions
40
plugins/plugin.py
Normal file
40
plugins/plugin.py
Normal file
|
@ -0,0 +1,40 @@
|
|||
'''
|
||||
The base plugin class. This shows the various methods that
|
||||
can get called during the MITM attack.
|
||||
'''
|
||||
|
||||
class Plugin(object):
|
||||
name = "Generic plugin"
|
||||
optname = "generic"
|
||||
desc = ""
|
||||
implements = []
|
||||
has_opts = False
|
||||
def __init__(self):
|
||||
'''Called on plugin instantiation. Probably don't need this'''
|
||||
pass
|
||||
def initialize(self,options):
|
||||
'''Called if plugin is enabled, passed the options namespace'''
|
||||
self.options = options
|
||||
|
||||
def add_options(options):
|
||||
'''Add your options to the options parser'''
|
||||
raise NotImplementedError
|
||||
|
||||
def handleHeader(self,request,key,value):
|
||||
'''Handles all response headers'''
|
||||
raise NotImplementedError
|
||||
|
||||
def connectionMade(self,request):
|
||||
'''Handles outgoing request'''
|
||||
raise NotImplementedError
|
||||
|
||||
def handleResponse(self,request,data):
|
||||
'''
|
||||
Handles all non-image responses by default. See Upsidedownternet
|
||||
for how to get images
|
||||
'''
|
||||
raise NotImplementedError
|
||||
|
||||
def finish(self):
|
||||
'''This will be called when shutting down'''
|
||||
pass
|
Loading…
Add table
Add a link
Reference in a new issue