extract.py 文件源码

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

项目:Dahua-Firmware-Mod-Kit 作者: BotoX 项目源码 文件源码
def Handle_CramFS(self, Key):
        Path = os.path.join(self.DestDir, Key)
        DestDir = Path.rstrip(".raw") + ".extracted"

        Binary = "cramfsck"
        if self.CheckDependency(Binary):
            return 1

        # Need root to preserve permissions.
        if self.Debug:
            self.Logger.debug(' '.join(["sudo", Binary, "-x", DestDir, Path]))
            Result = subprocess.call(["sudo", Binary, "-x", DestDir, Path])
        else:
            Result = subprocess.call(["sudo", Binary, "-x", DestDir, Path], stdout=subprocess.DEVNULL)

        return Result
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号