From d59e464578b50c36f53412f095f44998d8c773fb Mon Sep 17 00:00:00 2001 From: Oran Nadler Date: Mon, 30 Apr 2018 16:44:43 +0300 Subject: [PATCH] only take running services --- monkey_island/cc/resources/pthmap.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/monkey_island/cc/resources/pthmap.py b/monkey_island/cc/resources/pthmap.py index 44c621977..daa52e8dd 100644 --- a/monkey_island/cc/resources/pthmap.py +++ b/monkey_island/cc/resources/pthmap.py @@ -214,9 +214,10 @@ class Machine(object): name = name.lower() - for ser in services: - if ser in name: - return True + return name in services + #for ser in services: + # if ser in name: + # return True return False @@ -239,6 +240,9 @@ class Machine(object): if not IsNameOfCriticalService(service_name): continue + + if eval(service["State"]) != "Running": + continue found.append(service_name)