def _NewHunt(self):
"""Construct and start new GRR hunt.
Returns:
str representing hunt ID.
Raises:
RuntimeError: if no items specified for collection.
"""
artifact_list = self.artifacts.split(',')
if not artifact_list:
raise RuntimeError('Artifacts must be specified for artifact collection')
syslog.syslog('Artifacts to be collected: {0:s}'.format(self.artifacts))
hunt_name = 'ArtifactCollectorFlow'
hunt_args = flows_pb2.ArtifactCollectorFlowArgs(
artifact_list=artifact_list,
use_tsk=self.use_tsk,
ignore_interpolation_errors=True,
apply_parsers=False,)
return self._StartHunt(hunt_name, hunt_args)
评论列表
文章目录