Ejemplo n.º 1
0
def main():
    arguments = get_arguments()
    options = arguments.parse_args()

    set_debug_level(options.debug)

    tsk_img = pytsk3.Img_Info(options.source)

    plist = None
    if options.plugins:
        plist = Pm.plugin_list_from_string(options.plugins)

    pm = Pm.PluginManager(plugin_list=plist)

    reg_manager = Rm.RegistryManager()

    enumerator = Eh.LogicalEnumerator(options.temp_dir, tsk_img, reg_manager)
    enumerator.load_registry_files()

    pm.run_plugins(reg_manager)
Ejemplo n.º 2
0
def lookup_modules():
    manager = PluginManager()
    manager.discover("modules")
    modules = manager.get_all_plugins()
    return dict(map(lambda cls: (cls.plugin_name, cls), modules))
Ejemplo n.º 3
0
# disable insecure serializer (disabled by default from 3.x.x)
if (kombu.VERSION.major) < 3:
    kombu.disable_insecure_serializers()

# declare a new Local Probe application
probe_app = Celery("probe.tasks")
config.conf_probe_celery(probe_app)
config.configure_syslog(probe_app)

# discover plugins located at specified path
plugin_path = os.path.abspath("modules")
if not os.path.exists(plugin_path):
    log.error("path {0} is invalid, cannot load probes".format(plugin_path))
    sys.exit(1)
manager = PluginManager()
manager.discover(plugin_path)

# determine dynamically queues to connect to using plugin names
probes = manager.get_all_plugins()
if not probes:
    log.error("No probe found, exiting application")
    sys.exit(1)


# enable (whitelist) disable (blacklist) management
# check if there is a blacklist/whitelist
if config.check_error_list():
    log.error("Enabled and disabled lists are both set, only one is permitted")
    sys.exit(1)
disabled_list = config.get_disabled_list()
Ejemplo n.º 4
0
# disable insecure serializer (disabled by default from 3.x.x)
if (kombu.VERSION.major) < 3:
    kombu.disable_insecure_serializers()

# declare a new application
app = Celery("probe.tasks")
config.conf_probe_celery(app)
config.configure_syslog(app)

# discover plugins located at specified path
plugin_path = os.path.abspath("modules")
if not os.path.exists(plugin_path):
    log.error("path {0} is invalid, cannot load probes".format(plugin_path))
    sys.exit(1)
manager = PluginManager()
manager.discover(plugin_path)

# determine dynamically queues to connect to using plugin names
probes = PluginManager().get_all_plugins()
if not probes:
    log.error("No probe found, exiting application")
    sys.exit(1)

# display successfully loaded plugin
for p in probes:
    log.warn(' *** [{category}] Plugin {name} successfully loaded'
             .format(category=p.plugin_category, name=p.plugin_name))

# instanciation of probes and queue creation
probes = dict((probe.plugin_name, probe()) for probe in probes)
Ejemplo n.º 5
0
# disable insecure serializer (disabled by default from 3.x.x)
if (kombu.VERSION.major) < 3:
    kombu.disable_insecure_serializers()

# declare a new Local Probe application
probe_app = Celery("probe.tasks")
config.conf_probe_celery(probe_app)
config.configure_syslog(probe_app)

# discover plugins located at specified path
plugin_path = os.path.abspath("modules")
if not os.path.exists(plugin_path):
    log.error("path {0} is invalid, cannot load probes".format(plugin_path))
    sys.exit(1)
manager = PluginManager()
manager.discover(plugin_path)

# determine dynamically queues to connect to using plugin names
probes = PluginManager().get_all_plugins()
if not probes:
    log.error("No probe found, exiting application")
    sys.exit(1)


queues = []
for p in probes:
    # display successfully loaded plugin
    probe_name = p.plugin_name
    probe_category = p.plugin_category
    log.info(' *** [{category}] Plugin {name} successfully loaded'
Ejemplo n.º 6
0
# disable insecure serializer (disabled by default from 3.x.x)
if (kombu.VERSION.major) < 3:
    kombu.disable_insecure_serializers()

# declare a new application
app = Celery("probe.tasks")
config.conf_probe_celery(app)
config.configure_syslog(app)

# discover plugins located at specified path
plugin_path = os.path.abspath("modules")
if not os.path.exists(plugin_path):
    log.error("path {0} is invalid, cannot load probes".format(plugin_path))
    sys.exit(1)
manager = PluginManager()
manager.discover(plugin_path)

# determine dynamically queues to connect to using plugin names
probes = PluginManager().get_all_plugins()
if not probes:
    log.error("No probe found, exiting application")
    sys.exit(1)

# display successfully loaded plugin
for p in probes:
    log.warn(' *** [{category}] Plugin {name} successfully loaded'
             .format(category=p.plugin_category, name=p.plugin_name))

# instanciation of probes and queue creation
probes = dict((probe.plugin_name, probe()) for probe in probes)