mirror of
https://github.com/byt3bl33d3r/MITMf.git
synced 2025-07-08 05:51:48 -07:00
Initial webserver implementation, plus organized directory structure a bit better
This commit is contained in:
parent
fb26d89204
commit
929520fcc8
27 changed files with 54 additions and 240 deletions
18
plugins/TestPlugin.py
Normal file
18
plugins/TestPlugin.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
from plugins.plugin import Plugin
|
||||
from core.servers.http.HTTPServer import HTTPServer
|
||||
import tornado.web
|
||||
|
||||
class TestPlugin(Plugin):
|
||||
name = "testplugin"
|
||||
optname = "test"
|
||||
desc = "Plugin to test dynamically configuring the internal web server"
|
||||
version = "0.1"
|
||||
has_opts = False
|
||||
|
||||
def initialize(self, options):
|
||||
HTTPServer.getInstance().application.add_handlers('', [(r"/test", MainHandler)])
|
||||
|
||||
class MainHandler(tornado.web.RequestHandler):
|
||||
def get(self):
|
||||
print self.request
|
||||
self.write("Hello World!")
|
Loading…
Add table
Add a link
Reference in a new issue