(已解决)大佬们,看中了一个游戏的CG,解包时发现丢AS里面没反应帮忙看着咋弄呗


看了游戏是说被加密了,我丢文本编辑器里面表示,看不懂呀。
通过网盘分享的文件:秘密手机
链接: 百度网盘 请输入提取码 提取码: q829
–来自百度网盘超级会员v1的分享
这个是游戏的本体,有空的大佬帮帮忙呗

1 个赞

看见很多@就试着异或一下@

纯小白,这个要咋弄呢,需要用到啥工具呢

写个python脚本异或@就行.

import os
import sys
from pathlib import Path

def xor_process_file(input_path: Path, output_path: Path, key: int = 64) -> None:
    """
    对单个文件执行异或操作
    
    Args:
        input_path: 输入文件路径
        output_path: 输出文件路径
        key: 异或密钥,默认为@字符(64)
    """
    try:
        with open(input_path, 'rb') as f_in:
            data = f_in.read()
        
        # 执行异或操作
        processed_data = bytes(b ^ key for b in data)
        
        with open(output_path, 'wb') as f_out:
            f_out.write(processed_data)
        
        print(f"已处理: {input_path} -> {output_path}")
    except Exception as e:
        print(f"处理文件 {input_path} 时出错: {e}")

def process_directory(directory: str, key: int = 64, recursive: bool = False) -> None:
    """
    处理目录中的所有.bundle文件
    
    Args:
        directory: 目录路径
        key: 异或密钥
        recursive: 是否递归处理子目录
    """
    dir_path = Path(directory)
    
    if not dir_path.exists():
        print(f"错误: 目录 '{directory}' 不存在")
        return
    
    # 创建输出目录
    output_dir = dir_path / "decrypted"
    output_dir.mkdir(exist_ok=True)
    
    # 遍历目录中的所有.bundle文件
    if recursive:
        bundle_files = list(dir_path.rglob("*.bundle"))
    else:
        bundle_files = list(dir_path.glob("*.bundle"))
    
    total_files = len(bundle_files)
    print(f"找到 {total_files} 个.bundle文件")
    
    for i, file in enumerate(bundle_files, 1):
        # 计算输出路径,保持目录结构
        relative_path = file.relative_to(dir_path)
        output_file = output_dir / relative_path
        
        # 确保输出目录存在
        output_file.parent.mkdir(parents=True, exist_ok=True)
        
        # 处理文件
        xor_process_file(file, output_file, key)
        print(f"进度: {i}/{total_files}")

def main():
    """主函数"""
    # 获取用户输入的目录路径
    if len(sys.argv) > 1:
        directory = sys.argv[1]
    else:
        directory = input("请输入文件夹路径: ").strip()
    
    # 是否递归处理子目录
    recursive_input = input("是否递归处理子目录? (y/n, 默认n): ").strip().lower()
    recursive = recursive_input == 'y'
    
    # 使用@字符的ASCII码64作为默认密钥
    key = 64
    
    # 处理目录
    process_directory(directory, key, recursive)
    print("处理完成!")
    print(f"处理后的文件保存在: {os.path.join(directory, 'decrypted')}")

if __name__ == "__main__":
    main()


gan’x感谢大佬的代码,成功解开了

解开了,谢谢大佬

解开的spine文件你能正常读取吗,我解开的spine文件好像无法读取

可以啊

我用spine viewer看不了。然后用 ex studio里面还原才能看

通过网盘分享的文件:qaq.gif
链接: 百度网盘 请输入提取码 提取码: db7c
z–来自百度网盘超级会员v1的分享 文件后缀改.7z 提取码1234

我是这样打开看的,spine确实打不开

确实,我用ex studio也能打开,但是其他的预览spine的都打不开