// Demonstrates the core windows firewall commands using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using System.Diagnostics; namespace Windows_Firewall { class Program { static void Main(string[] args) { // Load windows firewall module mn.StartFirewall(); // Output full information about firewall profile currently in use uint cp = mn.GetCurrentProfile(); Console.WriteLine("FIREWALL INFORMATION"); Console.WriteLine("Firewall enabled: " + mn.GetFirewallEnabled(cp)); Console.WriteLine("Exceptions allowed: " + mn.GetExceptionsAllowed(cp)); Console.WriteLine("Notifications enabled: " + mn.GetNotificationsEnabled(cp)); Console.WriteLine("Unicast responses to multicast broadcast enabled: " + mn.GetUnicastToMulticastEnabled(cp)); Console.WriteLine("Remote admin IP version: " + mn.GetRemoteAdminIPVersion(cp)); Console.WriteLine("Remote admin scope: " + mn.GetRemoteAdminScope(cp)); Console.WriteLine("Remote admin addresses: " + mn.GetRemoteAdminAddresses(cp)); Console.WriteLine("Remote admin enabled: " + mn.GetRemoteAdminEnabled(cp)); Console.WriteLine("ICMP allow outbound destination unreachable: " + mn.GetICMPAllowOutboundDestinationUnreachable(cp)); Console.WriteLine("ICMP allow redirect: " + mn.GetICMPAllowRedirect(cp)); Console.WriteLine("ICMP allow inbound echo request: " + mn.GetICMPAllowInboundEchoRequest(cp)); Console.WriteLine("ICMP allow outbound time exceeded: " + mn.GetICMPAllowOutboundTimeExceeded(cp)); Console.WriteLine("ICMP allow outbound parameter problem: " + mn.GetICMPAllowOutboundParameterProblem(cp)); Console.WriteLine("ICMP allow outbound source quench: " + mn.GetICMPAllowOutboundSourceQuench(cp)); Console.WriteLine("ICMP allow inbound router request: " + mn.GetICMPAllowInboundRouterRequest(cp)); Console.WriteLine("ICMP allow inbound timestamp request: " + mn.GetICMPAllowInboundTimestampRequest(cp)); Console.WriteLine("ICMP allow inbound mask request: " + mn.GetICMPAllowInboundMaskRequest(cp)); Console.WriteLine("ICMP allow outbound packet too big: " + mn.GetICMPAllowOutboundPacketTooBig(cp)); Console.WriteLine("Press any key to continue..."); Console.ReadKey(); Console.WriteLine(); Console.WriteLine("SERVICES INFORMATION"); Console.WriteLine(mn.GetServiceAmount(cp) + " services found"); Console.WriteLine(); for(uint n = 0;n