Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
|
|
1 year ago | |
|---|---|---|
| .. | ||
| custom | 1 year ago | |
| official-API | 1 year ago | |
| README.md | 2 years ago | |
| ckey.json | 1 year ago | |
| extractByNode.js | 2 years ago | |
| extract_CHT.js | 2 years ago | |
| mon_en.json | 1 year ago | |
| mon_ja.json | 1 year ago | |
| mon_ko.json | 1 year ago | |
| skill_en.json | 1 year ago | |
| skill_ja.json | 1 year ago | |
| skill_ko.json | 1 year ago | |
| 提取中文数据.bat | 5 years ago | |
| 提取整合怪物信息.bat | 6 years ago | |
目前的获取 API 为
The current acquisition API is
但是有加密的参数,我不知道如何生成,所以我只能从游戏的下载过程截获。
But there are encrypted parameters that I don't know how to generate. So I intercepted from the game's download process.
使用 Fiddler,执行 HTTPS 中间人攻击从游戏内抓包获得怪物信息。
Use Fiddler, do HTTPS man-in-the-middle attack to capture monster information from in-game capture.
安卓5可以直接在安卓系统里安装 CER 证书,但安卓7开始,系统不再信任用户证书。由于需要安卓 7 才能玩智龙迷城,所以要先创建安卓 7 以上的模拟器,再安装智龙迷城。
Android 5 can install CER certificates directly in Android. Starting with Android 7, the system no longer trusts user certificates. Since Android 7 is required to play PAD, you must create an emulator for Android 7 or above before installing PAD.
将 Fidder 根证书导出到桌面
Export the Fidder Root Certificate to desktop
在电脑上找一个 openssl.exe 程序,或者下载安装 Win32OpenSSL
Find an openssl.exe program on computer, or install Win32OpenSSL
执行代码,获取证书的hash
Execute the code to get the hash of the certificate
openssl x509 -inform DER -in FiddlerRoot.cer -subject_hash_old -noout
执行代码,将证书由 CER 转换为 PEM 格式
Execute the code to convert the certificate from CER to PEM format
openssl x509 -inform DER -in FiddlerRoot.cer -outform PEM -out [hash].0
将证书文件放入安卓系统证书文件夹/system/etc/security/cacerts/
Place the certificate file in the Android system certificate folder/system/etc/security/cacerts/
参考/Reference: https://www.jianshu.com/p/035f7d7a0f7e
通过如何获取用户游戏数据获得完整图文教程。
Get the full graphic tutorial via How to get user game data.
C:\ProgramData\BlueStacks_nxt\Engine\<模拟器文件夹>\Root.vhd。C:\ProgramData\BlueStacks_nxt\Engine\<Emulator folder>\Root.vhd.Root.vhd挂载到 Windows 磁盘管理中。Root.vhd to mount it into Windows Disk Management.F4快捷键,给虚拟磁盘分配一个盘符。F4 shortcut key to assign a drive letter to the virtual disk.X:\android\system\etc\security\cacerts\X:\android\system\etc\security\cacerts\F11快捷键。F11 shortcut from the context menu of the virtual disk.diskmgmt.msc 打开系统磁盘管理,在虚拟磁盘上点击右键,选择“分离VHD”。diskmgmt.msc to open System Disk Management, right-click on the virtual disk and select "Detach VHD".127.0.0.1:5555127.0.0.1:5555adb connect 127.0.0.1:5555连接设备adb connect 127.0.0.1:5555 in the terminal to connect the device10.0.2.2,Fidder 默认端口为8888,在终端里输入adb -s 127.0.0.1:5555 shell settings put global http_proxy 10.0.2.2:888810.0.2.2, the default port of Fidder is 8888, enter in the terminal adb -s 127.0.0.1:5555 shell settings put global http_proxy 10.0.2.2:8888/system/etc/security/cacerts/,并修改为 644 权限/system/etc/security/cacerts/ and modify it to 644 permissions172.17.100.2,Fidder 默认端口为8888172.17.100.2, and the Fidder default port is 8888打开 Fidder 的 允许远程计算机连接、HTTPS 解密、流式传输,和 GZIP 解码
Turn on Fidder's "Allow remote computers to connet", "HTTPS decrypt", "Stream" and "Decode"
现在你运行模拟器内的游戏,Fidder 就能够截获和解密智龙迷城的数据了。将返回的 JSON 数据保存为文件。
Now that you're running the game inside the simulator, Fidder will be able to intercept and decrypt the data from the PAD. Save the response JSON data as a file.
[可选的]将以下代码加入 Fidder 的自定义代码的OnBeforeResponse中就可以每次自动保存文件了。
[Optional]Add the following code to OnBeforeResponse of Fidder's Customize Rules to save the file automatically each time.
//自动储存智龙迷城数据
switch (oSession.hostname) {
case "api-adr.padsv.gungho.jp": //日服域名
case "api-ht-adr.padsv.gungho.jp":{ //港台服域名
savePADData("ja");
break;
}
case "api-na-adrv2.padsv.gungho.jp":{ //美服域名
savePADData("en");
break;
}
case "api-kr-adrv2.padsv.gungho.jp":{ //韩服域名
savePADData("ko");
break;
}
}
function savePADData(serverName: String) {
//智龙迷城数据文件位置
var PADDataPath: String = "D:\\www\\PADDashFormation\\monsters-info\\official-API\\";
if (oSession.uriContains("download_card_data")) { //自动保存怪物数据
oSession.SaveResponseBody(Path.Combine(PADDataPath, serverName + "-card.json"));
}
if (oSession.uriContains("download_skill_data")) { //自动保存技能数据
oSession.SaveResponseBody(Path.Combine(PADDataPath, serverName + "-skill.json"));
}
}
运行提取整合怪物信息.bat
Execute the following code in CMD
node.exe extractByNode.js
会将每种语言的信息提取到一个文件内,互相之间也保留有不同语言的怪物名称、标签数据
Each language's information is extracted into a file, and monster names and tag data in different languages are retained from each other
CHT.json与CHS.json的中文信息来源于战友网,见子项目 https://github.com/Mapaler/Download-pad.skyozora.com
运行提取中文数据.bat,将战友网页面内容抽出,抽出过程使用 opencc-js 的 NodeJs 模块来繁转简。
然后再运行一遍 提取整合怪物信息.bat 把中文插进去。
智龙迷城队伍图制作工具
JavaScript HTML SVG CSS other