25
25
from plaso .lib import errors
26
26
from plaso .lib import loggers
27
27
from plaso .lib import specification
28
+ from plaso .storage .fake import writer as fake_writer
28
29
29
30
30
31
class ImageExportTool (storage_media_tool .StorageMediaTool ):
@@ -317,6 +318,9 @@ def _Extract(
317
318
extraction_engine .BuildArtifactsRegistry (
318
319
artifact_definitions_path , custom_artifacts_path )
319
320
321
+ storage_writer = fake_writer .FakeStorageWriter ()
322
+ storage_writer .Open ()
323
+
320
324
# If the source is a directory or a storage media image run pre-processing.
321
325
322
326
system_configurations = []
@@ -327,7 +331,7 @@ def _Extract(
327
331
# Setting storage writer to None here since we do not want to store
328
332
# preprocessing information.
329
333
system_configurations = extraction_engine .PreprocessSource (
330
- self ._file_system_path_specs , None ,
334
+ self ._file_system_path_specs , storage_writer ,
331
335
resolver_context = self ._resolver_context )
332
336
333
337
logger .debug ('Preprocessing done.' )
@@ -340,7 +344,7 @@ def _Extract(
340
344
341
345
environment_variables = (
342
346
extraction_engine .knowledge_base .GetEnvironmentVariables ())
343
- user_accounts = []
347
+ user_accounts = list ( storage_writer . GetAttributeContainers ( 'user_account' ))
344
348
345
349
try :
346
350
extraction_engine .BuildCollectionFilters (
0 commit comments