From 8c83c339bce8de0c4e008ea5c8556f623488aef7 Mon Sep 17 00:00:00 2001 From: marton12050 <marton12050@sch.bme.hu> Date: Sat, 25 Apr 2020 09:17:09 +0200 Subject: [PATCH] Update autoProgKiller.py --- autoProgKiller.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 autoProgKiller.py diff --git a/autoProgKiller.py b/autoProgKiller.py new file mode 100644 index 0000000..2787c9a --- /dev/null +++ b/autoProgKiller.py @@ -0,0 +1,12 @@ +import psutil +import os +import getpass + + +user_name = getpass.getuser() +for proc in psutil.process_iter(['username']): + try: + if(proc.username().split("\\")[1] == user_name): + proc.kill() + except: + pass -- GitLab