1
0
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:
Mrs4s 2021-02-20 14:34:12 +08:00
parent c4288bd213
commit 7a72473daa
3 changed files with 6 additions and 5 deletions

View File

@ -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,

View File

@ -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"
)

View File

@ -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)
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