unpack_kdbg_kit.py 文件源码

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

项目:rvmi-rekall 作者: fireeye 项目源码 文件源码
def run_xz_decompress(stdout, stderr=None):
    """Run xz --decompress and return a contextmanager object for the proc."""
    xz = None
    try:
        xz = subprocess.Popen(["xz", "--decompress", "--stdout"],
                              stdin=subprocess.PIPE, stdout=stdout,
                              stderr=stderr)
        yield xz
    finally:
        if not xz:
            raise OSError("You must have an 'xz' binary in PATH.")

        xz.stdin.close()
        result = xz.wait()

        if result != 0:
            raise IOError("xz --decompress returned %d." % result)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号