Exemple #1
0
 def ListErrors(self) -> utils.ItemsIterator[HuntError]:
     args = hunt_pb2.ApiListHuntErrorsArgs(hunt_id=self.hunt_id)
     items = self._context.SendIteratorRequest("ListHuntErrors", args)
     return utils.MapItemsIterator(
         lambda data: HuntError(data=data, context=self._context), items)
Exemple #2
0
 def ListClients(self, client_status):
     args = hunt_pb2.ApiListHuntClientsArgs(hunt_id=self.hunt_id,
                                            client_status=client_status)
     items = self._context.SendIteratorRequest("ListHuntClients", args)
     return utils.MapItemsIterator(
         lambda data: HuntClient(data=data, context=self._context), items)
Exemple #3
0
 def ListLogs(self):
   args = flow_pb2.ApiListFlowLogsArgs(
       client_id=self.client_id, flow_id=self.flow_id)
   items = self._context.SendIteratorRequest("ListFlowLogs", args)
   return utils.MapItemsIterator(lambda data: FlowLog(data=data), items)
Exemple #4
0
 def ListCrashes(self):
     args = hunt_pb2.ApiListHuntCrashesArgs(hunt_id=self.hunt_id)
     items = self._context.SendIteratorRequest("ListHuntCrashes", args)
     return utils.MapItemsIterator(
         lambda data: client.ClientCrash(data=data, context=self._context),
         items)
Exemple #5
0
 def ListLogs(self):
     args = hunt_pb2.ApiListHuntLogsArgs(hunt_id=self.hunt_id)
     items = self._context.SendIteratorRequest("ListHuntLogs", args)
     return utils.MapItemsIterator(
         lambda data: HuntLog(data=data, context=self._context), items)
Exemple #6
0
 def ListResults(self) -> utils.ItemsIterator[FlowResult]:
     args = flow_pb2.ApiListFlowResultsArgs(client_id=self.client_id,
                                            flow_id=self.flow_id)
     items = self._context.SendIteratorRequest("ListFlowResults", args)
     return utils.MapItemsIterator(lambda data: FlowResult(data=data),
                                   items)
Exemple #7
0
def ListHunts(context=None):
  """List all GRR hunts."""

  items = context.SendIteratorRequest("ListHunts", hunt_pb2.ApiListHuntsArgs())
  return utils.MapItemsIterator(lambda data: Hunt(data=data, context=context),
                                items)
Exemple #8
0
def ListGrrBinaries(context=None):
    """Lists all registered Grr binaries."""

    items = context.SendIteratorRequest("ListGrrBinaries", None)
    return utils.MapItemsIterator(
        lambda data: GrrBinary(data=data, context=context), items)