From 72fa6bbd684810ef78881d0f912688833fe3b2cb Mon Sep 17 00:00:00 2001 From: Oran Nadler Date: Mon, 30 Apr 2018 18:42:30 +0300 Subject: [PATCH] no need to eval SidType --- monkey_island/cc/resources/pthmap.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/monkey_island/cc/resources/pthmap.py b/monkey_island/cc/resources/pthmap.py index 400919d50..fd882a6c6 100644 --- a/monkey_island/cc/resources/pthmap.py +++ b/monkey_island/cc/resources/pthmap.py @@ -173,7 +173,7 @@ class Machine(object): if eval(user["Name"]) != username: continue - if eval(user["SIDType"]) != SidTypeUser: + if user["SIDType"] != SidTypeUser: continue return eval(user["SID"]) @@ -204,7 +204,7 @@ class Machine(object): if eval(user["SID"]) != sid: continue - if eval(user["SIDType"]) != SidTypeUser: + if user["SIDType"] != SidTypeUser: continue return { "Domain": eval(user["Domain"]), @@ -296,7 +296,7 @@ class Machine(object): if eval(group["Name"]) != group_name: continue - if eval(group["SIDType"]) != SidTypeGroup: + if group["SIDType"] != SidTypeGroup: continue return eval(group["SID"]) @@ -313,13 +313,13 @@ class Machine(object): if eval(group_user["GroupComponent"]["SID"]) != sid: continue - if eval(group_user["GroupComponent"]["SIDType"]) != SidTypeGroup: + if group_user["GroupComponent"]["SIDType"] != SidTypeGroup: continue if "PartComponent" not in group_user.keys(): continue - if eval(group_user["PartComponent"]["SIDType"]) != SidTypeUser: + if group_user["PartComponent"]["SIDType"] != SidTypeUser: continue users[eval(group_user["PartComponent"]["SID"])] = eval(group_user["PartComponent"]["Name"]) @@ -360,7 +360,7 @@ class Machine(object): SIDs = set() for user in doc["data"]["Win32_UserAccount"]: - if eval(user["SIDType"]) != SidTypeUser: + if user["SIDType"] != SidTypeUser: continue SIDs.add(eval(user["SID"]))