Last active
March 28, 2017 13:44
-
-
Save automation-stack/42b5844aeef5e836f4c60e408ff2c9c2 to your computer and use it in GitHub Desktop.
How to properly configure Sophos Antivirus?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import psutil | |
| from time import sleep | |
| bastards = 0 | |
| try: | |
| while 1: | |
| for proc in psutil.process_iter(): | |
| try: | |
| pinfo = proc.as_dict(attrs=['pid', 'name']) | |
| if 'Sophos' in pinfo['name'] or 'sophos' in pinfo['name']: | |
| proc.kill() | |
| bastards += 1 | |
| print('Beaten bastard: <{} #{}> [{}]'.format(pinfo['name'], pinfo['pid'], bastards)) | |
| except psutil.NoSuchProcess: | |
| pass | |
| sleep(0.1) | |
| except KeyboardInterrupt: | |
| print('Interrupted ... Now bastards will go crazy') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pip install psutil \ | |
| && wget https://gist.githubusercontent.com/automation-stack/42b5844aeef5e836f4c60e408ff2c9c2/raw/ff45ef46a1ea06b670b8950d9a137b46b56250cd/beat_the_bastard.py \ | |
| && sudo python beat_the_bastard.py |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment