Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class SurroundingClass
- {
- private Process[] p;
- private void CheckIfRunning()
- {
- p = Process.GetProcessesByName("Fiddler.exe");
- if (p.Count() > 0)
- Application.Exit();
- else
- {
- }
- }
- private void FiddlerCheck()
- {
- string pName = "Fiddler";
- Process[] psList;
- try
- {
- psList = Process.GetProcesses();
- foreach (Process p in psList)
- {
- if ((pName == p.ProcessName))
- {
- Application.Exit();
- }
- }
- }
- catch (Exception ex)
- {
- }
- }
- private void FiddlerCheck2()
- {
- try
- {
- Process[] x;
- x = Process.GetProcesses();
- foreach (Process p in x)
- {
- if (p.MainWindowTitle.Contains("Fiddler"))
- p.Kill();
- }
- }
- catch
- {
- }
- }
- private void WiresharkCheck()
- {
- string pName = "Wireshark";
- Process[] psList;
- try
- {
- psList = Process.GetProcesses();
- foreach (Process p in psList)
- {
- if ((pName == p.ProcessName))
- {
- Application.Exit();
- }
- }
- }
- catch (Exception ex)
- {
- }
- }
- private void WiresharkCheck2()
- {
- try
- {
- Process[] x;
- x = Process.GetProcesses();
- foreach (Process p in x)
- {
- if (p.MainWindowTitle.Contains("Wireshark"))
- p.Kill();
- }
- }
- catch
- {
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement