Skip to content

Commit d806b15

Browse files
authored
Changes for image export #4708 (#4710)
1 parent 8b9bff7 commit d806b15

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

plaso/cli/image_export_tool.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
from plaso.lib import errors
2626
from plaso.lib import loggers
2727
from plaso.lib import specification
28+
from plaso.storage.fake import writer as fake_writer
2829

2930

3031
class ImageExportTool(storage_media_tool.StorageMediaTool):
@@ -317,6 +318,9 @@ def _Extract(
317318
extraction_engine.BuildArtifactsRegistry(
318319
artifact_definitions_path, custom_artifacts_path)
319320

321+
storage_writer = fake_writer.FakeStorageWriter()
322+
storage_writer.Open()
323+
320324
# If the source is a directory or a storage media image run pre-processing.
321325

322326
system_configurations = []
@@ -327,7 +331,7 @@ def _Extract(
327331
# Setting storage writer to None here since we do not want to store
328332
# preprocessing information.
329333
system_configurations = extraction_engine.PreprocessSource(
330-
self._file_system_path_specs, None,
334+
self._file_system_path_specs, storage_writer,
331335
resolver_context=self._resolver_context)
332336

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

341345
environment_variables = (
342346
extraction_engine.knowledge_base.GetEnvironmentVariables())
343-
user_accounts = []
347+
user_accounts = list(storage_writer.GetAttributeContainers('user_account'))
344348

345349
try:
346350
extraction_engine.BuildCollectionFilters(

0 commit comments

Comments
 (0)