import time


def read_output(client, console_id: int) -> str:
    """
    Reads output from msfrpcd exploit execution.

    :param client: msfrpcd client
    :param console_id: created console id
    :return: exploit output
    """
    output = client.call('console.read', [console_id])
    data = output.get('data')
    while output.get('busy'):
        time.sleep(1)
        output = client.call('console.read', [console_id])
        data += "\n===MORE DATA===\n"
        data += output.get('data')
    return data