Example #1
0
    def __init__(self, *args, **kwargs):
        super(AFF4Acquire, self).__init__(*args, **kwargs)

        if (not self.plugin_args.destination
                and not self.plugin_args.destination_url):
            raise plugin.PluginError(
                "A destination or destination_url must be specified.")

        if self.plugin_args.compression == "snappy":
            self.compression = lexicon.AFF4_IMAGE_COMPRESSION_SNAPPY
        elif self.plugin_args.compression == "stored":
            self.compression = lexicon.AFF4_IMAGE_COMPRESSION_STORED
        elif self.plugin_args.compression == "zlib":
            self.compression = lexicon.AFF4_IMAGE_COMPRESSION_ZLIB
        else:
            raise plugin.InvalidArgs("Unsupported compression %s " %
                                     self.plugin_args.compression)

        # Do not acquire memory if we are told to do something else as well,
        # unless specifically asked to.
        if self.plugin_args.also_memory == "auto":
            if any((self.plugin_args.also_mapped_files,
                    self.plugin_args.also_pagefile, self.plugin_args.files)):
                self.plugin_args.also_memory = False
            else:
                self.plugin_args.also_memory = True
Example #2
0
    def __init__(self, *args, **kwargs):
        super(LocalDiskCache, self).__init__(*args, **kwargs)
        if not self.cache_directory:
            self.cache_directory = cache.GetCacheDir(self._session)
            if not self.cache_directory:
                raise plugin.InvalidArgs("cache directory not specified.")

            self.cache_directory = os.path.join(self.cache_directory,
                                                "rekall_agent")
Example #3
0
    def validate(self):
        # pylint: disable=access-member-before-definition
        if not self.client_id:
            self.client_id = self._session.GetParameter(
                "controller_context") or None

        if not self.client_id and not self.queue:
            raise plugin.InvalidArgs(
                "Hunt Queue name must be provided if client id is "
                "not provided.")
Example #4
0
 def validate(self):
     super(FileFinderFlow, self).validate()
     if not self.globs:
         raise plugin.InvalidArgs("Some globs must be provided.")
Example #5
0
 def validate(self):
     super(ListDirectory, self).validate()
     if not self.path:
         raise plugin.InvalidArgs("Path must be set")
Example #6
0
 def validate(self):
     if not self.queue:
         raise plugin.InvalidArgs("A hunt queue must be provided.")