MCPcopy Create free account
hub / github.com/LagrangeDev/LagrangeGo / buildCode2dPacket

Method buildCode2dPacket

client/oicq.go:54–76  ·  view source on GitHub ↗
(uin uint32, cmdID int, body []byte)

Source from the content-addressed store, hash-verified

52)
53
54func (c *QQClient) buildCode2dPacket(uin uint32, cmdID int, body []byte) []byte {
55 return c.buildLoginPacket(
56 uin,
57 "wtlogin.trans_emp",
58 binary.NewBuilder().
59 WriteU8(0).
60 WriteU16(uint16(len(body))+53).
61 WriteU32(uint32(c.Version().AppID)).
62 WriteU32(0x72).
63 WriteBytes(make([]byte, 3)).
64 WriteU32(uint32(utils.TimeStamp())).
65 WriteU8(2).
66 WriteU16(uint16(len(body)+49)).
67 WriteU16(uint16(cmdID)).
68 WriteBytes(make([]byte, 21)).
69 WriteU8(3).
70 WriteU32(50).
71 WriteBytes(make([]byte, 14)).
72 WriteU32(uint32(c.Version().AppID)).
73 WriteBytes(body).
74 ToBytes(),
75 )
76}
77
78func (c *QQClient) buildLoginPacket(uin uint32, cmd string, body []byte) []byte {
79 var _cmd uint16

Callers 2

FetchQRCodeMethod · 0.95
GetQRCodeResultMethod · 0.95

Calls 9

buildLoginPacketMethod · 0.95
VersionMethod · 0.95
NewBuilderFunction · 0.92
TimeStampFunction · 0.92
ToBytesMethod · 0.80
WriteBytesMethod · 0.80
WriteU32Method · 0.80
WriteU8Method · 0.80
WriteU16Method · 0.80

Tested by

no test coverage detected