Skip to content

Commit

Permalink
[Core] Implemented trpc.qq_new_tech.status_svc.StatusService.Register
Browse files Browse the repository at this point in the history
  • Loading branch information
Linwenxuan04 committed Mar 26, 2024
1 parent 78f9d9e commit 3117859
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
8 changes: 8 additions & 0 deletions KonataNT/Core/BaseClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,12 @@ public async Task<bool> QrCodeLogin()
KeyStore.Tgt = collection.TlvMap[0x10a];
KeyStore.D2 = collection.TlvMap[0x143];
KeyStore.D2Key = collection.TlvMap[0x305];

var raw = collection.TlvMap[0x543];
var layer = Tlv543.Deserialize(raw);
var layer1 = ((Tlv543)layer).Layer1;
var layer2 = layer1.Layer2;
KeyStore.Uid = layer2.Uid;

var uidRaw = collection.TlvMap[0x543];
var t11A = collection.TlvMap[0x11a];
Expand Down Expand Up @@ -238,6 +244,8 @@ private async Task BotOnline(bool isReconnect = false)

const string command = "trpc.qq_new_tech.status_svc.StatusService.Register";
var resp = await PacketHandler.SendPacket(command, statusRegister.Serialize());

Console.WriteLine(resp.Hex());

var arg = new BotOnlineEvent(isReconnect ? BotOnlineEvent.OnlineReason.Reconnect : BotOnlineEvent.OnlineReason.Login);
EventEmitter.PostEvent(arg);
Expand Down
23 changes: 23 additions & 0 deletions KonataNT/Core/Packet/Login/Tlv543.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using KonataNT.Proto;

#pragma warning disable CS8618

namespace KonataNT.Core.Packet.Login;

[ProtoContract]
internal partial class Tlv543
{
[ProtoMember(9)] public Tlv543Layer1 Layer1 { get; set; }
}

[ProtoContract]
internal partial class Tlv543Layer1
{
[ProtoMember(11)] public Tlv543Layer2 Layer2 { get; set; }
}

[ProtoContract]
internal partial class Tlv543Layer2
{
[ProtoMember(1)] public string Uid { get; set; }
}

0 comments on commit 3117859

Please sign in to comment.