Advertisement
Guest User

Untitled

a guest
Aug 24th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.07 KB | None | 0 0
  1.                     if ((Keyboard.GetKeyStates(Key.CapsLock) & KeyStates.Down) > 0)
  2.                     {
  3.                             process.StartInfo.Arguments = ("advfirewall firewall add rule name =\"" + firewhash + "\" dir=in action=block program=\"" + location + "\" enable=yes");
  4.                             process.StartInfo.Arguments = ("advfirewall firewall add rule name =\"" + firewhash + "\" dir=out action=block program=\"" + location + "\" enable=yes");
  5.                             process.Start();
  6.                             process.Start();
  7.                             Console.WriteLine("ON");
  8.                             Console.Beep(750, 700);
  9.                     }
  10.                     if ((Keyboard.GetKeyStates(Key.F1) & KeyStates.Down) > 0)
  11.                     {
  12.                             process.StartInfo.Arguments = ("advfirewall firewall delete rule name=\"" + firewhash + "\" ");
  13.                             process.Start();
  14.                             Console.WriteLine("OFF");
  15.                             Console.Beep(750, 700);
  16.                     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement