Pik-4 / HsMod

Hearthstone Modify Based on BepInEx
GNU Affero General Public License v3.0
147 stars 25 forks source link

关于MAC使用token绕过战网登录的问题 #37

Closed Whi8per closed 5 months ago

Whi8per commented 9 months ago

RT,配置client.config后,运行run_bepinex.sh,跳出游戏界面,但每次都提示网络问题,BepInex也没有正常运行,没有生成BepInex/config等文件夹 同环境下测试了人类一败涂地等unity游戏,BepInex正常运行,也生成了BepInex/config等文件夹,F5也能呼出菜单 在windows10环境下,运行炉石脚本也是正常的 猜测是token登录问题,游戏没有完全打开,导致BepInx无法注入,但不知道如何解决

Login.out如下 I 14:39:10.4633170 Beginning processing login challenges I 14:39:12.7112310 Processing challenge, previous login challenge attempts 0 I 14:39:12.9426120 Processing challenge, previous login challenge attempts 1 I 14:39:13.2039300 Multiple attempts likely failed with same auth token, clearing authentication data I 14:39:13.2039300 Processing challenge, previous login challenge attempts 2 I 14:39:13.2039300 A repeated token was retrieved when disallowed. Setting to null token for failure I 14:39:13.2469250 A repeated token was retrieved when disallowed. Setting to null token for failure I 14:39:13.2722270 A repeated token was retrieved when disallowed. Setting to null token for failure I 14:39:13.3216660 A repeated token was retrieved when disallowed. Setting to null token for failure I 14:39:13.3381890 A repeated token was retrieved when disallowed. Setting to null token for failure E 14:39:13.3754310 Failed to get token to respond to login challenge

设备:iMAC 芯片:M1 系统:macOS 13.5.2 (22G91)

Pik-4 commented 9 months ago

炉石启动顺序: BepInEx注入,配置插件、HsMod等插件加载,Hook炉石原有方法:允许炉石接受token,解析token,登录炉石。

允许使用VerifyWebCredentials登录(亦支持命令行启动,不需要启动战网)。

因此,可以移除client.config,直接利用./hearthstone.exe token(mac下应该是run_bepinex.sh token)进行启动(Windows目前测试没有问题,手头没有MAC无法验证)。

因此建议检查一下BepInEx的启动日志,看看是否有其他信息。

Whi8per commented 9 months ago

运行sh脚本后,跳出炉石无法通过暴雪服务进行登录的界面,然后的BepInEx目录下没有生成任何新文件夹和文件夹,所以找不到cfg等文件

同配置环境,仅修改executable_name="",复制到人类一败涂地根目录下,运行sh脚本之后,BepInEx就能自动生成LogOutput.log等文件和config等文件夹,steam添加启动项,"~/Human Fall Flat/run_bepinex.sh" "%command% 之后一切都可以正常运行

所以感觉是token的问题,无法登陆,试了./run_bepinex.sh token的方式,终端报错

2023-09-28 16:18:55.470 defaults[44707:487562] The domain/default pair of (KR-/Contents/Info, CFBundleExecutable) does not exist /Applications/Hearthstone/run_bepinex.sh: line 91: cd: KR-/Contents: No such file or directory /MacOS Cannot identify executable type (got cannot open `/MacOS' (No such file or directory))! Please create an issue at https://github.com/BepInEx/BepInEx/issues.

Pik-4 commented 9 months ago

这里有份完整的HsMod_4.2.0.0_Full_Mac.zip,修改client.config再看看,另外,注意token安全性。

token是在bepinex加载后才能被炉石识别。

看了一下sh脚本,参数应该加在run_bepinex.sh结尾"${executable_path}" "$@" "token"

Whi8per commented 9 months ago

感谢感谢,不过还是同样的问题,bepinex没有加载,我出现的问题应该和#8和#32相同,这是运行run_bepinex.sh之后的终端代码

Terminal Saved Output.txt

Pik-4 commented 9 months ago

看日志似乎已经加载BepInEx了, 你查看一下BepInEx目录下是否存在LogOutput.log如果存在,则BepInex已加载。此时可以移除 BepInEx\patchers目录下所有文件以及BepInEx\plugins除HsMod以外的全部插件。 修改BepInEx\configHsMod.cfg开启HsMod。修改BepInEx.cfg开启UnityLogListening = trueLogConsoleToUnityLog = true[Logging.Console] Enabled = true[Logging.Disk] WriteUnityLog = true以及LogLevels = Fatal, Error, Warning, Message, Info, Debug, All后重新运行./run_bepinex.sh然后查看LogOutput.log。

如果不存在相关cfg,晚些时间我测试一下BepInex 6的版本。

Livelongwer commented 8 months ago

刚才试了一下,依旧是没有config文件产生

onns commented 8 months ago

有用记牌器吗

Livelongwer commented 8 months ago

没有使用记牌器

Pik-4 commented 5 months ago

参考Linux的配置看看?在linux系统上,炉石使用的似乎仍是bepinex提供的unity和mono.