private void button6_Click(object sender, EventArgs e) { ipSec.reloadFilterList(); IPsec.Filter[] filters = IPsec.getFilters(ipSec.DDoSMitigationFilterList); listView2.Items.Clear(); foreach (IPsec.Filter filter in filters) { if (filter.address.ToString() != "1.1.1.1") { listView2.Items.Add(filter.address.ToString()); } } }
private void block(string ip) { /*ProcessStartInfo psi = new ProcessStartInfo("cports"); * psi.WorkingDirectory = Program.path; * psi.Arguments = "/close * * " + ip + " *"; * psi.CreateNoWindow = true; * psi.WindowStyle = ProcessWindowStyle.Hidden; * psi.Verb = "runas"; * Process.Start(psi).WaitForExit();*/ if (ip == "127.0.0.1") { return; } IPsec.addFilter(ipSec.DDoSMitigationFilterList, ip); }