首页
社区
课程
招聘
[已解决] 删帖删帖 80.00雪花
发表于: 2023-11-27 16:40 3437

[已解决] 删帖删帖 80.00雪花

2023-11-27 16:40
3437

删帖删帖


[注意]看雪招聘,专注安全领域的专业人才平台!

最后于 2023-12-20 17:02 被litianp编辑 ,原因: 删帖
收藏
免费 2
支持
分享
最新回复 (10)
雪    币: 1749
活跃值: (1559)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
2
upupup
2023-11-27 20:32
0
雪    币: 353
活跃值: (4571)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
3
给游戏的GameAssembly.dll和global-metadata.dat发出来啊,你光发资源文件叫人咋解啊
2023-11-28 00:08
0
雪    币: 1749
活跃值: (1559)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
4
EX呵呵 给游戏的GameAssembly.dll和global-metadata.dat发出来啊,你光发资源文件叫人咋解啊
大佬,Windows版本的文件都被打包到一个exe了。 Mac版本有metadata和Mac执行文件,我都上传到同一个网盘地址了。
2023-11-28 02:27
0
雪    币: 0
活跃值: (145)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
5
你要解好的还是要方法。
2023-12-5 15:14
0
雪    币: 3771
活跃值: (1795)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
6

// YoudaDecrypt.cpp

//

#pragma warning(disable:4996)

#include <stdio.h>

#include<fstream>

const char YoudaFSstr[] = "YoudaFS";

const char UnityFSstr[] = "UnityFS";

using namespace std;

int verifyYouda(FILE* file) {

    fseek(file, 0, SEEK_SET);

    char buffer[10] = "";

    fread(buffer, 7, 1, file);

    if (strcmp(buffer, YoudaFSstr) == 0)return 1;

    if (strcmp(buffer, UnityFSstr) == 0)return 2;

    return 0;

}

void decryptYouda(FILE* file) {

    fseek(file, 0, SEEK_SET);

    fwrite(UnityFSstr, 7, 1, file);

    char buffer[10] = "";

    for (int i = 7; i < 37; i++) {

        fseek(file, i, SEEK_SET);

        fread(buffer, 1, 1, file);

        fseek(file, i, SEEK_SET);

        buffer[0] ^= 9;

        fwrite(buffer, 1, 1, file);

    }

}

void encryptYouda(FILE* file) {

    fseek(file, 0, SEEK_SET);

    fwrite(YoudaFSstr, 7, 1, file);

    char buffer[10] = "";

    for (int i = 7; i < 37; i++) {

        fseek(file, i, SEEK_SET);

        fread(buffer, 1, 1, file);

        fseek(file, i, SEEK_SET);

        buffer[0] ^= 9;

        fwrite(buffer, 1, 1, file);

    }

}

int main(int argc,char** argv)

{

    const char* filename = argv[1];

    FILE* file = fopen(filename, "rb+");

    int isYoudafile = verifyYouda(file);

    if (!isYoudafile) {

        printf("The file \"%s\" is not Youda encrypted file or UnityFS file\n",filename);

        fclose(file);

        return -1;

    }

    else if (isYoudafile == 1) {

        decryptYouda(file);

        printf("Youda encrypted file \"%s\" decrypted\n", filename);

    }

    else if (isYoudafile == 2) {

        encryptYouda(file);

        printf("UnityFS file \"%s\" encrypted\n", filename);

    }

    fclose(file);

}


最后于 2023-12-6 01:10 被gailium编辑 ,原因:
2023-12-6 01:08
0
雪    币: 1749
活跃值: (1559)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
7
gailium // YoudaDecrypt.cpp//#pragma warning(disable:4996)#include &lt;stdio.h&gt;#include&lt;fs ...
哥,你是我的神。  还有 srt 字幕文件可以处理一下吗? 貌似方法不一样的。
2023-12-6 11:09
0
雪    币: 1749
活跃值: (1559)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
8
妲姬 你要解好的还是要方法。
大佬,方法就行,大佬@gailium 解出来 ab 包了。
2023-12-6 11:10
0
雪    币: 3771
活跃值: (1795)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
9
litianp 哥,你是我的神。 [em_5] 还有 srt 字幕文件可以处理一下吗? 貌似方法不一样的。
// YoudaDecrypt.cpp
//
#pragma warning(disable:4996)
#include <stdio.h>
#include<fstream>
const char YoudaFSstr[] = "YoudaFS";
const char UnityFSstr[] = "UnityFS";
const char YoudaSRTstr[] = "\x04\x41";
using namespace std;
int verifyYouda(FILE* file) {
    fseek(file, 0, SEEK_SET);
    char buffer[10] = "";
    fread(buffer, 7, 1, file);
    if (strcmp(buffer, YoudaFSstr) == 0)return 1;
    if (strcmp(buffer, UnityFSstr) == 0)return 2;
    memset(buffer, 0, 10);
    fseek(file, 0, SEEK_SET);
    fread(buffer, 2, 1, file);
    if (strcmp(buffer, YoudaSRTstr) == 0)return 3;
    return 0;
}
void decryptYoudaFS(FILE* file) {
    fseek(file, 0, SEEK_SET);
    fwrite(UnityFSstr, 7, 1, file);
    char buffer[10] = "";
    for (int i = 7; i < 37; i++) {
        fseek(file, i, SEEK_SET);
        fread(buffer, 1, 1, file);
        fseek(file, i, SEEK_SET);
        buffer[0] ^= 9;
        fwrite(buffer, 1, 1, file);
    }
}
void encryptYoudaFS(FILE* file) {
    fseek(file, 0, SEEK_SET);
    fwrite(YoudaFSstr, 7, 1, file);
    char buffer[10] = "";
    for (int i = 7; i < 37; i++) {
        fseek(file, i, SEEK_SET);
        fread(buffer, 1, 1, file);
        fseek(file, i, SEEK_SET);
        buffer[0] ^= 9;
        fwrite(buffer, 1, 1, file);
    }
}
void writebyte(FILE* file, char byte, int location) {
    int origpos = ftell(file);
    fseek(file, location, SEEK_SET);
    fwrite(&byte, 1, 1, file);
    fseek(file, origpos, SEEK_SET);
}
char readbyte(FILE* file, int location) {
    int origpos = ftell(file);
    char buffer[1] = "";
    fseek(file, location, SEEK_SET);
    fread(&buffer, 1, 1, file);
    fseek(file, origpos, SEEK_SET);
    return buffer[0];
}
void decryptYoudaSRT(FILE* file) {
    fseek(file, 0, SEEK_END);
    unsigned long long filesize = ftell(file);
    writebyte(file, 0xA, 0);
    writebyte(file, 0xA, 1);
    fseek(file, 2, SEEK_SET);
    int pos = 2;
    while (pos < filesize) {
        writebyte(file, readbyte(file, pos) ^ 9, pos);
        writebyte(file, readbyte(file, pos++) , pos-2);
    }
    writebyte(file, 0xA, filesize);
    writebyte(file, 0xA, filesize - 2);
    writebyte(file, 0xA, filesize - 1);
}
int main(int argc,char** argv)
{
    const char* filename = argv[1];
    FILE* file = fopen(filename, "rb+");
    int isYoudafile = verifyYouda(file);
    if (!isYoudafile) {
        printf("The file \"%s\" is not Youda encrypted file or UnityFS file\n",filename);
        fclose(file);
        return -1;
    }
    else if (isYoudafile == 1) {
        decryptYoudaFS(file);
        printf("Youda encrypted file \"%s\" decrypted\n", filename);
    }
    else if (isYoudafile == 2) {
        encryptYoudaFS(file);
        printf("UnityFS file \"%s\" encrypted\n", filename);
    }
    else if (isYoudafile == 3) {
        decryptYoudaSRT(file);
        printf("Youda encrypted SRT file \"%s\" decrypted\n", filename);
    }
    fclose(file);
}
2023-12-6 11:46
0
雪    币: 0
活跃值: (145)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
10
import os
import subprocess
from hashlib import md5


def decompile_lua(input_file, output_file):
    command = ['java', '-jar', 'unluac.jar', input_file, '>', output_file]
    subprocess.run(command, shell=True, stderr=subprocess.PIPE, text=True)


def decode_lua():
    for root, dirs, files in os.walk(r'D:\cr\test\TextAsset'):
        for file in files:
            file_path = os.path.join(root, file)
            file_name, ext = os.path.splitext(file)
            out_file = os.path.join(r'D:\cr\test\TextAsset\lua', file_name)
            with open(file_path, 'rb+') as f:
                data = bytearray(f.read())
                if data[5] == 1:
                    data[5] = 0
                    data.insert(12, 4)
                    f.seek(0)
                    f.write(data)
            decompile_lua(file_path, out_file)


def decode_unity(file_bytes):
    if file_bytes is None or len(file_bytes) < 7:
        return file_bytes

    if file_bytes[:7] == b"YoudaFS":
        file_bytes[:7] = b"UnityFS"
        decode_len = 37
        max_length = len(file_bytes)
        if max_length < decode_len:
            decode_len = max_length
        for i in range(7, decode_len):
            file_bytes[i] ^= 9
    return file_bytes


def decode_full(file_bytes):
    if file_bytes and len(file_bytes) >= 2:
        if not len(file_bytes):
            return file_bytes
        if file_bytes[0] == 4:
            if len(file_bytes) <= 1:
                return file_bytes
            if file_bytes[1] == 65:
                max_length = len(file_bytes)
                v3 = 2
                if max_length > 2:
                    while v3 < len(file_bytes):
                        file_bytes[v3] ^= 9
                        if v3 >= len(file_bytes):
                            break
                        v4 = v3 - 2
                        if v4 >= len(file_bytes):
                            break
                        v5 = v3
                        file_bytes[v4] = file_bytes[v5]
                        v3 += 1

                if max_length - 1 >= len(file_bytes):
                    return file_bytes
                file_bytes[max_length - 1] = 10
                if max_length - 2 >= len(file_bytes):
                    return file_bytes
                file_bytes[max_length - 2] = 10
    return file_bytes


def de_ab():
    for root, dirs, files in os.walk(r'D:\cr\test'):
        for file in files:
            file_path = os.path.join(root, file)
            with open(file_path, 'rb+') as f:
                file_bytes = bytearray(f.read())
                decoded_bytes = decode_unity(file_bytes)
                f.seek(0)
                f.write(decoded_bytes)


def de_allfile():
    for root, dirs, files in os.walk(r'D:\cr\test\Datas'):
        for file in files:
            file_path = os.path.join(root, file)
            with open(file_path, 'rb+') as f:
                file_bytes = bytearray(f.read())
                decoded_bytes = decode_full(file_bytes)
                f.seek(0)
                f.write(decoded_bytes)


def renname():  # 重命名字幕 重命名webm算法一样自行处理
    root = r'D:\cr\test\zh-CN'
    for i in range(1001, 3001):
        video_name = 'youdakejiyjtv_%d' % i
        m = md5()
        m.update(video_name.encode('utf8'))
        sign = m.hexdigest()
        print(video_name, sign)
        webmfile = os.path.join(root, sign + '.srt')
        if os.path.exists(webmfile):
            newfile = os.path.join(root, 'tv_%d.srt' % i)
            os.rename(webmfile, newfile)
            print(webmfile, newfile)


# 原始webm、mp3、ab 调用函数 de_ab() 解密后用 AssetStudio导即可
# 其它的文件都是调用de_allfile()解即可
# 导出的lua只是简单的抽掉字节 补上后用现成的unluac解
# 为了更方便播放顺序重命名文件是必要的

if __name__ == "__main__":
    # de_ab()
    de_allfile()


2023-12-6 18:19
0
雪    币: 1749
活跃值: (1559)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
11
妲姬 import&nbsp;os import&nbsp;subprocess from&nbsp;hashlib&nbsp;import&nbsp;md5 ...
大佬不好意思啊,我中午结算给gailium大佬了。
2023-12-6 19:04
0
游客
登录 | 注册 方可回帖
返回