# the "exec_date" is used as the "date" field in the datastore exec_date = strftime("%a, %d %b %Y %H:%M:%S", gmtime()) # 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: u = AnalyzeUsers() if u is not None: u.analyze() users = u.data data_science = DataScience(ORM, users, "users") all_entries = data_science.get_all() 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))
########################################################################### # Gather data ########################################################################### try: a = AnalyzePlist() if a is not None: plist_pre_changed_files = a.pre_changed_files plist_post_changed_files = a.post_changed_files 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)
# 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 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))
# 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))
# 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))
# 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))
# 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))