ncch.py 文件源码

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

项目:fuse-3ds 作者: ihaveamac 项目源码 文件源码
def get_seed(f: BinaryIO, program_id: int):
    """Get a seed in a seeddb.bin from an I/O stream."""
    tid_bytes = program_id.to_bytes(0x8, 'little')
    f.seek(0)
    seed_count = util.readle(f.read(2))
    f.seek(0x10)
    for _ in range(seed_count):
        entry = f.read(0x20)
        if entry[0:8] == tid_bytes:
            return entry[0x8:0x18]
    raise NCCHSeedException("missing seed for {:016X} from seeddb.bin".format(program_id))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号