mirror of
https://github.com/Mrs4s/MiraiGo.git
synced 2025-05-05 03:23:50 +08:00
fix protocol
This commit is contained in:
parent
7312c96e82
commit
3a65d05f33
@ -36,9 +36,9 @@ func (c *QQClient) buildLoginPacket() (uint16, []byte) {
|
|||||||
req := packets.BuildOicqRequestPacket(c.Uin, 0x0810, crypto.ECDH, c.RandomKey, func(w *binary.Writer) {
|
req := packets.BuildOicqRequestPacket(c.Uin, 0x0810, crypto.ECDH, c.RandomKey, func(w *binary.Writer) {
|
||||||
w.WriteUInt16(9)
|
w.WriteUInt16(9)
|
||||||
if c.AllowSlider {
|
if c.AllowSlider {
|
||||||
w.WriteUInt16(0x17)
|
w.WriteUInt16(0x18)
|
||||||
} else {
|
} else {
|
||||||
w.WriteUInt16(0x16)
|
w.WriteUInt16(0x17)
|
||||||
}
|
}
|
||||||
|
|
||||||
w.Write(tlv.T18(16, uint32(c.Uin)))
|
w.Write(tlv.T18(16, uint32(c.Uin)))
|
||||||
@ -47,6 +47,7 @@ func (c *QQClient) buildLoginPacket() (uint16, []byte) {
|
|||||||
w.Write(tlv.T116(c.version.MiscBitmap, c.version.SubSigmap))
|
w.Write(tlv.T116(c.version.MiscBitmap, c.version.SubSigmap))
|
||||||
w.Write(tlv.T100(c.version.SSOVersion, c.version.AppId, c.version.MainSigMap))
|
w.Write(tlv.T100(c.version.SSOVersion, c.version.AppId, c.version.MainSigMap))
|
||||||
w.Write(tlv.T107(0))
|
w.Write(tlv.T107(0))
|
||||||
|
w.Write(tlv.T108(SystemDeviceInfo.IMEI))
|
||||||
w.Write(tlv.T142(c.version.ApkId))
|
w.Write(tlv.T142(c.version.ApkId))
|
||||||
w.Write(tlv.T144(
|
w.Write(tlv.T144(
|
||||||
[]byte(SystemDeviceInfo.IMEI),
|
[]byte(SystemDeviceInfo.IMEI),
|
||||||
@ -74,10 +75,11 @@ func (c *QQClient) buildLoginPacket() (uint16, []byte) {
|
|||||||
w.Write(tlv.T8(2052))
|
w.Write(tlv.T8(2052))
|
||||||
w.Write(tlv.T511([]string{
|
w.Write(tlv.T511([]string{
|
||||||
"tenpay.com", "openmobile.qq.com", "docs.qq.com", "connect.qq.com",
|
"tenpay.com", "openmobile.qq.com", "docs.qq.com", "connect.qq.com",
|
||||||
"qzone.qq.com", "vip.qq.com", "qun.qq.com", "game.qq.com", "qqweb.qq.com",
|
"qzone.qq.com", "vip.qq.com", "gamecenter.qq.com", "qun.qq.com", "game.qq.com",
|
||||||
"office.qq.com", "ti.qq.com", "mail.qq.com", "qzone.com", "mma.qq.com",
|
"qqweb.qq.com", "office.qq.com", "ti.qq.com", "mail.qq.com", "mma.qq.com",
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
//todo: tlv 400
|
||||||
w.Write(tlv.T187(SystemDeviceInfo.MacAddress))
|
w.Write(tlv.T187(SystemDeviceInfo.MacAddress))
|
||||||
w.Write(tlv.T188(SystemDeviceInfo.AndroidId))
|
w.Write(tlv.T188(SystemDeviceInfo.AndroidId))
|
||||||
if len(SystemDeviceInfo.IMSIMd5) != 0 {
|
if len(SystemDeviceInfo.IMSIMd5) != 0 {
|
||||||
|
@ -151,7 +151,7 @@ func genVersionInfo(p ClientProtocol) *versionInfo {
|
|||||||
case AndroidPhone: // Dumped by mirai from qq android v8.2.7
|
case AndroidPhone: // Dumped by mirai from qq android v8.2.7
|
||||||
return &versionInfo{
|
return &versionInfo{
|
||||||
ApkId: "com.tencent.mobileqq",
|
ApkId: "com.tencent.mobileqq",
|
||||||
AppId: 537066439,
|
AppId: 537066419,
|
||||||
SortVersionName: "8.4.18",
|
SortVersionName: "8.4.18",
|
||||||
BuildTime: 1604580615,
|
BuildTime: 1604580615,
|
||||||
ApkSign: []byte{0xA6, 0xB7, 0x45, 0xBF, 0x24, 0xA2, 0xC2, 0x77, 0x52, 0x77, 0x16, 0xF6, 0xF3, 0x6E, 0xB6, 0x8D},
|
ApkSign: []byte{0xA6, 0xB7, 0x45, 0xBF, 0x24, 0xA2, 0xC2, 0x77, 0x52, 0x77, 0x16, 0xF6, 0xF3, 0x6E, 0xB6, 0x8D},
|
||||||
|
@ -5,6 +5,7 @@ import (
|
|||||||
binary2 "encoding/binary"
|
binary2 "encoding/binary"
|
||||||
"github.com/Mrs4s/MiraiGo/binary"
|
"github.com/Mrs4s/MiraiGo/binary"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -38,9 +39,7 @@ func T106(uin, salt, appId, ssoVer uint32, passwordMd5 [16]byte, guidAvailable b
|
|||||||
}
|
}
|
||||||
w.WriteUInt32(appId)
|
w.WriteUInt32(appId)
|
||||||
w.WriteUInt32(1) // password login
|
w.WriteUInt32(1) // password login
|
||||||
b := make([]byte, 8)
|
w.WriteTlv([]byte(strconv.FormatInt(int64(uin), 10)))
|
||||||
binary2.BigEndian.PutUint64(b, uint64(uin))
|
|
||||||
w.WriteTlv(b)
|
|
||||||
w.WriteUInt16(0)
|
w.WriteUInt16(0)
|
||||||
})
|
})
|
||||||
w.WriteTlv(binary.NewWriterF(func(w *binary.Writer) {
|
w.WriteTlv(binary.NewWriterF(func(w *binary.Writer) {
|
||||||
|
@ -2,9 +2,9 @@ package tlv
|
|||||||
|
|
||||||
import "github.com/Mrs4s/MiraiGo/binary"
|
import "github.com/Mrs4s/MiraiGo/binary"
|
||||||
|
|
||||||
func T108(arr []byte) []byte {
|
func T108(imei string) []byte {
|
||||||
return binary.NewWriterF(func(w *binary.Writer) {
|
return binary.NewWriterF(func(w *binary.Writer) {
|
||||||
w.WriteUInt16(0x108)
|
w.WriteUInt16(0x108)
|
||||||
w.WriteTlv(arr)
|
w.WriteTlv([]byte(imei))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user