mirror of
https://github.com/Mrs4s/MiraiGo.git
synced 2025-05-04 11:07:40 +08:00
fix typo
This commit is contained in:
parent
aba75d5733
commit
bec52b9b29
@ -8,7 +8,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/Mrs4s/MiraiGo/internal/crypto"
|
"github.com/Mrs4s/MiraiGo/internal/crypto"
|
||||||
packets2 "github.com/Mrs4s/MiraiGo/internal/packets"
|
"github.com/Mrs4s/MiraiGo/internal/packets"
|
||||||
tlv2 "github.com/Mrs4s/MiraiGo/internal/tlv"
|
tlv2 "github.com/Mrs4s/MiraiGo/internal/tlv"
|
||||||
|
|
||||||
"google.golang.org/protobuf/proto"
|
"google.golang.org/protobuf/proto"
|
||||||
@ -32,7 +32,7 @@ var (
|
|||||||
|
|
||||||
func (c *QQClient) buildLoginPacket() (uint16, []byte) {
|
func (c *QQClient) buildLoginPacket() (uint16, []byte) {
|
||||||
seq := c.nextSeq()
|
seq := c.nextSeq()
|
||||||
req := packets2.BuildOicqRequestPacket(c.Uin, 0x0810, c.ecdh, c.RandomKey, func(w *binary.Writer) {
|
req := packets.BuildOicqRequestPacket(c.Uin, 0x0810, c.ecdh, c.RandomKey, func(w *binary.Writer) {
|
||||||
w.WriteUInt16(9)
|
w.WriteUInt16(9)
|
||||||
if c.AllowSlider {
|
if c.AllowSlider {
|
||||||
w.WriteUInt16(0x17)
|
w.WriteUInt16(0x17)
|
||||||
@ -93,14 +93,14 @@ func (c *QQClient) buildLoginPacket() (uint16, []byte) {
|
|||||||
w.Write(tlv2.T521(0))
|
w.Write(tlv2.T521(0))
|
||||||
w.Write(tlv2.T525(tlv2.T536([]byte{0x01, 0x00})))
|
w.Write(tlv2.T525(tlv2.T536([]byte{0x01, 0x00})))
|
||||||
})
|
})
|
||||||
sso := packets2.BuildSsoPacket(seq, c.version.AppId, c.version.SubAppId, "wtlogin.login", c.deviceInfo.IMEI, []byte{}, c.OutGoingPacketSessionId, req, c.ksid)
|
sso := packets.BuildSsoPacket(seq, c.version.AppId, c.version.SubAppId, "wtlogin.login", c.deviceInfo.IMEI, []byte{}, c.OutGoingPacketSessionId, req, c.ksid)
|
||||||
packet := packets2.BuildLoginPacket(c.Uin, 2, make([]byte, 16), sso, []byte{})
|
packet := packets.BuildLoginPacket(c.Uin, 2, make([]byte, 16), sso, []byte{})
|
||||||
return seq, packet
|
return seq, packet
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *QQClient) buildDeviceLockLoginPacket() (uint16, []byte) {
|
func (c *QQClient) buildDeviceLockLoginPacket() (uint16, []byte) {
|
||||||
seq := c.nextSeq()
|
seq := c.nextSeq()
|
||||||
req := packets2.BuildOicqRequestPacket(c.Uin, 0x0810, c.ecdh, c.RandomKey, func(w *binary.Writer) {
|
req := packets.BuildOicqRequestPacket(c.Uin, 0x0810, c.ecdh, c.RandomKey, func(w *binary.Writer) {
|
||||||
w.WriteUInt16(20)
|
w.WriteUInt16(20)
|
||||||
w.WriteUInt16(4)
|
w.WriteUInt16(4)
|
||||||
|
|
||||||
@ -109,18 +109,18 @@ func (c *QQClient) buildDeviceLockLoginPacket() (uint16, []byte) {
|
|||||||
w.Write(tlv2.T116(c.version.MiscBitmap, c.version.SubSigmap))
|
w.Write(tlv2.T116(c.version.MiscBitmap, c.version.SubSigmap))
|
||||||
w.Write(tlv2.T401(c.g))
|
w.Write(tlv2.T401(c.g))
|
||||||
})
|
})
|
||||||
sso := packets2.BuildSsoPacket(seq, c.version.AppId, c.version.SubAppId, "wtlogin.login", c.deviceInfo.IMEI, []byte{}, c.OutGoingPacketSessionId, req, c.ksid)
|
sso := packets.BuildSsoPacket(seq, c.version.AppId, c.version.SubAppId, "wtlogin.login", c.deviceInfo.IMEI, []byte{}, c.OutGoingPacketSessionId, req, c.ksid)
|
||||||
packet := packets2.BuildLoginPacket(c.Uin, 2, make([]byte, 16), sso, []byte{})
|
packet := packets.BuildLoginPacket(c.Uin, 2, make([]byte, 16), sso, []byte{})
|
||||||
return seq, packet
|
return seq, packet
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *QQClient) buildQRCodeFetchRequestPacket() (uint16, []byte) {
|
func (c *QQClient) buildQRCodeFetchRequestPacket() (uint16, []byte) {
|
||||||
watch := genVersionInfo(AndroidWatch)
|
watch := genVersionInfo(AndroidWatch)
|
||||||
seq := c.nextSeq()
|
seq := c.nextSeq()
|
||||||
req := packets2.BuildOicqRequestPacket(0, 0x812, c.ecdh, c.RandomKey, func(w *binary.Writer) {
|
req := packets.BuildOicqRequestPacket(0, 0x812, c.ecdh, c.RandomKey, func(w *binary.Writer) {
|
||||||
w.WriteHex(`0001110000001000000072000000`) // trans header
|
w.WriteHex(`0001110000001000000072000000`) // trans header
|
||||||
w.WriteUInt32(uint32(time.Now().Unix()))
|
w.WriteUInt32(uint32(time.Now().Unix()))
|
||||||
w.Write(packets2.BuildCode2DRequestPacket(0, 0, 0x31, func(w *binary.Writer) {
|
w.Write(packets.BuildCode2DRequestPacket(0, 0, 0x31, func(w *binary.Writer) {
|
||||||
w.WriteUInt16(0) // const
|
w.WriteUInt16(0) // const
|
||||||
w.WriteUInt32(16) // app id
|
w.WriteUInt32(16) // app id
|
||||||
w.WriteUInt64(0) // const
|
w.WriteUInt64(0) // const
|
||||||
@ -136,18 +136,18 @@ func (c *QQClient) buildQRCodeFetchRequestPacket() (uint16, []byte) {
|
|||||||
w.Write(tlv2.T35(8))
|
w.Write(tlv2.T35(8))
|
||||||
}))
|
}))
|
||||||
})
|
})
|
||||||
sso := packets2.BuildSsoPacket(seq, watch.AppId, c.version.SubAppId, "wtlogin.trans_emp", c.deviceInfo.IMEI, []byte{}, c.OutGoingPacketSessionId, req, c.ksid)
|
sso := packets.BuildSsoPacket(seq, watch.AppId, c.version.SubAppId, "wtlogin.trans_emp", c.deviceInfo.IMEI, []byte{}, c.OutGoingPacketSessionId, req, c.ksid)
|
||||||
packet := packets2.BuildLoginPacket(0, 2, make([]byte, 16), sso, []byte{})
|
packet := packets.BuildLoginPacket(0, 2, make([]byte, 16), sso, []byte{})
|
||||||
return seq, packet
|
return seq, packet
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *QQClient) buildQRCodeResultQueryRequestPacket(sig []byte) (uint16, []byte) {
|
func (c *QQClient) buildQRCodeResultQueryRequestPacket(sig []byte) (uint16, []byte) {
|
||||||
watch := genVersionInfo(AndroidWatch)
|
watch := genVersionInfo(AndroidWatch)
|
||||||
seq := c.nextSeq()
|
seq := c.nextSeq()
|
||||||
req := packets2.BuildOicqRequestPacket(0, 0x812, c.ecdh, c.RandomKey, func(w *binary.Writer) {
|
req := packets.BuildOicqRequestPacket(0, 0x812, c.ecdh, c.RandomKey, func(w *binary.Writer) {
|
||||||
w.WriteHex(`0000620000001000000072000000`) // trans header
|
w.WriteHex(`0000620000001000000072000000`) // trans header
|
||||||
w.WriteUInt32(uint32(time.Now().Unix()))
|
w.WriteUInt32(uint32(time.Now().Unix()))
|
||||||
w.Write(packets2.BuildCode2DRequestPacket(1, 0, 0x12, func(w *binary.Writer) {
|
w.Write(packets.BuildCode2DRequestPacket(1, 0, 0x12, func(w *binary.Writer) {
|
||||||
w.WriteUInt16(5) // const
|
w.WriteUInt16(5) // const
|
||||||
w.WriteByte(1) // const
|
w.WriteByte(1) // const
|
||||||
w.WriteUInt32(8) // product type
|
w.WriteUInt32(8) // product type
|
||||||
@ -159,14 +159,14 @@ func (c *QQClient) buildQRCodeResultQueryRequestPacket(sig []byte) (uint16, []by
|
|||||||
w.WriteUInt16(0) // const
|
w.WriteUInt16(0) // const
|
||||||
}))
|
}))
|
||||||
})
|
})
|
||||||
sso := packets2.BuildSsoPacket(seq, watch.AppId, c.version.SubAppId, "wtlogin.trans_emp", c.deviceInfo.IMEI, []byte{}, c.OutGoingPacketSessionId, req, c.ksid)
|
sso := packets.BuildSsoPacket(seq, watch.AppId, c.version.SubAppId, "wtlogin.trans_emp", c.deviceInfo.IMEI, []byte{}, c.OutGoingPacketSessionId, req, c.ksid)
|
||||||
packet := packets2.BuildLoginPacket(0, 2, make([]byte, 16), sso, []byte{})
|
packet := packets.BuildLoginPacket(0, 2, make([]byte, 16), sso, []byte{})
|
||||||
return seq, packet
|
return seq, packet
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *QQClient) buildQRCodeLoginPacket(t106, t16a, t318 []byte) (uint16, []byte) {
|
func (c *QQClient) buildQRCodeLoginPacket(t106, t16a, t318 []byte) (uint16, []byte) {
|
||||||
seq := c.nextSeq()
|
seq := c.nextSeq()
|
||||||
req := packets2.BuildOicqRequestPacket(c.Uin, 0x0810, c.ecdh, c.RandomKey, func(w *binary.Writer) {
|
req := packets.BuildOicqRequestPacket(c.Uin, 0x0810, c.ecdh, c.RandomKey, func(w *binary.Writer) {
|
||||||
w.WriteUInt16(9)
|
w.WriteUInt16(9)
|
||||||
w.WriteUInt16(24)
|
w.WriteUInt16(24)
|
||||||
|
|
||||||
@ -227,14 +227,14 @@ func (c *QQClient) buildQRCodeLoginPacket(t106, t16a, t318 []byte) (uint16, []by
|
|||||||
w.WriteBytesShort(t318)
|
w.WriteBytesShort(t318)
|
||||||
}))
|
}))
|
||||||
})
|
})
|
||||||
sso := packets2.BuildSsoPacket(seq, c.version.AppId, c.version.SubAppId, "wtlogin.login", c.deviceInfo.IMEI, []byte{}, c.OutGoingPacketSessionId, req, c.ksid)
|
sso := packets.BuildSsoPacket(seq, c.version.AppId, c.version.SubAppId, "wtlogin.login", c.deviceInfo.IMEI, []byte{}, c.OutGoingPacketSessionId, req, c.ksid)
|
||||||
packet := packets2.BuildLoginPacket(c.Uin, 2, make([]byte, 16), sso, []byte{})
|
packet := packets.BuildLoginPacket(c.Uin, 2, make([]byte, 16), sso, []byte{})
|
||||||
return seq, packet
|
return seq, packet
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *QQClient) buildCaptchaPacket(result string, sign []byte) (uint16, []byte) {
|
func (c *QQClient) buildCaptchaPacket(result string, sign []byte) (uint16, []byte) {
|
||||||
seq := c.nextSeq()
|
seq := c.nextSeq()
|
||||||
req := packets2.BuildOicqRequestPacket(c.Uin, 0x810, c.ecdh, c.RandomKey, func(w *binary.Writer) {
|
req := packets.BuildOicqRequestPacket(c.Uin, 0x810, c.ecdh, c.RandomKey, func(w *binary.Writer) {
|
||||||
w.WriteUInt16(2) // sub command
|
w.WriteUInt16(2) // sub command
|
||||||
w.WriteUInt16(4)
|
w.WriteUInt16(4)
|
||||||
|
|
||||||
@ -243,14 +243,14 @@ func (c *QQClient) buildCaptchaPacket(result string, sign []byte) (uint16, []byt
|
|||||||
w.Write(tlv2.T104(c.t104))
|
w.Write(tlv2.T104(c.t104))
|
||||||
w.Write(tlv2.T116(c.version.MiscBitmap, c.version.SubSigmap))
|
w.Write(tlv2.T116(c.version.MiscBitmap, c.version.SubSigmap))
|
||||||
})
|
})
|
||||||
sso := packets2.BuildSsoPacket(seq, c.version.AppId, c.version.SubAppId, "wtlogin.login", c.deviceInfo.IMEI, []byte{}, c.OutGoingPacketSessionId, req, c.ksid)
|
sso := packets.BuildSsoPacket(seq, c.version.AppId, c.version.SubAppId, "wtlogin.login", c.deviceInfo.IMEI, []byte{}, c.OutGoingPacketSessionId, req, c.ksid)
|
||||||
packet := packets2.BuildLoginPacket(c.Uin, 2, make([]byte, 16), sso, []byte{})
|
packet := packets.BuildLoginPacket(c.Uin, 2, make([]byte, 16), sso, []byte{})
|
||||||
return seq, packet
|
return seq, packet
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *QQClient) buildSMSRequestPacket() (uint16, []byte) {
|
func (c *QQClient) buildSMSRequestPacket() (uint16, []byte) {
|
||||||
seq := c.nextSeq()
|
seq := c.nextSeq()
|
||||||
req := packets2.BuildOicqRequestPacket(c.Uin, 0x810, c.ecdh, c.RandomKey, func(w *binary.Writer) {
|
req := packets.BuildOicqRequestPacket(c.Uin, 0x810, c.ecdh, c.RandomKey, func(w *binary.Writer) {
|
||||||
w.WriteUInt16(8)
|
w.WriteUInt16(8)
|
||||||
w.WriteUInt16(6)
|
w.WriteUInt16(6)
|
||||||
|
|
||||||
@ -261,14 +261,14 @@ func (c *QQClient) buildSMSRequestPacket() (uint16, []byte) {
|
|||||||
w.Write(tlv2.T17A(9))
|
w.Write(tlv2.T17A(9))
|
||||||
w.Write(tlv2.T197())
|
w.Write(tlv2.T197())
|
||||||
})
|
})
|
||||||
sso := packets2.BuildSsoPacket(seq, c.version.AppId, c.version.SubAppId, "wtlogin.login", c.deviceInfo.IMEI, []byte{}, c.OutGoingPacketSessionId, req, c.ksid)
|
sso := packets.BuildSsoPacket(seq, c.version.AppId, c.version.SubAppId, "wtlogin.login", c.deviceInfo.IMEI, []byte{}, c.OutGoingPacketSessionId, req, c.ksid)
|
||||||
packet := packets2.BuildLoginPacket(c.Uin, 2, make([]byte, 16), sso, []byte{})
|
packet := packets.BuildLoginPacket(c.Uin, 2, make([]byte, 16), sso, []byte{})
|
||||||
return seq, packet
|
return seq, packet
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *QQClient) buildSMSCodeSubmitPacket(code string) (uint16, []byte) {
|
func (c *QQClient) buildSMSCodeSubmitPacket(code string) (uint16, []byte) {
|
||||||
seq := c.nextSeq()
|
seq := c.nextSeq()
|
||||||
req := packets2.BuildOicqRequestPacket(c.Uin, 0x810, c.ecdh, c.RandomKey, func(w *binary.Writer) {
|
req := packets.BuildOicqRequestPacket(c.Uin, 0x810, c.ecdh, c.RandomKey, func(w *binary.Writer) {
|
||||||
w.WriteUInt16(7)
|
w.WriteUInt16(7)
|
||||||
w.WriteUInt16(7)
|
w.WriteUInt16(7)
|
||||||
|
|
||||||
@ -280,14 +280,14 @@ func (c *QQClient) buildSMSCodeSubmitPacket(code string) (uint16, []byte) {
|
|||||||
w.Write(tlv2.T401(c.g))
|
w.Write(tlv2.T401(c.g))
|
||||||
w.Write(tlv2.T198())
|
w.Write(tlv2.T198())
|
||||||
})
|
})
|
||||||
sso := packets2.BuildSsoPacket(seq, c.version.AppId, c.version.SubAppId, "wtlogin.login", c.deviceInfo.IMEI, []byte{}, c.OutGoingPacketSessionId, req, c.ksid)
|
sso := packets.BuildSsoPacket(seq, c.version.AppId, c.version.SubAppId, "wtlogin.login", c.deviceInfo.IMEI, []byte{}, c.OutGoingPacketSessionId, req, c.ksid)
|
||||||
packet := packets2.BuildLoginPacket(c.Uin, 2, make([]byte, 16), sso, []byte{})
|
packet := packets.BuildLoginPacket(c.Uin, 2, make([]byte, 16), sso, []byte{})
|
||||||
return seq, packet
|
return seq, packet
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *QQClient) buildTicketSubmitPacket(ticket string) (uint16, []byte) {
|
func (c *QQClient) buildTicketSubmitPacket(ticket string) (uint16, []byte) {
|
||||||
seq := c.nextSeq()
|
seq := c.nextSeq()
|
||||||
req := packets2.BuildOicqRequestPacket(c.Uin, 0x810, c.ecdh, c.RandomKey, func(w *binary.Writer) {
|
req := packets.BuildOicqRequestPacket(c.Uin, 0x810, c.ecdh, c.RandomKey, func(w *binary.Writer) {
|
||||||
w.WriteUInt16(2)
|
w.WriteUInt16(2)
|
||||||
w.WriteUInt16(4)
|
w.WriteUInt16(4)
|
||||||
|
|
||||||
@ -296,14 +296,14 @@ func (c *QQClient) buildTicketSubmitPacket(ticket string) (uint16, []byte) {
|
|||||||
w.Write(tlv2.T104(c.t104))
|
w.Write(tlv2.T104(c.t104))
|
||||||
w.Write(tlv2.T116(c.version.MiscBitmap, c.version.SubSigmap))
|
w.Write(tlv2.T116(c.version.MiscBitmap, c.version.SubSigmap))
|
||||||
})
|
})
|
||||||
sso := packets2.BuildSsoPacket(seq, c.version.AppId, c.version.SubAppId, "wtlogin.login", c.deviceInfo.IMEI, []byte{}, c.OutGoingPacketSessionId, req, c.ksid)
|
sso := packets.BuildSsoPacket(seq, c.version.AppId, c.version.SubAppId, "wtlogin.login", c.deviceInfo.IMEI, []byte{}, c.OutGoingPacketSessionId, req, c.ksid)
|
||||||
packet := packets2.BuildLoginPacket(c.Uin, 2, make([]byte, 16), sso, []byte{})
|
packet := packets.BuildLoginPacket(c.Uin, 2, make([]byte, 16), sso, []byte{})
|
||||||
return seq, packet
|
return seq, packet
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *QQClient) buildRequestTgtgtNopicsigPacket() (uint16, []byte) {
|
func (c *QQClient) buildRequestTgtgtNopicsigPacket() (uint16, []byte) {
|
||||||
seq := c.nextSeq()
|
seq := c.nextSeq()
|
||||||
req := packets2.BuildOicqRequestPacket(c.Uin, 0x0810, crypto.NewEncryptSession(c.sigInfo.t133), c.sigInfo.wtSessionTicketKey, func(w *binary.Writer) {
|
req := packets.BuildOicqRequestPacket(c.Uin, 0x0810, crypto.NewEncryptSession(c.sigInfo.t133), c.sigInfo.wtSessionTicketKey, func(w *binary.Writer) {
|
||||||
w.WriteUInt16(15)
|
w.WriteUInt16(15)
|
||||||
w.WriteUInt16(24)
|
w.WriteUInt16(24)
|
||||||
|
|
||||||
@ -351,13 +351,13 @@ func (c *QQClient) buildRequestTgtgtNopicsigPacket() (uint16, []byte) {
|
|||||||
w.Write(tlv2.T521(0))
|
w.Write(tlv2.T521(0))
|
||||||
w.Write(tlv2.T525(tlv2.T536([]byte{0x01, 0x00})))
|
w.Write(tlv2.T525(tlv2.T536([]byte{0x01, 0x00})))
|
||||||
})
|
})
|
||||||
packet := packets2.BuildUniPacket(c.Uin, seq, "wtlogin.exchange_emp", 2, c.OutGoingPacketSessionId, []byte{}, make([]byte, 16), req)
|
packet := packets.BuildUniPacket(c.Uin, seq, "wtlogin.exchange_emp", 2, c.OutGoingPacketSessionId, []byte{}, make([]byte, 16), req)
|
||||||
return seq, packet
|
return seq, packet
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *QQClient) buildRequestChangeSigPacket() (uint16, []byte) {
|
func (c *QQClient) buildRequestChangeSigPacket() (uint16, []byte) {
|
||||||
seq := c.nextSeq()
|
seq := c.nextSeq()
|
||||||
req := packets2.BuildOicqRequestPacket(c.Uin, 0x0810, c.ecdh, c.RandomKey, func(w *binary.Writer) {
|
req := packets.BuildOicqRequestPacket(c.Uin, 0x0810, c.ecdh, c.RandomKey, func(w *binary.Writer) {
|
||||||
w.WriteUInt16(11)
|
w.WriteUInt16(11)
|
||||||
w.WriteUInt16(17)
|
w.WriteUInt16(17)
|
||||||
|
|
||||||
@ -397,8 +397,8 @@ func (c *QQClient) buildRequestChangeSigPacket() (uint16, []byte) {
|
|||||||
}))
|
}))
|
||||||
// w.Write(tlv.T202(c.deviceInfo.WifiBSSID, c.deviceInfo.WifiSSID))
|
// w.Write(tlv.T202(c.deviceInfo.WifiBSSID, c.deviceInfo.WifiSSID))
|
||||||
})
|
})
|
||||||
sso := packets2.BuildSsoPacket(seq, c.version.AppId, c.version.SubAppId, "wtlogin.exchange_emp", c.deviceInfo.IMEI, c.sigInfo.tgt, c.OutGoingPacketSessionId, req, c.ksid)
|
sso := packets.BuildSsoPacket(seq, c.version.AppId, c.version.SubAppId, "wtlogin.exchange_emp", c.deviceInfo.IMEI, c.sigInfo.tgt, c.OutGoingPacketSessionId, req, c.ksid)
|
||||||
packet := packets2.BuildLoginPacket(c.Uin, 2, make([]byte, 16), sso, []byte{})
|
packet := packets.BuildLoginPacket(c.Uin, 2, make([]byte, 16), sso, []byte{})
|
||||||
return seq, packet
|
return seq, packet
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -445,8 +445,8 @@ func (c *QQClient) buildClientRegisterPacket() (uint16, []byte) {
|
|||||||
Context: make(map[string]string),
|
Context: make(map[string]string),
|
||||||
Status: make(map[string]string),
|
Status: make(map[string]string),
|
||||||
}
|
}
|
||||||
sso := packets2.BuildSsoPacket(seq, c.version.AppId, c.version.SubAppId, "StatSvc.register", c.deviceInfo.IMEI, c.sigInfo.tgt, c.OutGoingPacketSessionId, pkt.ToBytes(), c.ksid)
|
sso := packets.BuildSsoPacket(seq, c.version.AppId, c.version.SubAppId, "StatSvc.register", c.deviceInfo.IMEI, c.sigInfo.tgt, c.OutGoingPacketSessionId, pkt.ToBytes(), c.ksid)
|
||||||
packet := packets2.BuildLoginPacket(c.Uin, 1, c.sigInfo.d2Key, sso, c.sigInfo.d2)
|
packet := packets.BuildLoginPacket(c.Uin, 1, c.sigInfo.d2Key, sso, c.sigInfo.d2)
|
||||||
return seq, packet
|
return seq, packet
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -484,7 +484,7 @@ func (c *QQClient) buildStatusSetPacket(status, extStatus int32) (uint16, []byte
|
|||||||
Context: make(map[string]string),
|
Context: make(map[string]string),
|
||||||
Status: make(map[string]string),
|
Status: make(map[string]string),
|
||||||
}
|
}
|
||||||
packet := packets2.BuildUniPacket(c.Uin, seq, "StatSvc.SetStatusFromClient", 1, c.OutGoingPacketSessionId, []byte{}, c.sigInfo.d2Key, pkt.ToBytes())
|
packet := packets.BuildUniPacket(c.Uin, seq, "StatSvc.SetStatusFromClient", 1, c.OutGoingPacketSessionId, []byte{}, c.sigInfo.d2Key, pkt.ToBytes())
|
||||||
return seq, packet
|
return seq, packet
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -506,7 +506,7 @@ func (c *QQClient) buildConfPushRespPacket(t int32, pktSeq int64, jceBuf []byte)
|
|||||||
Context: make(map[string]string),
|
Context: make(map[string]string),
|
||||||
Status: make(map[string]string),
|
Status: make(map[string]string),
|
||||||
}
|
}
|
||||||
packet := packets2.BuildUniPacket(c.Uin, seq, "ConfigPushSvc.PushResp", 1, c.OutGoingPacketSessionId, []byte{}, c.sigInfo.d2Key, pkt.ToBytes())
|
packet := packets.BuildUniPacket(c.Uin, seq, "ConfigPushSvc.PushResp", 1, c.OutGoingPacketSessionId, []byte{}, c.sigInfo.d2Key, pkt.ToBytes())
|
||||||
return seq, packet
|
return seq, packet
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -564,7 +564,7 @@ func (c *QQClient) buildFriendGroupListRequestPacket(friendStartIndex, friendLis
|
|||||||
Context: make(map[string]string),
|
Context: make(map[string]string),
|
||||||
Status: make(map[string]string),
|
Status: make(map[string]string),
|
||||||
}
|
}
|
||||||
packet := packets2.BuildUniPacket(c.Uin, seq, "friendlist.getFriendGroupList", 1, c.OutGoingPacketSessionId, []byte{}, c.sigInfo.d2Key, pkt.ToBytes())
|
packet := packets.BuildUniPacket(c.Uin, seq, "friendlist.getFriendGroupList", 1, c.OutGoingPacketSessionId, []byte{}, c.sigInfo.d2Key, pkt.ToBytes())
|
||||||
return seq, packet
|
return seq, packet
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -649,7 +649,7 @@ func (c *QQClient) buildSummaryCardRequestPacket(target int64) (uint16, []byte)
|
|||||||
Context: make(map[string]string),
|
Context: make(map[string]string),
|
||||||
Status: make(map[string]string),
|
Status: make(map[string]string),
|
||||||
}
|
}
|
||||||
packet := packets2.BuildUniPacket(c.Uin, seq, "SummaryCard.ReqSummaryCard", 1, c.OutGoingPacketSessionId, []byte{}, c.sigInfo.d2Key, pkt.ToBytes())
|
packet := packets.BuildUniPacket(c.Uin, seq, "SummaryCard.ReqSummaryCard", 1, c.OutGoingPacketSessionId, []byte{}, c.sigInfo.d2Key, pkt.ToBytes())
|
||||||
return seq, packet
|
return seq, packet
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -674,7 +674,7 @@ func (c *QQClient) buildFriendDeletePacket(target int64) (uint16, []byte) {
|
|||||||
Context: make(map[string]string),
|
Context: make(map[string]string),
|
||||||
Status: make(map[string]string),
|
Status: make(map[string]string),
|
||||||
}
|
}
|
||||||
packet := packets2.BuildUniPacket(c.Uin, seq, "friendlist.delFriend", 1, c.OutGoingPacketSessionId, []byte{}, c.sigInfo.d2Key, pkt.ToBytes())
|
packet := packets.BuildUniPacket(c.Uin, seq, "friendlist.delFriend", 1, c.OutGoingPacketSessionId, []byte{}, c.sigInfo.d2Key, pkt.ToBytes())
|
||||||
return seq, packet
|
return seq, packet
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -705,7 +705,7 @@ func (c *QQClient) buildGroupListRequestPacket(vecCookie []byte) (uint16, []byte
|
|||||||
Context: make(map[string]string),
|
Context: make(map[string]string),
|
||||||
Status: make(map[string]string),
|
Status: make(map[string]string),
|
||||||
}
|
}
|
||||||
packet := packets2.BuildUniPacket(c.Uin, seq, "friendlist.GetTroopListReqV2", 1, c.OutGoingPacketSessionId, []byte{}, c.sigInfo.d2Key, pkt.ToBytes())
|
packet := packets.BuildUniPacket(c.Uin, seq, "friendlist.GetTroopListReqV2", 1, c.OutGoingPacketSessionId, []byte{}, c.sigInfo.d2Key, pkt.ToBytes())
|
||||||
return seq, packet
|
return seq, packet
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -733,7 +733,7 @@ func (c *QQClient) buildGroupMemberListRequestPacket(groupUin, groupCode, nextUi
|
|||||||
Context: make(map[string]string),
|
Context: make(map[string]string),
|
||||||
Status: make(map[string]string),
|
Status: make(map[string]string),
|
||||||
}
|
}
|
||||||
packet := packets2.BuildUniPacket(c.Uin, seq, "friendlist.GetTroopMemberListReq", 1, c.OutGoingPacketSessionId, []byte{}, c.sigInfo.d2Key, pkt.ToBytes())
|
packet := packets.BuildUniPacket(c.Uin, seq, "friendlist.GetTroopMemberListReq", 1, c.OutGoingPacketSessionId, []byte{}, c.sigInfo.d2Key, pkt.ToBytes())
|
||||||
return seq, packet
|
return seq, packet
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -748,7 +748,7 @@ func (c *QQClient) buildGroupMemberInfoRequestPacket(groupCode, uin int64) (uint
|
|||||||
RichCardNameVer: 1,
|
RichCardNameVer: 1,
|
||||||
}
|
}
|
||||||
payload, _ := proto.Marshal(req)
|
payload, _ := proto.Marshal(req)
|
||||||
packet := packets2.BuildUniPacket(c.Uin, seq, "group_member_card.get_group_member_card_info", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
|
packet := packets.BuildUniPacket(c.Uin, seq, "group_member_card.get_group_member_card_info", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
|
||||||
return seq, packet
|
return seq, packet
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -779,7 +779,7 @@ func (c *QQClient) buildGetMessageRequestPacket(flag msg.SyncFlag, msgTime int64
|
|||||||
ServerBuf: []byte{},
|
ServerBuf: []byte{},
|
||||||
}
|
}
|
||||||
payload, _ := proto.Marshal(req)
|
payload, _ := proto.Marshal(req)
|
||||||
packet := packets2.BuildUniPacket(c.Uin, seq, "MessageSvc.PbGetMsg", 1, c.OutGoingPacketSessionId, []byte{}, c.sigInfo.d2Key, payload)
|
packet := packets.BuildUniPacket(c.Uin, seq, "MessageSvc.PbGetMsg", 1, c.OutGoingPacketSessionId, []byte{}, c.sigInfo.d2Key, payload)
|
||||||
return seq, packet
|
return seq, packet
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -788,7 +788,7 @@ func (c *QQClient) buildDeleteMessageRequestPacket(msg []*pb.MessageItem) (uint1
|
|||||||
seq := c.nextSeq()
|
seq := c.nextSeq()
|
||||||
req := &pb.DeleteMessageRequest{Items: msg}
|
req := &pb.DeleteMessageRequest{Items: msg}
|
||||||
payload, _ := proto.Marshal(req)
|
payload, _ := proto.Marshal(req)
|
||||||
packet := packets2.BuildUniPacket(c.Uin, seq, "MessageSvc.PbDeleteMsg", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
|
packet := packets.BuildUniPacket(c.Uin, seq, "MessageSvc.PbDeleteMsg", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
|
||||||
return seq, packet
|
return seq, packet
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -816,7 +816,7 @@ func (c *QQClient) buildDeleteOnlinePushPacket(uin int64, svrip int32, pushToken
|
|||||||
Context: make(map[string]string),
|
Context: make(map[string]string),
|
||||||
Status: make(map[string]string),
|
Status: make(map[string]string),
|
||||||
}
|
}
|
||||||
return packets2.BuildUniPacket(c.Uin, seq, "OnlinePush.RespPush", 1, c.OutGoingPacketSessionId, []byte{}, c.sigInfo.d2Key, pkt.ToBytes())
|
return packets.BuildUniPacket(c.Uin, seq, "OnlinePush.RespPush", 1, c.OutGoingPacketSessionId, []byte{}, c.sigInfo.d2Key, pkt.ToBytes())
|
||||||
}
|
}
|
||||||
|
|
||||||
// LongConn.OffPicUp
|
// LongConn.OffPicUp
|
||||||
@ -844,7 +844,7 @@ func (c *QQClient) buildOffPicUpPacket(target int64, md5 []byte, size int32) (ui
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
payload, _ := proto.Marshal(req)
|
payload, _ := proto.Marshal(req)
|
||||||
packet := packets2.BuildUniPacket(c.Uin, seq, "LongConn.OffPicUp", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
|
packet := packets.BuildUniPacket(c.Uin, seq, "LongConn.OffPicUp", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
|
||||||
return seq, packet
|
return seq, packet
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -865,7 +865,7 @@ func (c *QQClient) buildSystemMsgNewFriendPacket() (uint16, []byte) {
|
|||||||
FriendMsgTypeFlag: 1,
|
FriendMsgTypeFlag: 1,
|
||||||
}
|
}
|
||||||
payload, _ := proto.Marshal(req)
|
payload, _ := proto.Marshal(req)
|
||||||
packet := packets2.BuildUniPacket(c.Uin, seq, "ProfileService.Pb.ReqSystemMsgNew.Friend", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
|
packet := packets.BuildUniPacket(c.Uin, seq, "ProfileService.Pb.ReqSystemMsgNew.Friend", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
|
||||||
return seq, packet
|
return seq, packet
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -892,7 +892,7 @@ func (c *QQClient) buildEditGroupTagPacket(groupCode, memberUin int64, newTag st
|
|||||||
Context: map[string]string{},
|
Context: map[string]string{},
|
||||||
Status: map[string]string{},
|
Status: map[string]string{},
|
||||||
}
|
}
|
||||||
packet := packets2.BuildUniPacket(c.Uin, seq, "friendlist.ModifyGroupCardReq", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, pkt.ToBytes())
|
packet := packets.BuildUniPacket(c.Uin, seq, "friendlist.ModifyGroupCardReq", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, pkt.ToBytes())
|
||||||
return seq, packet
|
return seq, packet
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -912,7 +912,7 @@ func (c *QQClient) buildEditSpecialTitlePacket(groupCode, memberUin int64, newTi
|
|||||||
}
|
}
|
||||||
b, _ := proto.Marshal(body)
|
b, _ := proto.Marshal(body)
|
||||||
payload := c.packOIDBPackage(2300, 2, b)
|
payload := c.packOIDBPackage(2300, 2, b)
|
||||||
packet := packets2.BuildUniPacket(c.Uin, seq, "OidbSvc.0x8fc_2", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
|
packet := packets.BuildUniPacket(c.Uin, seq, "OidbSvc.0x8fc_2", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
|
||||||
return seq, packet
|
return seq, packet
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -921,7 +921,7 @@ func (c *QQClient) buildGroupOperationPacket(body *oidb.D89AReqBody) (uint16, []
|
|||||||
seq := c.nextSeq()
|
seq := c.nextSeq()
|
||||||
b, _ := proto.Marshal(body)
|
b, _ := proto.Marshal(body)
|
||||||
payload := c.packOIDBPackage(2202, 0, b)
|
payload := c.packOIDBPackage(2202, 0, b)
|
||||||
packet := packets2.BuildUniPacket(c.Uin, seq, "OidbSvc.0x89a_0", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
|
packet := packets.BuildUniPacket(c.Uin, seq, "OidbSvc.0x89a_0", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
|
||||||
return seq, packet
|
return seq, packet
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -982,7 +982,7 @@ func (c *QQClient) buildGroupKickPacket(groupCode, memberUin int64, kickMsg stri
|
|||||||
}
|
}
|
||||||
b, _ := proto.Marshal(body)
|
b, _ := proto.Marshal(body)
|
||||||
payload := c.packOIDBPackage(2208, 0, b)
|
payload := c.packOIDBPackage(2208, 0, b)
|
||||||
packet := packets2.BuildUniPacket(c.Uin, seq, "OidbSvc.0x8a0_0", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
|
packet := packets.BuildUniPacket(c.Uin, seq, "OidbSvc.0x8a0_0", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
|
||||||
return seq, packet
|
return seq, packet
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -996,7 +996,7 @@ func (c *QQClient) buildGroupMutePacket(groupCode, memberUin int64, time uint32)
|
|||||||
w.WriteUInt32(uint32(memberUin))
|
w.WriteUInt32(uint32(memberUin))
|
||||||
w.WriteUInt32(time)
|
w.WriteUInt32(time)
|
||||||
}))
|
}))
|
||||||
packet := packets2.BuildUniPacket(c.Uin, seq, "OidbSvc.0x570_8", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
|
packet := packets.BuildUniPacket(c.Uin, seq, "OidbSvc.0x570_8", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
|
||||||
return seq, packet
|
return seq, packet
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1009,7 +1009,7 @@ func (c *QQClient) buildGroupPokePacket(groupCode, target int64) (uint16, []byte
|
|||||||
}
|
}
|
||||||
b, _ := proto.Marshal(body)
|
b, _ := proto.Marshal(body)
|
||||||
payload := c.packOIDBPackage(3795, 1, b)
|
payload := c.packOIDBPackage(3795, 1, b)
|
||||||
packet := packets2.BuildUniPacket(c.Uin, seq, "OidbSvc.0xed3", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
|
packet := packets.BuildUniPacket(c.Uin, seq, "OidbSvc.0xed3", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
|
||||||
return seq, packet
|
return seq, packet
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1022,7 +1022,7 @@ func (c *QQClient) buildFriendPokePacket(target int64) (uint16, []byte) {
|
|||||||
}
|
}
|
||||||
b, _ := proto.Marshal(body)
|
b, _ := proto.Marshal(body)
|
||||||
payload := c.packOIDBPackage(3795, 1, b)
|
payload := c.packOIDBPackage(3795, 1, b)
|
||||||
packet := packets2.BuildUniPacket(c.Uin, seq, "OidbSvc.0xed3", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
|
packet := packets.BuildUniPacket(c.Uin, seq, "OidbSvc.0xed3", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
|
||||||
return seq, packet
|
return seq, packet
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1039,7 +1039,7 @@ func (c *QQClient) buildGroupAdminSetPacket(groupCode, member int64, flag bool)
|
|||||||
return 0
|
return 0
|
||||||
}())
|
}())
|
||||||
}))
|
}))
|
||||||
packet := packets2.BuildUniPacket(c.Uin, seq, "OidbSvc.0x55c_1", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
|
packet := packets.BuildUniPacket(c.Uin, seq, "OidbSvc.0x55c_1", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
|
||||||
return seq, packet
|
return seq, packet
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1063,7 +1063,7 @@ func (c *QQClient) buildQuitGroupPacket(groupCode int64) (uint16, []byte) {
|
|||||||
Context: map[string]string{},
|
Context: map[string]string{},
|
||||||
Status: map[string]string{},
|
Status: map[string]string{},
|
||||||
}
|
}
|
||||||
packet := packets2.BuildUniPacket(c.Uin, seq, "ProfileService.GroupMngReq", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, pkt.ToBytes())
|
packet := packets.BuildUniPacket(c.Uin, seq, "ProfileService.GroupMngReq", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, pkt.ToBytes())
|
||||||
return seq, packet
|
return seq, packet
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1083,7 +1083,7 @@ func (c *QQClient) buildAppInfoRequestPacket(id string) (uint16, []byte) {
|
|||||||
TraceId: fmt.Sprintf("%v_%v_%v", c.Uin, time.Now().Format("0102150405"), rand.Int63()),
|
TraceId: fmt.Sprintf("%v_%v_%v", c.Uin, time.Now().Format("0102150405"), rand.Int63()),
|
||||||
}
|
}
|
||||||
payload, _ := proto.Marshal(body)
|
payload, _ := proto.Marshal(body)
|
||||||
packet := packets2.BuildUniPacket(c.Uin, seq, "LightAppSvc.mini_app_info.GetAppInfoById", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
|
packet := packets.BuildUniPacket(c.Uin, seq, "LightAppSvc.mini_app_info.GetAppInfoById", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
|
||||||
return seq, packet
|
return seq, packet
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1094,7 +1094,7 @@ func (c *QQClient) buildWordSegmentationPacket(data []byte) (uint16, []byte) {
|
|||||||
Content: data,
|
Content: data,
|
||||||
Qua: []byte("and_537065262_8.4.5"),
|
Qua: []byte("and_537065262_8.4.5"),
|
||||||
})
|
})
|
||||||
packet := packets2.BuildUniPacket(c.Uin, seq, "OidbSvc.0xd79", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
|
packet := packets.BuildUniPacket(c.Uin, seq, "OidbSvc.0xd79", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
|
||||||
return seq, packet
|
return seq, packet
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1112,6 +1112,6 @@ func (c *QQClient) sendGroupGiftPacket(groupCode, uin uint64, productID message.
|
|||||||
Sig: []byte(c.getSKey()),
|
Sig: []byte(c.getSKey()),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
packet := packets2.BuildUniPacket(c.Uin, seq, "OidbSvc.0xdad_1", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
|
packet := packets.BuildUniPacket(c.Uin, seq, "OidbSvc.0xdad_1", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
|
||||||
return seq, packet
|
return seq, packet
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user