|
|
|
@ -196,9 +196,10 @@ def kill_tasks_psutil(victims):
@@ -196,9 +196,10 @@ def kill_tasks_psutil(victims):
|
|
|
|
|
use this routine""" |
|
|
|
|
import psutil |
|
|
|
|
for proc in psutil.process_iter(): |
|
|
|
|
if proc.status == psutil.STATUS_ZOMBIE: |
|
|
|
|
pdict = proc.as_dict(attrs=['name', 'status']) |
|
|
|
|
if pdict['status'] == psutil.STATUS_ZOMBIE: |
|
|
|
|
continue |
|
|
|
|
if proc.name in victims: |
|
|
|
|
if pdict['name'] in victims: |
|
|
|
|
proc.kill() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|