mirror of
https://github.com/Mrs4s/MiraiGo.git
synced 2025-05-04 11:07:40 +08:00
client: fix submit ticket
This commit is contained in:
parent
d1a66c42b6
commit
3fb9f40095
@ -260,16 +260,19 @@ func (c *QQClient) buildQRCodeLoginPacket(t106, t16a, t318 []byte) (uint16, []by
|
||||
|
||||
func (c *QQClient) buildCaptchaPacket(result string, sign []byte) (uint16, []byte) {
|
||||
seq := c.nextSeq()
|
||||
req := c.buildOicqRequestPacket(c.Uin, 0x0810, &oicq.TLV{
|
||||
t := &oicq.TLV{
|
||||
Command: 2,
|
||||
List: [][]byte{
|
||||
tlv.T2(result, sign),
|
||||
tlv.T8(2052),
|
||||
tlv.T104(c.sig.T104),
|
||||
tlv.T116(c.version.MiscBitmap, c.version.SubSigmap),
|
||||
tlv.T(0x547, c.sig.T547),
|
||||
},
|
||||
})
|
||||
}
|
||||
if c.sig.T547 != nil {
|
||||
t.Append(tlv.T(0x547, c.sig.T547))
|
||||
}
|
||||
req := c.buildOicqRequestPacket(c.Uin, 0x0810, t)
|
||||
r := network.Request{
|
||||
Type: network.RequestTypeLogin,
|
||||
EncryptType: network.EncryptTypeEmptyKey,
|
||||
@ -332,16 +335,19 @@ func (c *QQClient) buildSMSCodeSubmitPacket(code string) (uint16, []byte) {
|
||||
|
||||
func (c *QQClient) buildTicketSubmitPacket(ticket string) (uint16, []byte) {
|
||||
seq := c.nextSeq()
|
||||
req := c.buildOicqRequestPacket(c.Uin, 0x0810, &oicq.TLV{
|
||||
Command: 7,
|
||||
t := &oicq.TLV{
|
||||
Command: 2,
|
||||
List: [][]byte{
|
||||
tlv.T193(ticket),
|
||||
tlv.T8(2052),
|
||||
tlv.T104(c.sig.T104),
|
||||
tlv.T116(c.version.MiscBitmap, c.version.SubSigmap),
|
||||
tlv.T(0x547, c.sig.T547),
|
||||
},
|
||||
})
|
||||
}
|
||||
if c.sig.T547 != nil {
|
||||
t.Append(tlv.T(0x547, c.sig.T547))
|
||||
}
|
||||
req := c.buildOicqRequestPacket(c.Uin, 0x0810, t)
|
||||
r := network.Request{
|
||||
Type: network.RequestTypeLogin,
|
||||
EncryptType: network.EncryptTypeEmptyKey,
|
||||
|
@ -175,10 +175,6 @@ var decoders = map[string]func(*QQClient, *network.IncomingPacketInfo, []byte) (
|
||||
"SummaryCard.ReqSummaryCard": decodeSummaryCardResponse,
|
||||
}
|
||||
|
||||
func init() {
|
||||
rand.Seed(time.Now().UTC().UnixNano())
|
||||
}
|
||||
|
||||
// NewClient create new qq client
|
||||
func NewClient(uin int64, password string) *QQClient {
|
||||
return NewClientMd5(uin, md5.Sum([]byte(password)))
|
||||
|
@ -65,6 +65,7 @@ var SystemDeviceInfo = &DeviceInfo{
|
||||
var EmptyBytes = make([]byte, 0)
|
||||
|
||||
func init() {
|
||||
rand.Seed(time.Now().UnixNano())
|
||||
r := make([]byte, 16)
|
||||
rand.Read(r)
|
||||
t := md5.Sum(r)
|
||||
|
Loading…
x
Reference in New Issue
Block a user