How to use the sus.ThreadedTCPServer function in sus

To help you get started, we’ve selected a few sus examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github patins / sus_ssh / sus.py View on Github external
except Exception as e:
                traceback.print_exc()
            finally:
                transport.close()


    return SusTCPHandler

class ThreadedTCPServer(socketserver.ThreadingMixIn, socketserver.TCPServer):
    pass

if __name__ == '__main__':
    HOST, PORT, HOST_KEY_FILENAME = '0.0.0.0', 22, 'host.key'
    host_key = paramiko.RSAKey(filename=HOST_KEY_FILENAME)
    SusTCPHandler = build_sus_tcp_handler(host_key)
    server = ThreadedTCPServer((HOST, PORT), SusTCPHandler)
    server.serve_forever()

sus

Really simple static website URL shortener

MIT
Latest version published 3 years ago

Package Health Score

46 / 100
Full package analysis