Skip to content

Commit

Permalink
Update Signature and AppInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
Linwenxuan04 committed Aug 18, 2023
1 parent cb535b5 commit 21bd0b5
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 12 deletions.
23 changes: 14 additions & 9 deletions Lagrange.Core/Common/BotAppInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ public class BotAppInfo
{
public string Os { get; private set; }

public string VendorOs { get; private set; }

public string Kernel { get; private set; }

public string BaseVersion { get; private set; }
Expand All @@ -27,7 +29,7 @@ public class BotAppInfo
/// <summary>Or Known as QUA</summary>
public string PackageSign { get; private set; }

public int UnknownIdentifier { get; private set; }
public int SsoIdentifier { get; private set; }

public int AppId { get; private set; }

Expand All @@ -46,6 +48,7 @@ public class BotAppInfo
{
Os = "Linux",
Kernel = "Linux",
VendorOs = "linux",

BaseVersion = "3.1.1-11223",
CurrentVersion = "3.1.2-13107",
Expand All @@ -57,7 +60,7 @@ public class BotAppInfo
WtLoginSdk = "nt.wtlogin.0.0.1",
PackageSign = "V1_LNX_NQ_3.1.2-13107_RDM_B",

UnknownIdentifier = 70644224,
SsoIdentifier = 70644224,
AppId = 1600001615,
SubAppId = 537146866,
AppIdQrCode = 13697054,
Expand All @@ -71,6 +74,7 @@ public class BotAppInfo
{
Os = "Mac",
Kernel = "Darwin",
VendorOs = "mac",

BaseVersion = "6.9.17-12118",
CurrentVersion = "6.9.17-12118",
Expand All @@ -82,7 +86,7 @@ public class BotAppInfo
WtLoginSdk = "nt.wtlogin.0.0.1",
PackageSign = "V1_MAC_NQ_6.9.17-12118_RDM_B",

UnknownIdentifier = 70644224,
SsoIdentifier = 71205120,
AppId = 1600001602,
SubAppId = 537138182,
AppIdQrCode = 537138182,
Expand All @@ -95,19 +99,20 @@ public class BotAppInfo
private static readonly BotAppInfo Windows = new()
{
Os = "Windows",
Kernel = "Windows",
Kernel = "Windows_NT",
VendorOs = "win32",

BaseVersion = "9.8.3-13183",
CurrentVersion = "9.8.3-13183",
BuildVersion = 13183,
BaseVersion = "9.9.1-15489",
CurrentVersion = "9.9.1-15489",
BuildVersion = 15489,
PtVersion = "2.0.0",
MiscBitmap = 32764,
PtOsVersion = 23,
PackageName = "com.tencent.qq",
WtLoginSdk = "nt.wtlogin.0.0.1",
PackageSign = "V1_WIN_NQ_9.8.3-13183_RDM_B",
PackageSign = "V1_WIN_NQ_9.9.1-15489_RDM_B",

UnknownIdentifier = 70644224,
SsoIdentifier = 68432128,
AppId = 1600001604,
SubAppId = 537138217,
AppIdQrCode = 537138217,
Expand Down
2 changes: 1 addition & 1 deletion Lagrange.Core/Core/Packets/SsoPacker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public static BinaryPacket Build(SsoPacket packet, BotAppInfo appInfo, BotDevice
writer.Barrier(typeof(uint), () => new BinaryPacket() // Barrier is used to calculate the length of the packet header only
.WriteUint(packet.Sequence, false) // sequence
.WriteByte(32)
.WriteUint((uint)appInfo.UnknownIdentifier, false) // appId
.WriteUint((uint)appInfo.SsoIdentifier, false) // appId
.WriteBytes("000804020000000000000000000000".UnHex().AsSpan())
.WriteBytes(keystore.Session.Tgt, Prefix.Uint32 | Prefix.WithPrefix)
.WriteString(packet.Command, Prefix.Uint32 | Prefix.WithPrefix)
Expand Down
4 changes: 3 additions & 1 deletion Lagrange.Core/Core/Packets/System/Software.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@ namespace Lagrange.Core.Core.Packets.System;
[ProtoContract]
internal class Software
{
[ProtoMember(2) ]public string Ver { get; set; }
[ProtoMember(2)] public string Ver { get; set; }

[ProtoMember(3)] public string? Token { get; set; }
}
2 changes: 1 addition & 1 deletion Lagrange.Core/Core/Service/System/StatusRegisterService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ protected override bool Build(StatusRegisterEvent input, BotKeystore keystore, B
Os = appInfo.Kernel,
OsVer = device.SystemKernel,
VendorName = "",
OsLower = appInfo.Kernel.ToLower(),
OsLower = appInfo.VendorOs,
},
SetMute = 0,
RegisterVendorType = 0,
Expand Down

0 comments on commit 21bd0b5

Please sign in to comment.