From e1f2ae7f80ed3a40dbc312497745c9cb783def88 Mon Sep 17 00:00:00 2001 From: Mrs4s <1844812067@qq.com> Date: Thu, 8 Oct 2020 15:15:14 +0800 Subject: [PATCH] add t191 switch. --- client/builders.go | 10 ++++++++-- client/client.go | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/client/builders.go b/client/builders.go index 4d036203..95c5e5f0 100644 --- a/client/builders.go +++ b/client/builders.go @@ -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)) } diff --git a/client/client.go b/client/client.go index b817a302..0bd207f6 100644 --- a/client/client.go +++ b/client/client.go @@ -31,6 +31,7 @@ import ( type QQClient struct { Uin int64 PasswordMd5 [16]byte + AllowSlider bool Nickname string Age uint16