# 请问有人会解包樱境物语吗

**URL:** <https://live2dhub.com/t/topic/3234>\
**Category:** 讨论\
**Created:** [2024 年5 月 25 日 04:42 UTC](https://live2dhub.com/t/topic/3234 "2024-05-25T04:42:00Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

作者： ![linr](https://live2dhub.com/letter_avatar_proxy/v4/letter/l/b5a626/32.png) [@linr](https://live2dhub.com/u/linr)\
发布日期： [2024 年5 月 25 日 04:42 UTC](https://live2dhub.com/t/topic/3234/1 "2024-05-25T04:42:00Z")

</div>

从客户端中找到的资源是这样的，用16进制打开后也没看出啥奇怪的地方，但是用as无法打开，提示如下：  
[Warning] System.IO.IOException: Lz4 decompression error, write -1 bytes but expected 150994945 bytes  
[Warning] at AssetStudio.BundleFile.ReadBlocksInfoAndDirectory(FileReader reader, UnityVersion unityVer) in L:\GIT\AssetStudioMod\AssetStudio\BundleFile.cs:line 337  
[Warning] at AssetStudio.BundleFile..ctor(FileReader reader, Boolean useZstd, UnityVersion specUnityVer) in L:\GIT\AssetStudioMod\AssetStudio\BundleFile.cs:line 142  
[Warning] at AssetStudio.AssetsManager.LoadBundleFile(FileReader reader, String originalPath) in L:\GIT\AssetStudioMod\AssetStudio\AssetsManager.cs:line 301  
[樱境.zip](https://live2dhub.com/uploads/short-url/pEkvLq1Ud55OCHRkl2BB23lnO4U.zip) (2.4 MB)

---

<div class="post-metadata">

作者： ![AXiX\_Official](https://live2dhub.com/user_avatar/live2dhub.com/axix_official/32/1844_2.png) [@AXiX\_Official](https://live2dhub.com/u/AXiX_Official)\
发布日期： [2024 年5 月 25 日 07:14 UTC](https://live2dhub.com/t/topic/3234/2 "2024-05-25T07:14:42Z")

</div>

不是我写的，是dc频道上别的佬给的

```python
import os
import argparse
import struct

def process_file(input_file_path, output_file_path):
    indicies = [0x3FB, 0xD99, 0x197C]

    with open(input_file_path, "rb") as file:
        bytes = bytearray(file.read())

    for idx in indicies:
        if idx < len(bytes):
            ridx = len(bytes) - idx
            bytes[idx], bytes[ridx] = bytes[ridx], bytes[idx]

    originalVersion = b"2020.3.41f1\x00"
    encryptedVersion = b"2018.3.5f1\x00"

    index = 0
    offset = 0
    array = bytearray()
    while index != -1:
        index = bytes.find(encryptedVersion, offset)
        if index == -1:
            array.extend(bytes[offset:])
            break
        if index > 0:
            array.extend(bytes[offset:index])
            array.extend(originalVersion)
            offset = len(encryptedVersion) + index + 1

    with open(output_file_path, "wb") as file:
        print("Processed:", os.path.basename(output_file_path))
        file.write(array)

def process_folder(input_folder_path, output_folder_path):
    # Create output folder if it doesn't exist
    if not os.path.exists(output_folder_path):
        os.makedirs(output_folder_path)

    # Process each file in the input folder
    for file_name in os.listdir(input_folder_path):
        input_file_path = os.path.join(input_folder_path, file_name)
        output_file_path = os.path.join(output_folder_path, file_name)
        process_file(input_file_path, output_file_path)

# Parse command-line arguments
parser = argparse.ArgumentParser(description='Process files in input folder and save to output folder.')
parser.add_argument('input_folder', help='Path to the input folder')
parser.add_argument('output_folder', help='Path to the output folder')
args = parser.parse_args()

# Process the folder using the provided input and output folder paths
process_folder(args.input_folder, args.output_folder)

```

---

<div class="post-metadata">

作者： ![linr](https://live2dhub.com/letter_avatar_proxy/v4/letter/l/b5a626/32.png) [@linr](https://live2dhub.com/u/linr)\
发布日期： [2024 年5 月 26 日 02:32 UTC](https://live2dhub.com/t/topic/3234/3 "2024-05-26T02:32:47Z")

</div>

> [@AXiX\_Official](#):
>
> ```auto
> import os
> import argparse
> import struct
> 
> def process_file(input_file_path, output_file_path):
> indicies = [0x3FB, 0xD99, 0x197C]
> 
> with open(input_file_path, "rb") as file:
> bytes = bytearray(file.read())
> 
> for idx in indicies:
> if idx < len(bytes):
> ridx = len(bytes) - idx
> bytes[idx], bytes[ridx] = bytes[ridx], bytes[idx]
> 
> originalVersion = b"2020.3.41f1\x00"
> encryptedVersion = b"2018.3.5f1\x00"
> 
> index = 0
> offset = 0
> array = bytearray()
> while index != -1:
> index = bytes.find(encryptedVersion, offset)
> if index == -1:
> array.extend(bytes[offset:])
> break
> if index > 0:
> array.extend(bytes[offset:index])
> array.extend(originalVersion)
> offset = len(encryptedVersion) + index + 1
> 
> with open(output_file_path, "wb") as file:
> print("Processed:", os.path.basename(output_file_path))
> file.write(array)
> 
> def process_folder(input_folder_path, output_folder_path):
> # Create output folder if it doesn't exist
> if not os.path.exists(output_folder_path):
> os.makedirs(output_folder_path)
> 
> # Process each file in the input folder
> for file_name in os.listdir(input_folder_path):
> input_file_path = os.path.join(input_folder_path, file_name)
> output_file_path = os.path.join(output_folder_path, file_name)
> process_file(input_file_path, output_file_path)
> 
> # Parse command-line arguments
> parser = argparse.ArgumentParser(description='Process files in input folder and save to output folder.')
> parser.add_argument('input_folder', help='Path to the input folder')
> parser.add_argument('output_folder', help='Path to the output folder')
> args = parser.parse_args()
> 
> # Process the folder using the provided input and output folder paths
> process_folder(args.input_folder, args.output_folder)
> 
> ```

可以了可以了，非常感谢！

---

<div class="post-metadata">

作者： ![about101](https://live2dhub.com/letter_avatar_proxy/v4/letter/a/ccd318/32.png) [@about101](https://live2dhub.com/u/about101)\
发布日期： [2024 年6 月 8 日 01:26 UTC](https://live2dhub.com/t/topic/3234/4 "2024-06-08T01:26:21Z")

</div>

佬，这个要怎么用啊。。用py放在同目录没用啊

---

<div class="post-metadata">

作者： ![about101](https://live2dhub.com/letter_avatar_proxy/v4/letter/a/ccd318/32.png) [@about101](https://live2dhub.com/u/about101)\
发布日期： [2024 年6 月 8 日 03:37 UTC](https://live2dhub.com/t/topic/3234/6 "2024-06-08T03:37:51Z")

</div>

谢谢，成功了

---

<div class="post-metadata">

作者： ![qqqwwqa7](https://live2dhub.com/letter_avatar_proxy/v4/letter/q/43a26b/32.png) [@qqqwwqa7](https://live2dhub.com/u/qqqwwqa7)\
发布日期： [2024 年12 月 24 日 08:30 UTC](https://live2dhub.com/t/topic/3234/7 "2024-12-24T08:30:14Z")

</div>

这游戏的资源是不是要获取的才有

---

<div class="post-metadata">

作者： ![cyb464b6](https://live2dhub.com/user_avatar/live2dhub.com/cyb464b6/32/6127_2.png) [@cyb464b6](https://live2dhub.com/u/cyb464b6)\
发布日期： [2024 年12 月 25 日 11:05 UTC](https://live2dhub.com/t/topic/3234/8 "2024-12-25T11:05:49Z")

</div>

[28598519a/CherryTale\_AssetDecDL: 用於下載與解密 櫻境物語 (Use to download all CherryTale resources and decrypt files)](https://github.com/28598519a/CherryTale_AssetDecDL)

---

<div class="post-metadata">

作者： ![2410](https://live2dhub.com/letter_avatar_proxy/v4/letter/2/7ba0ec/32.png) [@2410](https://live2dhub.com/u/2410)\
发布日期： [2025 年3 月 21 日 07:35 UTC](https://live2dhub.com/t/topic/3234/9 "2025-03-21T07:35:03Z")

</div>

这个失效了

---

<div class="post-metadata">

作者： ![cyb464b6](https://live2dhub.com/user_avatar/live2dhub.com/cyb464b6/32/6127_2.png) [@cyb464b6](https://live2dhub.com/u/cyb464b6)\
发布日期： [2025 年3 月 21 日 08:07 UTC](https://live2dhub.com/t/topic/3234/10 "2025-03-21T08:07:07Z")

</div>

[樱境物语\_资源下载器.zip](https://live2dhub.com/uploads/short-url/2MP3YZTk77COzQUSw1aW8owNeX6.zip) (1.3 MB)
