1
0
mirror of https://github.com/Mrs4s/MiraiGo.git synced 2025-05-04 19:17:38 +08:00

add t191 switch.

This commit is contained in:
Mrs4s 2020-10-08 15:15:14 +08:00
parent 8ca54d6aac
commit e1f2ae7f80
2 changed files with 9 additions and 2 deletions

View File

@ -36,7 +36,11 @@ func (c *QQClient) buildLoginPacket() (uint16, []byte) {
seq := c.nextSeq()
req := packets.BuildOicqRequestPacket(c.Uin, 0x0810, crypto.ECDH, c.RandomKey, func(w *binary.Writer) {
w.WriteUInt16(9)
w.WriteUInt16(0x17)
if c.AllowSlider {
w.WriteUInt16(0x17)
} else {
w.WriteUInt16(0x16)
}
w.Write(tlv.T18(16, uint32(c.Uin)))
w.Write(tlv.T1(uint32(c.Uin), SystemDeviceInfo.IpAddress))
@ -80,7 +84,9 @@ func (c *QQClient) buildLoginPacket() (uint16, []byte) {
if len(SystemDeviceInfo.IMSIMd5) != 0 {
w.Write(tlv.T194(SystemDeviceInfo.IMSIMd5))
}
w.Write(tlv.T191(0x82))
if c.AllowSlider {
w.Write(tlv.T191(0x82))
}
if len(SystemDeviceInfo.WifiBSSID) != 0 && len(SystemDeviceInfo.WifiSSID) != 0 {
w.Write(tlv.T202(SystemDeviceInfo.WifiBSSID, SystemDeviceInfo.WifiSSID))
}

View File

@ -31,6 +31,7 @@ import (
type QQClient struct {
Uin int64
PasswordMd5 [16]byte
AllowSlider bool
Nickname string
Age uint16