Пример #1
0
def main():
    logo()
    check_dependencies()
    check_working_directory()
    check_configs()
    create_structure()
    init_logging()

    parser = argparse.ArgumentParser()
    parser.add_argument("-q", "--quiet", help="Display only error messages", action="store_true", required=False)
    parser.add_argument("-d", "--debug", help="Display debug messages", action="store_true", required=False)
    parser.add_argument("-v", "--version", action="version", version="You are running Cuckoo Sandbox %s" % CUCKOO_VERSION)
    parser.add_argument("-l", "--logo", help="Show artwork", action="store_true", required=False)
    args = parser.parse_args()

    if args.logo:
        import time
        try:
            while True:
                time.sleep(1)
                logo()
        except KeyboardInterrupt:
            return

    if args.quiet:
        log.setLevel(logging.WARN)
    elif args.debug:
        log.setLevel(logging.DEBUG)

    try:
        sched = Scheduler()
        sched.start()
    except KeyboardInterrupt:
        sched.stop()
Пример #2
0
def main():
    logo()
    check_working_directory()
    check_configs()
    check_version()
    create_structure()

    parser = argparse.ArgumentParser()
    parser.add_argument("-q",
                        "--quiet",
                        help="Display only error messages",
                        action="store_true",
                        required=False)
    parser.add_argument("-d",
                        "--debug",
                        help="Display debug messages",
                        action="store_true",
                        required=False)
    parser.add_argument(
        "-v",
        "--version",
        action="version",
        version="You are running Cuckoo Sandbox {0}".format(CUCKOO_VERSION))
    parser.add_argument("-a",
                        "--artwork",
                        help="Show artwork",
                        action="store_true",
                        required=False)
    args = parser.parse_args()

    if args.artwork:
        import time
        try:
            while True:
                time.sleep(1)
                logo()
        except KeyboardInterrupt:
            return

    init_logging()

    if args.quiet:
        log.setLevel(logging.WARN)
    elif args.debug:
        log.setLevel(logging.DEBUG)

    init_modules()
    init_tasks()

    Resultserver()

    try:
        sched = Scheduler()
        sched.start()
    except KeyboardInterrupt:
        sched.stop()
Пример #3
0
def cuckoo_main(max_analysis_count=0):
    cur_path = os.getcwd()
    os.chdir(CUCKOO_ROOT)

    try:
        sched = Scheduler(max_analysis_count)
        sched.start()
    except KeyboardInterrupt:
        sched.stop()

    os.chdir(cur_path)
Пример #4
0
def cuckoo_main(max_analysis_count=0):
    cur_path = os.getcwd()
    os.chdir(CUCKOO_ROOT)

    try:
        sched = Scheduler(max_analysis_count)
        sched.start()
    except KeyboardInterrupt:
        sched.stop()

    os.chdir(cur_path)
Пример #5
0
def cuckoo_main(max_analysis_count=0):
    """Cuckoo main loop.
    @param max_analysis_count: kill cuckoo after this number of analyses
    """
    cur_path = os.getcwd()
    os.chdir(CUCKOO_ROOT)

    try:
        sched = Scheduler(max_analysis_count)
        sched.start()
    except KeyboardInterrupt:
        sched.stop()

    os.chdir(cur_path)
Пример #6
0
def cuckoo_main(max_analysis_count=0):
    """Cuckoo main loop.
    @param max_analysis_count: kill cuckoo after this number of analyses
    """
    cur_path = os.getcwd()
    os.chdir(CUCKOO_ROOT)

    try:
        sched = Scheduler(max_analysis_count)
        sched.start()
    except KeyboardInterrupt:
        sched.stop()

    os.chdir(cur_path)
Пример #7
0
def main():
    logo()
    check_working_directory()
    check_configs()
    check_version()
    create_structure()

    parser = argparse.ArgumentParser()
    parser.add_argument("-q", "--quiet", help="Display only error messages", action="store_true", required=False)
    parser.add_argument("-d", "--debug", help="Display debug messages", action="store_true", required=False)
    parser.add_argument("-v", "--version", action="version", version="You are running Cuckoo Sandbox {0}".format(CUCKOO_VERSION))
    parser.add_argument("-a", "--artwork", help="Show artwork", action="store_true", required=False)
    parser.add_argument("-t", "--test", help="Test startup", action="store_true", required=False)
    args = parser.parse_args()

    if args.artwork:
        import time
        try:
            while True:
                time.sleep(1)
                logo()
        except KeyboardInterrupt:
            return

    init_logging()

    if args.quiet:
        log.setLevel(logging.WARN)
    elif args.debug:
        log.setLevel(logging.DEBUG)

    init_modules()
    init_tasks()

    # This is just a temporary hack, we need an actual test suite to integrate
    # with Travis-CI.
    if args.test:
        return

    Resultserver()

    try:
        sched = Scheduler()
        sched.start()
    except KeyboardInterrupt:
        sched.stop()
Пример #8
0
def main():
    logo()
    check_dependencies()
    check_working_directory()
    check_configs()
    create_structure()
    init_logging()

    parser = argparse.ArgumentParser()
    parser.add_argument("-q",
                        "--quiet",
                        help="Display only error messages",
                        action="store_true",
                        required=False)
    parser.add_argument("-d",
                        "--debug",
                        help="Display debug messages",
                        action="store_true",
                        required=False)
    parser.add_argument("-v",
                        "--version",
                        action="version",
                        version="You are running Cuckoo Sandbox %s" %
                        CUCKOO_VERSION)
    parser.add_argument("-l",
                        "--logo",
                        help="Show artwork",
                        action="store_true",
                        required=False)
    parser.add_argument("-g",
                        "--generate",
                        help="Generate databse",
                        action="store_true",
                        default=False,
                        required=False)
    args = parser.parse_args()

    if args.generate:
        log.info("Generating MySQL database.")
        from lib.cuckoo.core.database import Database
        db = Database()
        db.generate()

    if args.logo:
        import time
        try:
            while True:
                time.sleep(1)
                logo()
        except KeyboardInterrupt:
            return

    if args.quiet:
        log.setLevel(logging.WARN)
    elif args.debug:
        log.setLevel(logging.DEBUG)

    try:
        sched = Scheduler()
        sched.start()
    except KeyboardInterrupt:
        sched.stop()