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