Skip to content

Commit 6b15827

Browse files
committed
fix rebuild failed
1 parent a5b2df7 commit 6b15827

File tree

7 files changed

+83
-68
lines changed

7 files changed

+83
-68
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,6 @@ gmc_android-sources.jar
5252
*.bat
5353
*.jar
5454
*.aar
55-
*.syso
55+
*.syso
56+
*.toml
57+
*.token

README.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,29 @@
55
只支持单账号登录,如需多账号登录,请放不同文件夹内,例如
66

77
```shell
8-
File
8+
Files
99
|- File one
10-
| |- gmc.exe
11-
| |- session.token
12-
| |- deviceInfo.toml
13-
| |- logs
14-
| | |- 2023-06-30.log
15-
| | |- latest.log
16-
| |- plugins
17-
| | |- default.json
18-
| |- device
19-
| | |- device-1688014725597.json
10+
| |- gmc.exe
11+
| |- session.token
12+
| |- deviceInfo.toml
13+
| |- logs
14+
| | |- 2023-06-30.log
15+
| | |- latest.log
16+
| |- plugins
17+
| | |- default.json
18+
| |- device
19+
| | |- device-1688014725597.json
2020
|- File two
21-
| |- gmc.exe
22-
| |- session.token
23-
| |- deviceInfo.toml
24-
| |- logs
25-
| | |- 2023-06-30.log
26-
| | |- latest.log
27-
| |- plugins
28-
| | |- default.json
29-
| |- device
30-
| | |- device-1688014725597.json
21+
| |- gmc.exe
22+
| |- session.token
23+
| |- deviceInfo.toml
24+
| |- logs
25+
| | |- 2023-06-30.log
26+
| | |- latest.log
27+
| |- plugins
28+
| | |- default.json
29+
| |- device
30+
| | |- device-1688014725597.json
3131
```
3232

3333

go.mod

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.20
44

55
require (
66
github.com/BurntSushi/toml v1.3.2
7-
github.com/Mrs4s/MiraiGo v0.0.0-20230627090859-19e3d172596e
7+
github.com/Mrs4s/MiraiGo v0.0.0-20230801023408-b4cd7e8f2149
88
github.com/fanliao/go-promise v0.0.0-20141029170127-1890db352a72
99
github.com/gin-gonic/gin v1.9.1
1010
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da
@@ -15,10 +15,10 @@ require (
1515
github.com/rifflock/lfshook v0.0.0-20180920164130-b9218ef580f5
1616
github.com/sirupsen/logrus v1.9.3
1717
github.com/t-tomalak/logrus-easy-formatter v0.0.0-20190827215021-c074f06c5816
18-
github.com/tidwall/gjson v1.14.4
18+
github.com/tidwall/gjson v1.15.0
1919
github.com/zserge/lorca v0.1.10
2020
golang.org/x/mobile v0.0.0-20230531173138-3c911d8e3eda
21-
google.golang.org/grpc v1.56.1
21+
google.golang.org/grpc v1.57.0
2222
google.golang.org/protobuf v1.31.0
2323
)
2424

@@ -45,7 +45,7 @@ require (
4545
github.com/modern-go/reflect2 v1.0.2 // indirect
4646
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
4747
github.com/pierrec/lz4/v4 v4.1.15 // indirect
48-
github.com/smartystreets/goconvey v1.8.0 // indirect
48+
github.com/smartystreets/goconvey v1.8.1 // indirect
4949
github.com/tidwall/match v1.1.1 // indirect
5050
github.com/tidwall/pretty v1.2.0 // indirect
5151
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
@@ -58,6 +58,6 @@ require (
5858
golang.org/x/sys v0.8.0 // indirect
5959
golang.org/x/text v0.9.0 // indirect
6060
golang.org/x/tools v0.7.0 // indirect
61-
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
61+
google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 // indirect
6262
gopkg.in/yaml.v3 v3.0.1 // indirect
6363
)

go.sum

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8=
22
github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
3-
github.com/Mrs4s/MiraiGo v0.0.0-20230627090859-19e3d172596e h1:99itMjI//+KaFF0+0QCBg/uHhGMJ99jG2lP6z/UnOsU=
4-
github.com/Mrs4s/MiraiGo v0.0.0-20230627090859-19e3d172596e/go.mod h1:mU3fBFU+7eO0kaGes7YRKtzIDtwIU84nSSwTV7NK2b0=
3+
github.com/Mrs4s/MiraiGo v0.0.0-20230801023408-b4cd7e8f2149 h1:q9w4m+ps0gTyUHLObX6avawN1Rfn0GQwbmEKCZ6WrBo=
4+
github.com/Mrs4s/MiraiGo v0.0.0-20230801023408-b4cd7e8f2149/go.mod h1:mU3fBFU+7eO0kaGes7YRKtzIDtwIU84nSSwTV7NK2b0=
55
github.com/RomiChan/protobuf v0.1.1-0.20230204044148-2ed269a2e54d h1:/Xuj3fIiMY2ls1TwvPKmaqQrtJsPY+c9s+0lOScVHd8=
66
github.com/RomiChan/protobuf v0.1.1-0.20230204044148-2ed269a2e54d/go.mod h1:2Ie+hdBFQpQFDHfeklgxoFmQRCE7O+KwFpISeXq7OwA=
77
github.com/RomiChan/syncx v0.0.0-20220404072119-d7ea0ae15a4c h1:cNPOdTNiVwxLpROLjXCgbIPvdkE+BwvxDvgmdYmWx6Q=
@@ -90,9 +90,9 @@ github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/f
9090
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
9191
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
9292
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
93-
github.com/smartystreets/assertions v1.13.1 h1:Ef7KhSmjZcK6AVf9YbJdvPYG9avaF0ZxudX+ThRdWfU=
94-
github.com/smartystreets/goconvey v1.8.0 h1:Oi49ha/2MURE0WexF052Z0m+BNSGirfjg5RL+JXWq3w=
95-
github.com/smartystreets/goconvey v1.8.0/go.mod h1:EdX8jtrTIj26jmjCOVNMVSIYAtgexqXKHOXW2Dx9JLg=
93+
github.com/smarty/assertions v1.15.0 h1:cR//PqUBUiQRakZWqBiFFQ9wb8emQGDb0HeGdqGByCY=
94+
github.com/smartystreets/goconvey v1.8.1 h1:qGjIddxOk4grTu9JPOU31tVfq3cNdBlNa5sSznIX1xY=
95+
github.com/smartystreets/goconvey v1.8.1/go.mod h1:+/u4qLyY6x1jReYOp7GOM2FSt8aP9CzCZL03bI28W60=
9696
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
9797
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
9898
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
@@ -108,8 +108,8 @@ github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gt
108108
github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
109109
github.com/t-tomalak/logrus-easy-formatter v0.0.0-20190827215021-c074f06c5816 h1:J6v8awz+me+xeb/cUTotKgceAYouhIB3pjzgRd6IlGk=
110110
github.com/t-tomalak/logrus-easy-formatter v0.0.0-20190827215021-c074f06c5816/go.mod h1:tzym/CEb5jnFI+Q0k4Qq3+LvRF4gO3E2pxS8fHP8jcA=
111-
github.com/tidwall/gjson v1.14.4 h1:uo0p8EbA09J7RQaflQ1aBRffTR7xedD2bcIVSYxLnkM=
112-
github.com/tidwall/gjson v1.14.4/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
111+
github.com/tidwall/gjson v1.15.0 h1:5n/pM+v3r5ujuNl4YLZLsQ+UE5jlkLVm7jMzT5Mpolw=
112+
github.com/tidwall/gjson v1.15.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
113113
github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA=
114114
github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM=
115115
github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs=
@@ -148,10 +148,10 @@ golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
148148
golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4=
149149
golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s=
150150
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
151-
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A=
152-
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU=
153-
google.golang.org/grpc v1.56.1 h1:z0dNfjIl0VpaZ9iSVjA6daGatAYwPGstTjt5vkRMFkQ=
154-
google.golang.org/grpc v1.56.1/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s=
151+
google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 h1:0nDDozoAU19Qb2HwhXadU8OcsiO/09cnTqhUtq2MEOM=
152+
google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA=
153+
google.golang.org/grpc v1.57.0 h1:kfzNeI/klCGD2YPMUlaGNT3pxvYfga7smW3Vth8Zsiw=
154+
google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo=
155155
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
156156
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
157157
google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=

pkg/bot/bot.go

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,13 @@ var IsRequestTokenAgain bool = false
7575
var TTI_i = 30
7676

7777
func GmcTokenLogin() (g GMCLogin, err error) {
78-
_, err = toml.DecodeFile("deviceInfo.toml", &GTL)
79-
return *GTL, err
78+
if PathExists("deviceInfo.toml"){
79+
_, err = toml.DecodeFile("deviceInfo.toml", &GTL)
80+
return *GTL, err
81+
} else {
82+
g = GMCLogin{}
83+
return g, nil
84+
}
8085
}
8186

8287
func SRI() (sr SignRegister, err error) {
@@ -116,21 +121,21 @@ func InitLog(cli *client.QQClient) {
116121
func Login(cli *client.QQClient) (bool, error) {
117122
cli.AllowSlider = true
118123
if GTL.ClientProtocol == 1 && GTL.SignServer != "" {
119-
wrapper.RegisterSign = RegisterSign
124+
RegisterSign(uint64(cli.Uin), cli.Device().AndroidId, cli.Device().Guid, cli.Device().QImei36, GTL.SignServerKey)
120125
wrapper.DandelionEnergy = Energy
121126
wrapper.FekitGetSign = Sign
122127
} else if GTL.SignServer != "" {
123-
fmt.Println("SignServer 不支持该协议")
128+
log.Warn("SignServer 不支持该协议")
124129
}
125130
rsp, err := cli.Login()
126131
if rsp.Code == byte(45) && GTL.SignServer == "" {
127-
fmt.Println("您的账号被限制登录,请配置 SignServer 后重试")
132+
log.Warn("您的账号被限制登录,请配置 SignServer 后重试")
128133
}
129134
if rsp.Code == byte(235) {
130-
fmt.Println("设备信息被封禁,请删除设备(device)文件夹里对应设备文件后重试")
135+
log.Warn("设备信息被封禁,请删除设备(device)文件夹里对应设备文件后重试")
131136
}
132137
if rsp.Code == byte(237) {
133-
fmt.Println("登录过于频繁,请在手机QQ登录并根据提示完成认证")
138+
log.Warn("登录过于频繁,请在手机QQ登录并根据提示完成认证")
134139
}
135140
if err != nil {
136141
return false, err
@@ -260,7 +265,7 @@ func Sign(seq uint64, uin string, cmd string, qua string, buff []byte) (sign []b
260265
token, _ = hex.DecodeString(gjson.GetBytes(response, "data.token").String())
261266

262267
json.Unmarshal(response, &RSR)
263-
fmt.Println(RSR.Data.RequestCallback[0], RSR.Data.RequestCallback[1])
268+
log.Debug(RSR.Data.RequestCallback[0], RSR.Data.RequestCallback[1])
264269
return sign, extra, token, nil
265270
}
266271

@@ -277,8 +282,8 @@ func RegisterSign(uin uint64, androidId []byte, guid []byte, Qimei36 string, sig
277282
// http://your.host:port/register?uin=[QQ]&android_id=[ANDROID_ID]&guid=[GUID]&qimei36=[QIMEI36]&key=[KEY]
278283
_ = os.WriteFile("signRegisterInfo.toml", []byte(fmt.Sprintf("uin= %v \nandroidId= \"%s\" \nguid= \"%s\" \nqimei36= \"%s\" \nkey= \"%s\"", uin, hex.EncodeToString(androidId), hex.EncodeToString(guid), Qimei36, signServerAuth)), 0o644)
279284

280-
fmt.Println(uin, hex.EncodeToString(androidId), hex.EncodeToString(guid), Qimei36, signServerAuth)
281-
fmt.Println(fmt.Sprintf("?uin=%v&android_id=%s&guid=%s&qimei36=%s&key=%s", uin, hex.EncodeToString(androidId), hex.EncodeToString(guid), Qimei36, signServerAuth))
285+
log.Debug(uin, hex.EncodeToString(androidId), hex.EncodeToString(guid), Qimei36, signServerAuth)
286+
log.Debug(fmt.Sprintf("?uin=%v&android_id=%s&guid=%s&qimei36=%s&key=%s", uin, hex.EncodeToString(androidId), hex.EncodeToString(guid), Qimei36, signServerAuth))
282287
response, err := download.Request{
283288
Method: http.MethodGet,
284289
URL: signServer + "register" + fmt.Sprintf("?uin=%v&android_id=%s&guid=%s&qimei36=%s&key=%s", uin, hex.EncodeToString(androidId), hex.EncodeToString(guid), Qimei36, signServerAuth),
@@ -287,7 +292,7 @@ func RegisterSign(uin uint64, androidId []byte, guid []byte, Qimei36 string, sig
287292
log.Warnf("初始化 Sign 失败\n", err)
288293
} else {
289294
log.Info("初始化 Sign 成功")
290-
fmt.Println(gjson.GetBytes(response, "msg").String())
295+
log.Debug(gjson.GetBytes(response, "msg").String())
291296
}
292297
}
293298

@@ -305,8 +310,8 @@ func SubmitRequestCallback(uin uint64, cmd string, callbackId int, buffer []byte
305310
log.Warnf(cmd, " ", callbackId, "提交失败\n", err)
306311
} else {
307312
log.Info(cmd, " ", callbackId, "提交成功")
308-
fmt.Println(string(response))
309-
fmt.Println(gjson.GetBytes(response, "msg").String())
313+
log.Debug(string(response))
314+
log.Debug(gjson.GetBytes(response, "msg").String())
310315
}
311316
}
312317

@@ -328,8 +333,8 @@ func RequestToken(uin uint64) {
328333
log.Warn("QSign not initialized, unable to request_ Token, please submit the initialization package first.")
329334
} else {
330335
log.Info("请求 Token 成功")
331-
fmt.Println(string(response))
332-
fmt.Println(gjson.GetBytes(response, "msg").String())
336+
log.Debug(string(response))
337+
log.Debug(gjson.GetBytes(response, "msg").String())
333338
}
334339
}
335340

pkg/gmc/gmc.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,10 @@ func Start() {
9999

100100
CreateBotIfParamExist() // 如果环境变量存在,使用环境变量创建机器人 UIN PASSWORD
101101
InitGin() // 初始化GIN HTTP管理
102-
sr, err := bot.SRI()
102+
_, err := bot.SRI()
103103
if err != nil {
104104
log.Warn("signRegisterInfo.toml 不存在,应该是首次登录")
105105
}
106-
fmt.Println(sr)
107106
handler.TokenLogin()
108107
}
109108

pkg/gmc/handler/bot.go

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ var qrCodeBot *client.QQClient
3030

3131
func TokenLogin() {
3232
if bot.PathExists("deviceInfo.toml") {
33-
fmt.Println("尝试 Token 登录")
33+
log.Info("尝试 Token 登录")
3434
g, _ := bot.GmcTokenLogin()
3535
cli := client.NewClientEmpty()
3636
deviceInfo := device.GetDevice(g.DeviceSeed, g.ClientProtocol)
@@ -50,10 +50,10 @@ func TokenLogin() {
5050
}
5151
}
5252
} else {
53-
fmt.Println("Token 不存在,请尝试使用正常流程登录")
53+
log.Warn("Token 不存在,请尝试使用正常流程登录")
5454
}
5555
} else {
56-
fmt.Println("deviceInfo.toml 不存在,可能是 deviceInfo.toml 缺失或是首次登录")
56+
log.Warn("deviceInfo.toml 不存在,可能是 deviceInfo.toml 缺失或是首次登录")
5757
}
5858
}
5959

@@ -86,6 +86,7 @@ func init() {
8686
}
8787

8888
func CreateBot(c *gin.Context) {
89+
g, _ := bot.GmcTokenLogin()
8990
req := &dto.CreateBotReq{}
9091
err := Bind(c, req)
9192
if err != nil {
@@ -105,21 +106,33 @@ func CreateBot(c *gin.Context) {
105106
bot.GTL = &bot.GMCLogin{
106107
DeviceSeed: req.DeviceSeed,
107108
ClientProtocol: 6,
108-
SignServer: req.SignServer,
109-
SignServerKey: req.SignServerAuth,
109+
SignServer: g.SignServer,
110+
SignServerKey: g.SignServerKey,
110111
}
111-
_ = os.WriteFile("deviceInfo.toml", []byte(fmt.Sprintf("DeviceSeed = %d \nClientProtocol= %d \nSignServer= \"%s\" \nSignServerkey= \"%s\"", req.DeviceSeed, 6, req.SignServer, req.SignServerAuth)), 0o644)
112+
if req.SignServer != "" {
113+
bot.GTL.SignServer = req.SignServer
114+
}
115+
if req.SignServerAuth != "" {
116+
bot.GTL.SignServerKey = req.SignServerAuth
117+
}
118+
_ = os.WriteFile("deviceInfo.toml", []byte(fmt.Sprintf("DeviceSeed = %d \nClientProtocol= %d \nSignServer= \"%s\" \nSignServerkey= \"%s\"", bot.GTL.DeviceSeed, 6, bot.GTL.SignServer, bot.GTL.SignServerKey)), 0o644)
112119
go func() {
113120
CreateBotImpl(req.BotId, req.Password, req.DeviceSeed, 6, req.SignServerAuth)
114121
}()
115122
} else {
116123
bot.GTL = &bot.GMCLogin{
117124
DeviceSeed: req.DeviceSeed,
118125
ClientProtocol: req.ClientProtocol,
119-
SignServer: req.SignServer,
120-
SignServerKey: req.SignServerAuth,
126+
SignServer: g.SignServer,
127+
SignServerKey: g.SignServerKey,
128+
}
129+
if req.SignServer != "" {
130+
bot.GTL.SignServer = req.SignServer
121131
}
122-
_ = os.WriteFile("deviceInfo.toml", []byte(fmt.Sprintf("DeviceSeed = %d \nClientProtocol= %d \nSignServer= \"%s\" \nSignServerkey= \"%s\"", req.DeviceSeed, req.ClientProtocol, req.SignServer, req.SignServerAuth)), 0o644)
132+
if req.SignServerAuth != "" {
133+
bot.GTL.SignServerKey = req.SignServerAuth
134+
}
135+
_ = os.WriteFile("deviceInfo.toml", []byte(fmt.Sprintf("DeviceSeed = %d \nClientProtocol= %d \nSignServer= \"%s\" \nSignServerkey= \"%s\"", bot.GTL.DeviceSeed, bot.GTL.ClientProtocol, bot.GTL.SignServer, bot.GTL.SignServerKey)), 0o644)
123136
go func() {
124137
CreateBotImpl(req.BotId, req.Password, req.DeviceSeed, req.ClientProtocol, req.SignServerAuth)
125138
}()
@@ -208,7 +221,6 @@ func FetchQrCode(c *gin.Context) {
208221
//deviceInfo := device.GetDevice(req.DeviceSeed, req.ClientProtocol)
209222
deviceInfo := device.GetDevice(req.DeviceSeed, 2)
210223
_ = os.WriteFile("deviceInfo.toml", []byte(fmt.Sprintf("DeviceSeed = %d\nClientProtocol = %d", req.DeviceSeed, 2)), 0o644)
211-
fmt.Println(req.DeviceSeed, req.ClientProtocol)
212224
qrCodeBot.UseDevice(deviceInfo)
213225

214226
log.Infof("初始化日志")
@@ -411,14 +423,11 @@ func CreateBotImplMd5(uin int64, passwordMd5 [16]byte, deviceRandSeed int64, cli
411423
deviceInfo = device.GetDevice(uin, clientProtocol)
412424
}
413425

414-
fmt.Println(signServerKey)
415-
416426
log.Infof("设备信息 %+v", string(deviceInfo.ToJson()))
417427

418428
log.Infof("创建机器人 %+v", uin)
419429

420430
cli := client.NewClientMd5(uin, passwordMd5)
421-
cli.SetSSK(signServerKey)
422431
cli.UseDevice(deviceInfo)
423432
bot.Clients.Store(uin, cli)
424433

0 commit comments

Comments
 (0)