jie65535 / GrasscutterCommandGenerator

Command Generator and Gacha Banner Editor
GNU Affero General Public License v3.0
1.91k stars 243 forks source link

[功能请求] 直接执行命令 #13

Closed GangPeter closed 2 years ago

GangPeter commented 2 years ago

有没有一种可能,连接到cmd窗口进程,直接键入命令且执行

jie65535 commented 2 years ago

有,我最近也在看怎么直接执行命令。hack控制台不太好,我想象中是一个插件提供远程执行命令的方法。

jie65535 commented 2 years ago

如果可以打通工具和服务器的连接,就可以出1.0版本并且改名叫GM工具了。; )

GangPeter commented 2 years ago

以下是我个人设想的最简便的实现方案 法一:找到窗口句柄,发送键盘消息 法二:焦点回到命令窗口,模拟粘贴+回车

GangPeter commented 2 years ago

如果想直接连接服务器,是有点复杂

jie65535 commented 2 years ago

其实不复杂,现在有GM插件是在游戏内通过内置浏览器方法实现客户端执行命令,本质上也是调用服务端插件的API。

因此只要写一个允许远程执行命令的插件就行了,调用就是http那套。

GangPeter commented 2 years ago

Socket

GangPeter commented 2 years ago

我们可以模拟原神客户端向服务端发送请求

jie65535 commented 2 years ago

作为第三方工具,做到这一点很困难,游戏内聊天是通过Kcp协议,自定报文。 模拟那个,我不如做一个允许远程执行命令的插件,开一个get请求接口。

jie65535 commented 2 years ago

https://github.com/HelloGrasscutter/gc-mojoconsole-plus

这一个插件支持远程执行命令,后续将以这个插件当作后端,实现远程执行命令功能。

另外,该插件也有web前端,可以在游戏内用gui调用指令,你可以了解一下。

SiQuan-Wen commented 2 years ago

呃呃呃、今天v0.8生成怪物数量的时候没注意、90个大怪给我卡死了

Omoinemie commented 2 years ago

做成启动器,自定义grasscutter.jar路径,在终端上套一层壳

jie65535 commented 2 years ago

最新版本已支持