grr/server/grr_response_server/flows/general/hardware.py
def TableReceived(self, responses):
    """Store received ACPI tables from client in AFF4."""
    for response in responses:
      for log in response.logs:
        self.Log(log)

    table_signature = responses.request_data["table_signature"]

    if not responses.success:
      self.Log(
          "Error retrieving ACPI table with signature %s" % table_signature)
      return

    response = responses.First()

    if not response.acpi_tables:
      return

    self.Log("Retrieved ACPI table(s) with signature %s" % table_signature)

    for acpi_table_response in response.acpi_tables:
      acpi_table_response.table_signature = table_signature
      self.SendReply(acpi_table_response)

    # Writing files (or symlinks) into random places is not supported anymore in
    # the relational db schema. We are going to replace this with annotations
    # for collected temp files soon.
    if not data_store.RelationalDBReadEnabled():

      with data_store.DB.GetMutationPool() as mutation_pool:
        # TODO(amoser): Make this work in the UI!?
        collection_urn = self.client_urn.Add(
            "devices/chipsec/acpi/tables/%s" % table_signature)
        for acpi_table_response in response.acpi_tables:
          acpi_table_response.table_signature = table_signature
          hardware.ACPITableDataCollection.StaticAdd(
              collection_urn, acpi_table_response, mutation_pool=mutation_pool)
Store received ACPI tables from client in AFF4.
Store received ACPI tables from client in AFF4.
Store received ACPI tables from client in AFF4 .
def TableReceived(self, responses):
    for response in responses:
      for log in response.logs:
        self.Log(log)
    table_signature = responses.request_data["table_signature"]
    if not responses.success:
      self.Log(
          "Error retrieving ACPI table with signature %s" % table_signature)
      return
    response = responses.First()
    if not response.acpi_tables:
      return
    self.Log("Retrieved ACPI table(s) with signature %s" % table_signature)
    for acpi_table_response in response.acpi_tables:
      acpi_table_response.table_signature = table_signature
      self.SendReply(acpi_table_response)
    if not data_store.RelationalDBReadEnabled():
      with data_store.DB.GetMutationPool() as mutation_pool:
        collection_urn = self.client_urn.Add(
            "devices/chipsec/acpi/tables/%s" % table_signature)
        for acpi_table_response in response.acpi_tables:
          acpi_table_response.table_signature = table_signature
          hardware.ACPITableDataCollection.StaticAdd(
              collection_urn, acpi_table_response, mutation_pool=mutation_pool)
def TableReceived ( self , responses ) : for response in responses : for log in response . logs : self . Log ( log ) table_signature = responses . request_data [ "table_signature" ] if not responses . success : self . Log ( "Error retrieving ACPI table with signature %s" % table_signature ) return response = responses . First ( ) if not response . acpi_tables : return self . Log ( "Retrieved ACPI table(s) with signature %s" % table_signature ) for acpi_table_response in response . acpi_tables : acpi_table_response . table_signature = table_signature self . SendReply ( acpi_table_response ) if not data_store . RelationalDBReadEnabled ( ) : with data_store . DB . GetMutationPool ( ) as mutation_pool : collection_urn = self . client_urn . Add ( "devices/chipsec/acpi/tables/%s" % table_signature ) for acpi_table_response in response . acpi_tables : acpi_table_response . table_signature = table_signature hardware . ACPITableDataCollection . StaticAdd ( collection_urn , acpi_table_response , mutation_pool = mutation_pool )
Store received ACPI tables from client in AFF4.
Store received ACPI tables from client in AFF4 .
"""Store received ACPI tables from client in AFF4.""" # Writing files (or symlinks) into random places is not supported anymore in # the relational db schema. We are going to replace this with annotations # for collected temp files soon. # TODO(amoser): Make this work in the UI!?
self
responses