mirror of
https://github.com/Mrs4s/MiraiGo.git
synced 2025-05-04 19:17:38 +08:00
fix t119 panic.
This commit is contained in:
parent
c4288bd213
commit
7a72473daa
@ -11,7 +11,6 @@ import (
|
|||||||
"google.golang.org/protobuf/proto"
|
"google.golang.org/protobuf/proto"
|
||||||
)
|
)
|
||||||
|
|
||||||
// com.tencent.mobileqq.app.QQMessageFacadeConfig::start
|
|
||||||
var c2cDecoders = map[int32]func(*QQClient, *msg.Message){
|
var c2cDecoders = map[int32]func(*QQClient, *msg.Message){
|
||||||
33: troopAddMemberBroadcastDecoder,
|
33: troopAddMemberBroadcastDecoder,
|
||||||
35: troopSystemMessageDecoder, 36: troopSystemMessageDecoder, 37: troopSystemMessageDecoder,
|
35: troopSystemMessageDecoder, 36: troopSystemMessageDecoder, 37: troopSystemMessageDecoder,
|
||||||
|
@ -4,6 +4,7 @@ import (
|
|||||||
"crypto/sha1"
|
"crypto/sha1"
|
||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"google.golang.org/protobuf/proto"
|
||||||
"io"
|
"io"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"os"
|
"os"
|
||||||
@ -13,7 +14,6 @@ import (
|
|||||||
"github.com/Mrs4s/MiraiGo/client/pb/oidb"
|
"github.com/Mrs4s/MiraiGo/client/pb/oidb"
|
||||||
"github.com/Mrs4s/MiraiGo/protocol/packets"
|
"github.com/Mrs4s/MiraiGo/protocol/packets"
|
||||||
"github.com/Mrs4s/MiraiGo/utils"
|
"github.com/Mrs4s/MiraiGo/utils"
|
||||||
"github.com/golang/protobuf/proto"
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -104,9 +104,11 @@ func (c *QQClient) decodeT119(data []byte) {
|
|||||||
}
|
}
|
||||||
key := md5.Sum(append(append(c.PasswordMd5[:], []byte{0x00, 0x00, 0x00, 0x00}...), binary.NewWriterF(func(w *binary.Writer) { w.WriteUInt32(uint32(c.Uin)) })...))
|
key := md5.Sum(append(append(c.PasswordMd5[:], []byte{0x00, 0x00, 0x00, 0x00}...), binary.NewWriterF(func(w *binary.Writer) { w.WriteUInt32(uint32(c.Uin)) })...))
|
||||||
decrypted := binary.NewTeaCipher(key[:]).Decrypt(c.sigInfo.encryptedA1)
|
decrypted := binary.NewTeaCipher(key[:]).Decrypt(c.sigInfo.encryptedA1)
|
||||||
dr := binary.NewReader(decrypted)
|
if len(decrypted) > 51+16 {
|
||||||
dr.ReadBytes(51)
|
dr := binary.NewReader(decrypted)
|
||||||
SystemDeviceInfo.TgtgtKey = dr.ReadBytes(16)
|
dr.ReadBytes(51)
|
||||||
|
SystemDeviceInfo.TgtgtKey = dr.ReadBytes(16)
|
||||||
|
}
|
||||||
c.Nickname = nick
|
c.Nickname = nick
|
||||||
c.Age = age
|
c.Age = age
|
||||||
c.Gender = gender
|
c.Gender = gender
|
||||||
|
Loading…
x
Reference in New Issue
Block a user