mirror of
https://github.com/Mrs4s/MiraiGo.git
synced 2025-05-04 19:17:38 +08:00
fix protocol.
This commit is contained in:
parent
6ba8bb933f
commit
d216d26eb1
@ -222,7 +222,7 @@ func (c *QQClient) buildRequestTgtgtNopicsigPacket() (uint16, []byte) {
|
||||
}))
|
||||
w.Write(tlv.T147(16, []byte(c.version.SortVersionName), c.version.ApkSign))
|
||||
w.Write(tlv.T177(c.version.BuildTime, c.version.SdkVersion))
|
||||
w.Write(tlv.T400(c.g, c.Uin, SystemDeviceInfo.Guid, []byte("stMNokHgxZUGhsYp"), 1, 16, c.t403))
|
||||
w.Write(tlv.T400(c.g, c.Uin, SystemDeviceInfo.Guid, c.dpwd, 1, 16, c.t403))
|
||||
w.Write(tlv.T187(SystemDeviceInfo.MacAddress))
|
||||
w.Write(tlv.T188(SystemDeviceInfo.AndroidId))
|
||||
w.Write(tlv.T194(SystemDeviceInfo.IMSIMd5))
|
||||
|
@ -57,6 +57,7 @@ type QQClient struct {
|
||||
retryTimes int
|
||||
version *versionInfo
|
||||
|
||||
dpwd []byte
|
||||
syncCookie []byte
|
||||
pubAccountCookie []byte
|
||||
msgCtrlBuf []byte
|
||||
|
@ -6,6 +6,7 @@ import (
|
||||
"fmt"
|
||||
"github.com/Mrs4s/MiraiGo/client/pb/cmd0x6ff"
|
||||
"github.com/Mrs4s/MiraiGo/client/pb/profilecard"
|
||||
"github.com/Mrs4s/MiraiGo/utils"
|
||||
"net"
|
||||
"strconv"
|
||||
"strings"
|
||||
@ -40,8 +41,9 @@ func decodeLoginResponse(c *QQClient, _ uint16, payload []byte) (interface{}, er
|
||||
reader.ReadUInt16()
|
||||
m := reader.ReadTlvMap(2)
|
||||
if m.Exists(0x402) {
|
||||
c.dpwd = []byte(utils.RandomString(16))
|
||||
c.t402 = m[0x402]
|
||||
h := md5.Sum(append(append(SystemDeviceInfo.Guid, []byte("stMNokHgxZUGhsYp")...), c.t402...))
|
||||
h := md5.Sum(append(append(SystemDeviceInfo.Guid, c.dpwd...), c.t402...))
|
||||
c.g = h[:]
|
||||
}
|
||||
if t == 0 { // login success
|
||||
|
Loading…
x
Reference in New Issue
Block a user