74 lines
2.4 KiB
C#
74 lines
2.4 KiB
C#
// Decompiled with JetBrains decompiler
|
|
// Type: Server.Handlers.HandleInfo
|
|
// Assembly: Raton, Version=0.4.0.0, Culture=neutral, PublicKeyToken=null
|
|
// MVID: 36C4E416-7F8D-4D23-930F-B5CCB0D810E7
|
|
// Assembly location: C:\Users\user\Desktop\v3.8.0 Deluxe Plugins (v4.0.0) cracked\Raton.exe
|
|
|
|
using Raton.Forms.ClientForms.Monitor;
|
|
using Server.Connection;
|
|
using Stuff;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Drawing;
|
|
using System.Text;
|
|
using System.Windows.Forms;
|
|
|
|
#nullable disable
|
|
namespace Server.Handlers;
|
|
|
|
internal class HandleInfo
|
|
{
|
|
public HandleInfo(SillyClient SillyClient, Unpack unpack)
|
|
{
|
|
ratonInformation infoForm = (ratonInformation) Application.OpenForms["Client information | Client ID: " + unpack.GetAsString("UID")];
|
|
if (infoForm == null)
|
|
return;
|
|
if (infoForm.SillyClient == null)
|
|
{
|
|
infoForm.SillyClient = SillyClient;
|
|
infoForm.timer1.Start();
|
|
}
|
|
infoForm.Invoke((Delegate) (() =>
|
|
{
|
|
infoForm.aeroListView1.Items.Clear();
|
|
Dictionary<string, byte[]> all = unpack.GetAll();
|
|
infoForm.aeroListView1.BeginUpdate();
|
|
int num = 0;
|
|
foreach (KeyValuePair<string, byte[]> keyValuePair in all)
|
|
{
|
|
if (!(keyValuePair.Key == "UID") && !(keyValuePair.Key == "Packet"))
|
|
{
|
|
byte[] bytes = keyValuePair.Value;
|
|
string str;
|
|
if (bytes == null || bytes.Length == 0)
|
|
str = "Unknow";
|
|
else if (bytes.Length == 4)
|
|
str = BitConverter.ToInt32(bytes, 0).ToString();
|
|
else if (bytes.Length == 8)
|
|
{
|
|
str = BitConverter.ToInt64(bytes, 0).ToString();
|
|
}
|
|
else
|
|
{
|
|
str = Encoding.UTF8.GetString(bytes);
|
|
if (string.IsNullOrWhiteSpace(str))
|
|
str = "Unknow";
|
|
}
|
|
infoForm.aeroListView1.Items.Add(new ListViewItem(keyValuePair.Key)
|
|
{
|
|
SubItems = {
|
|
str
|
|
},
|
|
ImageIndex = 0
|
|
});
|
|
++num;
|
|
}
|
|
}
|
|
infoForm.aeroListView1.EndUpdate();
|
|
Program.form2.Dispatcher.Invoke((Action) (() => Program.form2.AddSuccessLog((object) "Got the client information", (object) Color.LightGreen)));
|
|
infoForm.aeroListView1.Visible = true;
|
|
infoForm.label1.Visible = false;
|
|
}));
|
|
}
|
|
}
|