Beispiel #1
0
                "plist",
                "name",
                plist_pre_changed_files,
            )
            data_science.get_changed_entries()

            data_science = DataScience(
                ORM,
                plist_post_new_files,
                "plist",
                "name",
                plist_pre_new_files,
            )
            data_science.get_new_entries()
    except Exception, error:
        print error_running_file(__file__, "lad", error)

    try:
        a = AnalyzeKexts()
        if a is not None:
            a.analyze()
            kext_data = a.data

            data_science = DataScience(ORM, kext_data, "kexts")
            data_science.get_all()
    except Exception, error:
        print error_running_file(__file__, "analyze_kexts", error)

    try:
        a = AnalyzeFirewallKeys()
        if a is not None:
    # the table definitions are stored in a library file. this is instantiating
    # the ORM object and initializing the tables
    ORM = TyORM(Config.get("database"))
    if isfile(Config.get("database")):
        chmod(Config.get("database"), 0600)
    for k, v in tables.iteritems():
        ORM.initialize_table(k, v)

    ###########################################################################
    # Gather data
    ###########################################################################
    try:
        a = AnalyzeFirewallKeys()
        if a is not None:
            a.analyze()
            firewall_keys_data = a.data

            data_science = DataScience(ORM, firewall_keys_data,
                                       "firewall_keys")
            data_science.get_all()
    except Exception, error:
        print error_running_file(__file__, "analyze_firewall_keys", error)

    end = time()

    # to see how long this module took to execute, launch the module with
    # "--log" as a command line argument
    if "--log" in argv[1:]:
        logging.basicConfig(format='%(message)s', level=logging.INFO)
    logging.info("Execution took %s seconds.", str(end - start))
Beispiel #3
0
            plist_pre_new_files = a.pre_new_files
            plist_post_new_files = a.post_new_files

            data_science = DataScience(
                ORM,
                plist_post_changed_files,
                "plist",
                "name",
                plist_pre_changed_files,
            )
            data_science.get_changed_entries()

            data_science = DataScience(
                ORM,
                plist_post_new_files,
                "plist",
                "name",
                plist_pre_new_files,
            )
            data_science.get_new_entries()
    except Exception, error:
        print error_running_file(__file__, "lad", error)

    end = time()

    # to see how long this module took to execute, launch the module with
    # "--log" as a command line argument
    if "--log" in argv[1:]:
        logging.basicConfig(format='%(message)s', level=logging.INFO)
    logging.info("Execution took %s seconds.", str(end - start))
    for k, v in tables.iteritems():
        ORM.initialize_table(k, v)

    ###########################################################################
    # Gather data
    ###########################################################################
    try:
        a = AnalyzeFirewallExplicitauths()
        if a is not None:
            a.analyze()
            firewall_explicitauths_data = a.data

            data_science = DataScience(
                ORM,
                firewall_explicitauths_data,
                "firewall_explicitauths"
            )
            data_science.get_all()
    except Exception, error:
        print error_running_file(__file__,
                                 "analyze_firewall_explicit_auths",
                                 error)

    end = time()

    # to see how long this module took to execute, launch the module with
    # "--log" as a command line argument
    if "--log" in argv[1:]:
        logging.basicConfig(format='%(message)s', level=logging.INFO)
    logging.info("Execution took %s seconds.", str(end - start))
    # the ORM object and initializing the tables
    ORM = TyORM(Config.get("database"))
    if isfile(Config.get("database")):
        chmod(Config.get("database"), 0600)
    for k, v in tables.iteritems():
        ORM.initialize_table(k, v)

    ###########################################################################
    # Gather data
    ###########################################################################
    try:
        a = AnalyzeFirewallExplicitauths()
        if a is not None:
            a.analyze()
            firewall_explicitauths_data = a.data

            data_science = DataScience(ORM, firewall_explicitauths_data,
                                       "firewall_explicitauths")
            data_science.get_all()
    except Exception, error:
        print error_running_file(__file__, "analyze_firewall_explicit_auths",
                                 error)

    end = time()

    # to see how long this module took to execute, launch the module with
    # "--log" as a command line argument
    if "--log" in argv[1:]:
        logging.basicConfig(format='%(message)s', level=logging.INFO)
    logging.info("Execution took %s seconds.", str(end - start))
    # the ORM object and initializing the tables
    ORM = TyORM(Config.get("database"))
    if isfile(Config.get("database")):
        chmod(Config.get("database"), 0600)
    for k, v in tables.iteritems():
        ORM.initialize_table(k, v)

    ###########################################################################
    # Gather data
    ###########################################################################
    try:
        a = AnalyzeFirewallApplications()
        if a is not None:
            a.analyze()
            firewall_applications_data = a.data

            data_science = DataScience(ORM, firewall_applications_data,
                                       "firewall_applications")
            data_science.get_all()
    except Exception, error:
        print error_running_file(__file__, "analyze_firewall_applications",
                                 error)

    end = time()

    # to see how long this module took to execute, launch the module with
    # "--log" as a command line argument
    if "--log" in argv[1:]:
        logging.basicConfig(format='%(message)s', level=logging.INFO)
    logging.info("Execution took %s seconds.", str(end - start))
    if isfile(Config.get("database")):
        chmod(Config.get("database"), 0600)
    for k, v in tables.iteritems():
        ORM.initialize_table(k, v)

    ###########################################################################
    # Gather data
    ###########################################################################
    try:
        a = AnalyzeFirewallKeys()
        if a is not None:
            a.analyze()
            firewall_keys_data = a.data

            data_science = DataScience(
                ORM,
                firewall_keys_data,
                "firewall_keys"
            )
            data_science.get_all()
    except Exception, error:
        print error_running_file(__file__, "analyze_firewall_keys", error)

    end = time()

    # to see how long this module took to execute, launch the module with
    # "--log" as a command line argument
    if "--log" in argv[1:]:
        logging.basicConfig(format='%(message)s', level=logging.INFO)
    logging.info("Execution took %s seconds.", str(end - start))
    # the ORM object and initializing the tables
    ORM = TyORM(Config.get("database"))
    if isfile(Config.get("database")):
        chmod(Config.get("database"), 0600)
    for k, v in tables.iteritems():
        ORM.initialize_table(k, v)

    ###########################################################################
    # Gather data
    ###########################################################################
    try:
        a = AnalyzeFirewallExceptions()
        if a is not None:
            a.analyze()
            firewall_exceptions_data = a.data

            data_science = DataScience(ORM, firewall_exceptions_data,
                                       "firewall_exceptions")
            data_science.get_all()
    except Exception, error:
        print error_running_file(__file__, "analyze_firewall_exceptions",
                                 error)

    end = time()

    # to see how long this module took to execute, launch the module with
    # "--log" as a command line argument
    if "--log" in argv[1:]:
        logging.basicConfig(format='%(message)s', level=logging.INFO)
    logging.info("Execution took %s seconds.", str(end - start))
    if isfile(Config.get("database")):
        chmod(Config.get("database"), 0600)
    for k, v in tables.iteritems():
        ORM.initialize_table(k, v)

    ###########################################################################
    # Gather data
    ###########################################################################
    try:
        a = AnalyzeFirewallProcesses()
        if a is not None:
            a.analyze()
            firewall_processes_data = a.data

            data_science = DataScience(
                ORM,
                firewall_processes_data,
                "firewall_processes"
            )
            data_science.get_all()
    except Exception, error:
        print error_running_file(__file__, "analyze_firewall_processes", error)

    end = time()

    # to see how long this module took to execute, launch the module with
    # "--log" as a command line argument
    if "--log" in argv[1:]:
        logging.basicConfig(format='%(message)s', level=logging.INFO)
    logging.info("Execution took %s seconds.", str(end - start))
            plist_pre_new_files = a.pre_new_files
            plist_post_new_files = a.post_new_files

            data_science = DataScience(
                ORM,
                plist_post_changed_files,
                "plist",
                "name",
                plist_pre_changed_files,
            )
            data_science.get_changed_entries()

            data_science = DataScience(
                ORM,
                plist_post_new_files,
                "plist",
                "name",
                plist_pre_new_files,
            )
            data_science.get_new_entries()
    except Exception, error:
        print error_running_file(__file__, "lad", error)

    end = time()

    # to see how long this module took to execute, launch the module with
    # "--log" as a command line argument
    if "--log" in argv[1:]:
        logging.basicConfig(format='%(message)s', level=logging.INFO)
    logging.info("Execution took %s seconds.", str(end - start))
    # the table definitions are stored in a library file. this is instantiating
    # the ORM object and initializing the tables
    ORM = TyORM(Config.get("database"))
    if isfile(Config.get("database")):
        chmod(Config.get("database"), 0600)
    for k, v in tables.iteritems():
        ORM.initialize_table(k, v)

    ###########################################################################
    # Gather data
    ###########################################################################
    try:
        a = AnalyzeFirewallProcesses()
        if a is not None:
            a.analyze()
            firewall_processes_data = a.data

            data_science = DataScience(ORM, firewall_processes_data,
                                       "firewall_processes")
            data_science.get_all()
    except Exception, error:
        print error_running_file(__file__, "analyze_firewall_processes", error)

    end = time()

    # to see how long this module took to execute, launch the module with
    # "--log" as a command line argument
    if "--log" in argv[1:]:
        logging.basicConfig(format='%(message)s', level=logging.INFO)
    logging.info("Execution took %s seconds.", str(end - start))
    for k, v in tables.iteritems():
        ORM.initialize_table(k, v)

    ###########################################################################
    # Gather data
    ###########################################################################
    try:
        a = AnalyzeFirewallExceptions()
        if a is not None:
            a.analyze()
            firewall_exceptions_data = a.data

            data_science = DataScience(
                ORM,
                firewall_exceptions_data,
                "firewall_exceptions"
            )
            data_science.get_all()
    except Exception, error:
        print error_running_file(__file__,
                                 "analyze_firewall_exceptions",
                                 error)

    end = time()

    # to see how long this module took to execute, launch the module with
    # "--log" as a command line argument
    if "--log" in argv[1:]:
        logging.basicConfig(format='%(message)s', level=logging.INFO)
    logging.info("Execution took %s seconds.", str(end - start))
Beispiel #13
0
    # the table definitions are stored in a library file. this is instantiating
    # the ORM object and initializing the tables
    ORM = TyORM(Config.get("database"))
    if isfile(Config.get("database")):
        chmod(Config.get("database"), 0600)
    for k, v in tables.iteritems():
        ORM.initialize_table(k, v)

    ###########################################################################
    # Gather data
    ###########################################################################
    try:
        a = AnalyzeKexts()
        if a is not None:
            a.analyze()
            kext_data = a.data

            data_science = DataScience(ORM, kext_data, "kexts")
            data_science.get_all()
    except Exception, error:
        print error_running_file(__file__, "analyze_kexts", error)

    end = time()

    # to see how long this module took to execute, launch the module with
    # "--log" as a command line argument
    if "--log" in argv[1:]:
        logging.basicConfig(format='%(message)s', level=logging.INFO)
    logging.info("Execution took %s seconds.", str(end - start))
    for k, v in tables.iteritems():
        ORM.initialize_table(k, v)

    ###########################################################################
    # Gather data
    ###########################################################################
    try:
        a = AnalyzeFirewallApplications()
        if a is not None:
            a.analyze()
            firewall_applications_data = a.data

            data_science = DataScience(
                ORM,
                firewall_applications_data,
                "firewall_applications"
            )
            data_science.get_all()
    except Exception, error:
        print error_running_file(__file__,
                                 "analyze_firewall_applications",
                                 error)

    end = time()

    # to see how long this module took to execute, launch the module with
    # "--log" as a command line argument
    if "--log" in argv[1:]:
        logging.basicConfig(format='%(message)s', level=logging.INFO)
    logging.info("Execution took %s seconds.", str(end - start))
Beispiel #15
0
                "plist",
                "name",
                plist_pre_changed_files,
            )
            data_science.get_changed_entries()

            data_science = DataScience(
                ORM,
                plist_post_new_files,
                "plist",
                "name",
                plist_pre_new_files,
            )
            data_science.get_new_entries()
    except Exception, error:
        print error_running_file(__file__, "lad", error)

    try:
        a = AnalyzeKexts()
        if a is not None:
            a.analyze()
            kext_data = a.data

            data_science = DataScience(ORM, kext_data, "kexts")
            data_science.get_all()
    except Exception, error:
        print error_running_file(__file__, "analyze_kexts", error)

    try:
        a = AnalyzeFirewallKeys()
        if a is not None:
    # the table definitions are stored in a library file. this is instantiating
    # the ORM object and initializing the tables
    ORM = TyORM(Config.get("database"))
    if isfile(Config.get("database")):
        chmod(Config.get("database"), 0600)
    for k, v in tables.iteritems():
        ORM.initialize_table(k, v)

    ###########################################################################
    # Gather data
    ###########################################################################
    try:
        a = AnalyzeKexts()
        if a is not None:
            a.analyze()
            kext_data = a.data

            data_science = DataScience(ORM, kext_data, "kexts")
            data_science.get_all()
    except Exception, error:
        print error_running_file(__file__, "analyze_kexts", error)

    end = time()

    # to see how long this module took to execute, launch the module with
    # "--log" as a command line argument
    if "--log" in argv[1:]:
        logging.basicConfig(format='%(message)s', level=logging.INFO)
    logging.info("Execution took %s seconds.", str(end - start))