Skip to content

Instantly share code, notes, and snippets.

@automation-stack
Last active March 28, 2017 13:44
Show Gist options
  • Select an option

  • Save automation-stack/42b5844aeef5e836f4c60e408ff2c9c2 to your computer and use it in GitHub Desktop.

Select an option

Save automation-stack/42b5844aeef5e836f4c60e408ff2c9c2 to your computer and use it in GitHub Desktop.
How to properly configure Sophos Antivirus?
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')
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