forked from p15670423/monkey
no need to eval SidType
This commit is contained in:
parent
1d25ba9085
commit
72fa6bbd68
|
@ -173,7 +173,7 @@ class Machine(object):
|
||||||
if eval(user["Name"]) != username:
|
if eval(user["Name"]) != username:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if eval(user["SIDType"]) != SidTypeUser:
|
if user["SIDType"] != SidTypeUser:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
return eval(user["SID"])
|
return eval(user["SID"])
|
||||||
|
@ -204,7 +204,7 @@ class Machine(object):
|
||||||
if eval(user["SID"]) != sid:
|
if eval(user["SID"]) != sid:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if eval(user["SIDType"]) != SidTypeUser:
|
if user["SIDType"] != SidTypeUser:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
return { "Domain": eval(user["Domain"]),
|
return { "Domain": eval(user["Domain"]),
|
||||||
|
@ -296,7 +296,7 @@ class Machine(object):
|
||||||
if eval(group["Name"]) != group_name:
|
if eval(group["Name"]) != group_name:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if eval(group["SIDType"]) != SidTypeGroup:
|
if group["SIDType"] != SidTypeGroup:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
return eval(group["SID"])
|
return eval(group["SID"])
|
||||||
|
@ -313,13 +313,13 @@ class Machine(object):
|
||||||
if eval(group_user["GroupComponent"]["SID"]) != sid:
|
if eval(group_user["GroupComponent"]["SID"]) != sid:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if eval(group_user["GroupComponent"]["SIDType"]) != SidTypeGroup:
|
if group_user["GroupComponent"]["SIDType"] != SidTypeGroup:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if "PartComponent" not in group_user.keys():
|
if "PartComponent" not in group_user.keys():
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if eval(group_user["PartComponent"]["SIDType"]) != SidTypeUser:
|
if group_user["PartComponent"]["SIDType"] != SidTypeUser:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
users[eval(group_user["PartComponent"]["SID"])] = eval(group_user["PartComponent"]["Name"])
|
users[eval(group_user["PartComponent"]["SID"])] = eval(group_user["PartComponent"]["Name"])
|
||||||
|
@ -360,7 +360,7 @@ class Machine(object):
|
||||||
SIDs = set()
|
SIDs = set()
|
||||||
|
|
||||||
for user in doc["data"]["Win32_UserAccount"]:
|
for user in doc["data"]["Win32_UserAccount"]:
|
||||||
if eval(user["SIDType"]) != SidTypeUser:
|
if user["SIDType"] != SidTypeUser:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
SIDs.add(eval(user["SID"]))
|
SIDs.add(eval(user["SID"]))
|
||||||
|
|
Loading…
Reference in New Issue