Created
September 17, 2012 21:11
-
-
Save saghul/3739834 to your computer and use it in GitHub Desktop.
Tornado backdoor example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import signal | |
from tornado.ioloop import IOLoop | |
from tornado_backdoor import BackdoorServer | |
def handle_SIGINT(signum, frame): | |
io_loop = IOLoop.instance() | |
io_loop.add_callback(io_loop.stop) | |
if __name__ == '__main__': | |
signal.signal(signal.SIGINT, handle_SIGINT) | |
server = BackdoorServer() | |
server.listen(1234) | |
IOLoop.instance().start() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment