mirror of
https://github.com/byt3bl33d3r/MITMf.git
synced 2025-07-15 01:23:54 -07:00
21 lines
521 B
Python
21 lines
521 B
Python
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()
|