コード例 #1
0
ファイル: __main__.py プロジェクト: hathcox/ShodanDorks
def serve():
    """ Starts the application """
    from libs.ConfigManager import ConfigManager  # Sets up logging
    from handlers import start_server

    print(INFO + "%s : Starting application ... " % current_time())
    start_server()
コード例 #2
0
ファイル: rootthebox.py プロジェクト: ITh4cker/RootTheBox
def start():
    ''' Update the database schema '''
    from handlers import update_db
    update_db()
    ''' Starts the application '''
    from handlers import start_server
    logging.info(INFO + '%s : Starting application ...' % current_time())
    start_server()
コード例 #3
0
ファイル: rootthebox.py プロジェクト: H3liand/RootTheBox
def start():
    ''' Update the database schema '''
    from handlers import update_db
    update_db()

    ''' Starts the application '''
    from handlers import start_server
    logging.info(INFO + '%s : Starting RTB on port %s' % (current_time(), options.listen_port))
    start_server()
コード例 #4
0
def start():
    ''' Update the database schema '''
    try:
        from handlers import update_db
        update_db()
    except Exception as error:
        logging.error("Error: %s" % error)
        os._exit(1)

    ''' Starts the application '''
    from handlers import start_server
    logging.info(INFO + '%s : Starting RTB on port %s' % (current_time(), options.listen_port))
    start_server()
コード例 #5
0
ファイル: rootthebox.py プロジェクト: keoni161/RootTheBox
def start():
    ''' Update the database schema '''
    try:
        from handlers import update_db
        update_db()
    except:
        logging.fatal("Error: Unable to verify the db schema.  '--setup=prod' or '--setup=dev' can be used to create the database.")
        os._exit(1)

    ''' Starts the application '''
    from handlers import start_server
    logging.info(INFO + '%s : Starting RTB on port %s' % (current_time(), options.listen_port))
    start_server()
コード例 #6
0
ファイル: rootthebox.py プロジェクト: leroywhite/RootTheBox
def start():
    ''' Update the database schema '''
    try:
        from handlers import update_db
        update_db()
    except Exception as error:
        logging.error("Error: %s" % error)
        if "Can't locate revision identified" not in str(error):
            #Skipped if alembic record ahead for branch compatibility
            os._exit(1)
    ''' Starts the application '''
    from handlers import start_server
    logging.info(INFO + '%s : Starting RTB on port %s' %
                 (current_time(), options.listen_port))
    start_server()
コード例 #7
0
ファイル: rootthebox.py プロジェクト: moloch--/RootTheBox
def start():
    ''' Update the database schema '''
    try:
        from handlers import update_db
        update_db()
    except Exception as error:
        logging.error("Error: %s" % error)
        if "Can't locate revision identified" not in str(error):
            #Skipped if alembic record ahead for branch compatibility
            os._exit(1)
        
    ''' Starts the application '''
    from handlers import start_server
    logging.info(INFO + '%s : Starting RTB on port %s' % (current_time(), options.listen_port))
    start_server()
コード例 #8
0
def start():
    """ Update the database schema """
    try:
        from handlers import update_db

        update_db()
    except Exception as error:
        logging.error("Error: %s" % error)
        if "Can't locate revision identified" not in str(error):
            # Skipped if alembic record ahead for branch compatibility
            os._exit(1)

    """ Starts the application """
    from handlers import start_server

    if options.setup.startswith("docker"):
        # Would be nice to grab this info from the container in case it is changed
        port = "80:8888"
        listenport = "Docker port mapping " + port
    else:
        listenport = "port " + str(options.listen_port)
    print(INFO + bold + G + "Starting RTB on %s" % listenport)

    result = start_server()
    if result == "restart":
        restart()
コード例 #9
0
def start():
    """ Update the database schema """
    try:
        from handlers import update_db

        update_db()
    except Exception as error:
        logging.error("Error: %s" % error)
        if "Can't locate revision identified" not in str(error):
            # Skipped if alembic record ahead for branch compatibility
            os._exit(1)
    """ Starts the application """
    from handlers import start_server, load_history

    load_history()

    prefix = "https://" if options.ssl else "http://"
    # TODO For docker, it would be nice to grab the mapped docker port
    listenport = C + "%slocalhost:%s" % (prefix, str(options.listen_port)) + W
    sys.stdout.flush()
    try:
        print(INFO + bold + R + "Starting RTB on %s" % listenport, flush=True)
    except TypeError:
        print(INFO + bold + R + "Starting RTB on %s" % listenport)
    if len(options.mail_host) > 0 and "localhost" in options.origin:
        logging.warning(
            "%sWARNING:%s Invalid 'origin' configuration (localhost) for Email support %s"
            % (WARN + bold + R, W, WARN))

    result = start_server()
    if result == "restart":
        restart()
コード例 #10
0
ファイル: rootthebox.py プロジェクト: bkimminich/RootTheBox
def start():
    """ Update the database schema """
    try:
        from handlers import update_db

        update_db()
    except Exception as error:
        logging.error("Error: %s" % error)
        if "Can't locate revision identified" not in str(error):
            # Skipped if alembic record ahead for branch compatibility
            os._exit(1)
    """ Starts the application """
    from handlers import start_server

    prefix = "https://" if options.ssl else "http://"
    # TODO For docker, it would be nice to grab the mapped docker port
    listenport = C + "%slocalhost:%s" % (prefix, str(options.listen_port)) + W
    sys.stdout.flush()
    try:
        print(INFO + bold + R + "Starting RTB on %s" % listenport, flush=True)
    except:
        print(INFO + bold + R + "Starting RTB on %s" % listenport)

    result = start_server()
    if result == "restart":
        restart()
コード例 #11
0
ファイル: rootthebox.py プロジェクト: lavalamp-/RootTheBox
def serve(options, *args, **kwargs):
    ''' Starts the application '''
    from libs.ConfigManager import ConfigManager  # Sets up logging
    from handlers import start_server
    print(INFO+'%s : Starting application ...' % current_time())
    start_server()
コード例 #12
0
ファイル: rootthebox.py プロジェクト: sporky/RootTheBox
def start():
    ''' Starts the application '''
    from handlers import start_server
    print(INFO + '%s : Starting application ...' % current_time())
    start_server()
コード例 #13
0
def serve():
    ''' Starts the application '''
    from handlers import start_server

    print(INFO + '%s : Starting application ...' % current_time())
    start_server()
コード例 #14
0
ファイル: sonar-server.py プロジェクト: moloch--/Sonar-Server
def start():
    ''' Starts the application '''
    from handlers import start_server
    logging.info("Starting application server")
    start_server()
コード例 #15
0
def serve():
    ''' Starts the application '''
    from libs.ConfigManager import ConfigManager  # Sets up logging
    from handlers import start_server
    print(INFO + '%s : Starting application ... ' % current_time())
    start_server()
コード例 #16
0
def serve():
    """
    serves the application
    ----------------------
    """
    start_server()
コード例 #17
0
def serve():
    """ Starts the application """
    start_server()
コード例 #18
0
def start():
    ''' Starts the application '''
    from handlers import start_server
    logging.info("Starting application server")
    start_server()