Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions client/auth/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,27 @@ var AppList = map[string]map[string]*AppInfo{
SubSigmap: 0,
NTLoginType: 1,
},

"3.2.19-39038": {
OS: "Linux",
Kernel: "Linux",
VendorOS: "linux",

CurrentVersion: "3.2.19-39038",
BuildVersion: 39038,
MiscBitmap: 32764,
PTVersion: "2.0.0",
PTOSVersion: 19,
PackageName: "com.tencent.qq",
WTLoginSDK: "nt.wtlogin.0.0.1",
AppID: 1600001615,
SubAppID: 537313942,
AppIDQrcode: 537313942,
AppClientVersion: 39038,
MainSigmap: 169742560,
SubSigmap: 0,
NTLoginType: 1,
},
},

"macos": {
Expand Down
5 changes: 5 additions & 0 deletions client/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@ func (c *QQClient) AddSignServer(signServers ...string) {
c.signProvider.AddSignServer(signServers...)
}

// GetSignServer 获得所有签名服务器
func (c *QQClient) GetSignServer() []string {
return c.signProvider.GetSignServer()
}

// AddSignHeader 设置签名服务器签名时的额外http header
func (c *QQClient) AddSignHeader(header map[string]string) {
if c.signProvider == nil {
Expand Down
9 changes: 9 additions & 0 deletions client/cache.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
package client

import (
"strconv"
"time"

"github.com/LagrangeDev/LagrangeGo/client/entity"
)

var selfUin string

// GetUID 获取缓存中对应uin的uid
func (c *QQClient) GetUID(uin uint32, groupUin ...uint32) string {
if uin == 0 {
return ""
}
if uin == c.Uin {
if selfUin == "" {
selfUin = strconv.FormatUint(uint64(uin), 10)
}
return selfUin
}
if len(groupUin) == 0 && c.cache.FriendCacheIsEmpty() {
if err := c.RefreshFriendCache(); err != nil {
return ""
Expand Down
9 changes: 6 additions & 3 deletions client/packets/oidb/fetch_friends.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ func BuildFetchFriendsReq(token uint32) (*Packet, error) {
body := oidb.OidbSvcTrpcTcp0XFD4_1{
Field2: 300,
Field4: 0,
NextUin: &oidb.OidbSvcTrpcTcp0XFD4_1Uin{
Uin: token,
},
Field6: 1,
Field7: 2147483647,
Body: []*oidb.OidbSvcTrpcTcp0XFD4_1Body{{
Type: 1,
Number: &oidb.OidbNumber{Numbers: []uint32{103, 102, 20002, 27394}},
Expand All @@ -25,6 +23,11 @@ func BuildFetchFriendsReq(token uint32) (*Packet, error) {
Field10002: []uint32{13578, 13579, 13573, 13572, 13568},
Field10003: 4051,
}
if token != 0 {
body.NextUin = &oidb.OidbSvcTrpcTcp0XFD4_1Uin{
Uin: token,
}
}
/*
* OidbNumber里面的东西代表你想要拿到的Property,这些Property将会在返回的数据里面的Preserve的Field,
* 102:个性签名
Expand Down
1 change: 1 addition & 0 deletions client/packets/pb/service/oidb/OidbSvcTrpcTcp0xFD4_1.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions client/packets/pb/service/oidb/OidbSvcTrpcTcp0xFD4_1.proto
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ message OidbSvcTrpcTcp0xFD4_1 {
uint32 Field4 = 4; // 0
OidbSvcTrpcTcp0xFD4_1Uin NextUin = 5;
uint32 Field6 = 6; // 1
uint32 Field7 = 7; // 2,147,483,647
repeated OidbSvcTrpcTcp0xFD4_1Body Body = 10001;
repeated uint32 Field10002 = 10002; // [13578, 13579, 13573, 13572, 13568]
uint32 Field10003 = 10003;
Expand Down
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ var (
)

func main() {
appInfo := auth.AppList["linux"]["3.2.15-30366"]
appInfo := auth.AppList["linux"]["3.2.19-39038"]
deviceInfo := &auth.DeviceInfo{
GUID: "cfcd208495d565ef66e7dff9f98764da",
DeviceName: "Lagrange-DCFCD07E",
Expand All @@ -36,7 +36,7 @@ func main() {
qqclient := client.NewClient(0, "")
qqclient.SetLogger(protocolLogger{})
qqclient.UseVersion(appInfo)
qqclient.AddSignServer("https://sign.lagrangecore.org/api/sign/30366")
qqclient.AddSignServer("https://sign.lagrangecore.org/api/sign/39038")
qqclient.UseDevice(deviceInfo)
data, err := os.ReadFile("sig.bin")
if err != nil {
Expand Down
Loading