mirror of
https://github.com/byt3bl33d3r/MITMf.git
synced 2025-03-12 04:35:49 -07:00
Added a plugin system to Net-Creds so you can now add your own parsers, api hook names might change between now and the offcial release (will submit a PR to the original repo once completed) The main MITM HTTP Proxy now uses mitmproxy which is a big deal, cuts the code down by an insane amount, no more twisted! yay! Basic plugin have been re-wrote for the new proxy engine Since we are using mitmproxy we have out of the box support for SSL/TLS!
46 lines
1.2 KiB
Python
46 lines
1.2 KiB
Python
'''
|
|
The base plugin class. This shows the various methods that
|
|
can get called during the MITM attack.
|
|
'''
|
|
import argparse
|
|
import logging
|
|
|
|
class Plugin(object):
|
|
name = "Example Plugin"
|
|
optname = "example"
|
|
desc = ""
|
|
version = "0.0"
|
|
|
|
def __init__(self, parser=None):
|
|
'''Optionally Passed the options namespace'''
|
|
if parser:
|
|
if self.desc:
|
|
sgroup = parser.add_argument_group(self.name, self.desc)
|
|
else:
|
|
sgroup = parser.add_argument_group(self.name,'Options for the {} plugin'.format(self.name))
|
|
|
|
sgroup.add_argument('--{}'.format(self.optname), action='store_true',help='Load plugin {}'.format(self.name))
|
|
|
|
self.options(sgroup)
|
|
|
|
def initialize(self, context):
|
|
'''Called when plugin is started'''
|
|
pass
|
|
|
|
def shutdown(self, context):
|
|
'''This will be called when shutting down'''
|
|
pass
|
|
|
|
def request(self, context, flow):
|
|
pass
|
|
|
|
def responseheaders(self, context, flow):
|
|
pass
|
|
|
|
def response(self, context, flow):
|
|
pass
|
|
|
|
def options(self, options):
|
|
'''Add your options to the options parser'''
|
|
pass
|