mirror of
https://github.com/byt3bl33d3r/MITMf.git
synced 2025-08-21 05:53:30 -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
21
core/servers/http/HTTPServer.py
Normal file
21
core/servers/http/HTTPServer.py
Normal file
|
@ -0,0 +1,21 @@
|
|||
import tornado.ioloop
|
||||
import tornado.web
|
||||
import threading
|
||||
|
||||
class HTTPServer:
|
||||
|
||||
_instance = None
|
||||
application = tornado.web.Application([])
|
||||
|
||||
@staticmethod
|
||||
def getInstance():
|
||||
if HTTPServer._instance == None:
|
||||
HTTPServer._instance = HTTPServer()
|
||||
|
||||
return HTTPServer._instance
|
||||
|
||||
def start(self, port=80):
|
||||
self.application.listen(port)
|
||||
t = threading.Thread(name='HTTPserver', target=tornado.ioloop.IOLoop.instance().start)
|
||||
t.setDaemon(True)
|
||||
t.start()
|
0
core/servers/http/__init__.py
Normal file
0
core/servers/http/__init__.py
Normal file
Loading…
Add table
Add a link
Reference in a new issue