Пример #1
0
        public ActionResult Hack(HackCommands hack)
        {
            try
            {
                var user = GetUserByGUID(hack.UserId);

                if (!String.IsNullOrEmpty(user))
                {
                    var userData = user.Split(", ");
                    var json     = JsonConvert.SerializeObject(hack);

                    String resp = String.Empty;
                    if (userData != null)
                    {
                        resp = SendCommandsTCP(json, userData[2], Int32.Parse(userData[3]));
                        var model = new HackCommands(hack.UserId);
                        if (!String.IsNullOrEmpty(resp))
                        {
                            return(RedirectToAction("Hack", new { id = hack.UserId, response = resp }));
                        }
                    }
                }
            }
            catch (Exception ex)
            {
            }

            return(RedirectToAction("Hack", new { id = hack.UserId }));
        }
Пример #2
0
        public ActionResult Hack(Guid id, string response)
        {
            var model = new HackCommands(id, response);

            return(View(model));
        }