Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ((Keyboard.GetKeyStates(Key.CapsLock) & KeyStates.Down) > 0)
- {
- process.StartInfo.Arguments = ("advfirewall firewall add rule name =\"" + firewhash + "\" dir=in action=block program=\"" + location + "\" enable=yes");
- process.StartInfo.Arguments = ("advfirewall firewall add rule name =\"" + firewhash + "\" dir=out action=block program=\"" + location + "\" enable=yes");
- process.Start();
- process.Start();
- Console.WriteLine("ON");
- Console.Beep(750, 700);
- }
- if ((Keyboard.GetKeyStates(Key.F1) & KeyStates.Down) > 0)
- {
- process.StartInfo.Arguments = ("advfirewall firewall delete rule name=\"" + firewhash + "\" ");
- process.Start();
- Console.WriteLine("OFF");
- Console.Beep(750, 700);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement