Esempio n. 1
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)
Esempio n. 2
0
def ListHunts(context: context_lib.GrrApiContext) -> utils.ItemsIterator[Hunt]:
    """List all GRR hunts."""

    items = context.SendIteratorRequest("ListHunts",
                                        hunt_pb2.ApiListHuntsArgs())
    return utils.MapItemsIterator(
        lambda data: Hunt(data=data, context=context), items)