interrogate.py 文件源码

python
阅读 143 收藏 0 点赞 0 评论 0

项目:rvmi-rekall 作者: fireeye 项目源码 文件源码
def process(self, context, ticket_location):
        """This method runs once on each ticket.

        Note that this method runs inside a threadpool.
        """
        components = ticket_location.to_path().split("/")

        # Ensure the ticket location matches the ticket content.
        if (components[-2] != self.client_id or
            components[-3] != self.__class__.__name__):
            raise IOError("Ticket location unexpected.")

        # Verify the client id and public key match.
        if self.public_key.client_id() != self.client_id:
            raise crypto.CipherError("Public key incompatible with client_id")

        # Update the client's record by deleting the old one and inserting a new
        # one.
        context["messages"].append(
            dict(client_id=self.client_id,
                 fqdn=self.system_info.fqdn,
                 system=self.system_info.system,
                 architecture=self.system_info.architecture,
                 boot_time=self.boot_time,
                 agent_start_time=self.agent_start_time,
             )
        )

        # Modify the client record atomically.
        self._config.server.client_record_for_server(
            self.client_id).read_modify_write(self._update_client_record)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号