Skip to content

Commit

Permalink
Changes for image export #4708 (#4710)
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmetz authored Jul 18, 2023
1 parent 8b9bff7 commit d806b15
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions plaso/cli/image_export_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
from plaso.lib import errors
from plaso.lib import loggers
from plaso.lib import specification
from plaso.storage.fake import writer as fake_writer


class ImageExportTool(storage_media_tool.StorageMediaTool):
Expand Down Expand Up @@ -317,6 +318,9 @@ def _Extract(
extraction_engine.BuildArtifactsRegistry(
artifact_definitions_path, custom_artifacts_path)

storage_writer = fake_writer.FakeStorageWriter()
storage_writer.Open()

# If the source is a directory or a storage media image run pre-processing.

system_configurations = []
Expand All @@ -327,7 +331,7 @@ def _Extract(
# Setting storage writer to None here since we do not want to store
# preprocessing information.
system_configurations = extraction_engine.PreprocessSource(
self._file_system_path_specs, None,
self._file_system_path_specs, storage_writer,
resolver_context=self._resolver_context)

logger.debug('Preprocessing done.')
Expand All @@ -340,7 +344,7 @@ def _Extract(

environment_variables = (
extraction_engine.knowledge_base.GetEnvironmentVariables())
user_accounts = []
user_accounts = list(storage_writer.GetAttributeContainers('user_account'))

try:
extraction_engine.BuildCollectionFilters(
Expand Down

0 comments on commit d806b15

Please sign in to comment.