Hoşgeldin Misafir

C# İle Güvenlik Duvarı Açık Kapalı Kontrolü

MiRaT

13 Kas 2017
2,077 Mesaj

Aktiflik

Seviye

Deneyim

TIM / GÖREV:
Kod:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
 
namespace guvenlik_duvari_kontrol
{
 public partial class Form1 : Form
 {
 public Form1()
 {
 InitializeComponent();
 }
 
private **** btnKontrol_Click(object sender, EventArgs e)
 {
 Type t = Type.GetTypeFromProgID("HNetCfg.FwMgr");
 dynamic dy = Activator.CreateInstance(t);
 MessageBox.Show("Güvenli Duvarı Durumu --> " +
 Convert.ToString(dy.LocalPolicy.CurrentProfile.FirewallEnabled));
 }
 }
}