second implementation of the HTTP server, you can now define shares for the SMB server in the config file, added an option to switch between the normal SMB server and the Karma version.

removed some useless code (left over from the responder plugin), serverResponseStatus hook now returns a dict (tuple was causing errors)
This commit is contained in:
byt3bl33d3r 2015-05-30 15:00:41 +02:00
parent e985d42a8a
commit 14580f1589
14 changed files with 806 additions and 920 deletions

View file

@ -1,6 +1,5 @@
from plugins.plugin import Plugin
from core.servers.http.HTTPServer import HTTPServer
import tornado.web
from core.servers.http.HTTPServer import HTTPServer, HTTPHandler
class TestPlugin(Plugin):
name = "testplugin"
@ -10,9 +9,8 @@ class TestPlugin(Plugin):
has_opts = False
def initialize(self, options):
HTTPServer.getInstance().addHandler(r"/test/(.*)", MainHandler)
HTTPServer.getInstance().addHandler(r"/test/.*", WebServer)
class MainHandler(tornado.web.RequestHandler):
class WebServer(HTTPHandler):
def get(self):
print self.request
self.write("Hello World!")
self.write("It works MOFO!")