Exemplo n.º 1
0
def main():
    """ Main execution thread """

    options = Options().load_options()
    prompt = Prompt(options)
    prompt.prompt = 'falconbot> '
    prompt.cmdloop('[+] Starting falconbot interface...')
Exemplo n.º 2
0
def main():
    """ Main execution thread """

    options = Options().load_options()
    connect_string = "host=" + options["host"] + " port=" + options[
        "port"] + " dbname=" + options["db"] + " user="******"username"] + " password="******"password"]
    prompt = Prompt(connect_string)
    prompt.prompt = 'schemabridge> '
    prompt.cmdloop('[+] Starting schemabridge interface...')
Exemplo n.º 3
0
from manager_lxc_utils import (_change_container_key, _container_state,
                               _create_container, _delete_container,
                               _launch_container, _restart_container,
                               _start_container, _stop_container)
from prompt import Prompt
from utils import (ContainerState, _check_container_name, _check_login,
                   _check_password, _generate_container_name, _images_detail,
                   _owning_containers_name, gen_keys)

if __name__ == '__main__':
    current_path = os.path.split(os.path.abspath(__file__))[0]
    config = configparser.ConfigParser()
    config.read(os.path.join(current_path, 'config.ini'))
    ip_start = config['DEFAULT'].get('ip_start')
    port_start = config['DEFAULT'].getint('port_start')
    default_image_fingerprint = config['DEFAULT'].get(
        'default_image_fingerprint')
    db_path = config['DEFAULT'].get('db_path')
    lxc_nvidia_profile = config['DEFAULT'].get('lxc_image_profile')
    nobody = config['DEFAULT'].get('nobody', 'nobody')
    client = pylxd.Client()
    prompt = Prompt(db_path,
                    client,
                    port_start,
                    ip_start,
                    default_image_fingerprint,
                    profiles=[lxc_nvidia_profile, 'default'],
                    nobody=nobody)
    prompt.cmdloop()
    exit()