Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 3
0
Arquivo: flow.py Projeto: tkuennen/grr
 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)