Skip to content

Commit

Permalink
Remove apply_parsers args (#878)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomchop authored May 31, 2024
1 parent 5e0576d commit c659150
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
12 changes: 6 additions & 6 deletions dftimewolf/lib/collectors/grr_hosts.py
Original file line number Diff line number Diff line change
Expand Up @@ -859,12 +859,12 @@ def Process(self, container: containers.Host
self.use_raw_filesystem_access = True

flow_args = flows_pb2.ArtifactCollectorFlowArgs(
artifact_list=artifact_list,
use_raw_filesystem_access=self.use_raw_filesystem_access,
ignore_interpolation_errors=True,
apply_parsers=False,
max_file_size=self.max_file_size,
implementation_type=jobs_pb2.PathSpec.ImplementationType.DIRECT)
artifact_list=artifact_list,
use_raw_filesystem_access=self.use_raw_filesystem_access,
ignore_interpolation_errors=True,
max_file_size=self.max_file_size,
implementation_type=jobs_pb2.PathSpec.ImplementationType.DIRECT,
)
flow_id = self._LaunchFlow(client, 'ArtifactCollectorFlow', flow_args)
if not flow_id:
msg = f'Flow could not be launched on {client.client_id:s}.'
Expand Down
10 changes: 5 additions & 5 deletions dftimewolf/lib/collectors/grr_hunt.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,11 @@ def Process(self) -> None:
"""
self.logger.debug(f"Artifacts to be collected: {self.artifacts!s}")
hunt_args = grr_flows.ArtifactCollectorFlowArgs(
artifact_list=self.artifacts,
use_raw_filesystem_access=self.use_raw_filesystem_access,
ignore_interpolation_errors=True,
apply_parsers=False,
max_file_size=self.max_file_size)
artifact_list=self.artifacts,
use_raw_filesystem_access=self.use_raw_filesystem_access,
ignore_interpolation_errors=True,
max_file_size=self.max_file_size,
)
self._CreateAndStartHunt('ArtifactCollectorFlow', hunt_args)


Expand Down
1 change: 0 additions & 1 deletion tests/lib/collectors/grr_hosts.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,6 @@ def testProcessSpecificArtifacts(self,
self.grr_artifact_collector.PostProcess()

kwargs = mock_ArtifactCollectorFlowArgs.call_args[1]
self.assertFalse(kwargs['apply_parsers']) # default argument
self.assertTrue(kwargs['ignore_interpolation_errors']) # default argument
self.assertFalse(kwargs['use_raw_filesystem_access'])
self.assertEqual(kwargs['max_file_size'], 1234)
Expand Down

0 comments on commit c659150

Please sign in to comment.