(uin uint32, cmdID int, body []byte)
| 52 | ) |
| 53 | |
| 54 | func (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 | |
| 78 | func (c *QQClient) buildLoginPacket(uin uint32, cmd string, body []byte) []byte { |
| 79 | var _cmd uint16 |
no test coverage detected