Fixed bh_owned error on non-existing values
If a computer on the network has been compromised but is not listed in the Neo4j database. CME won't crash any more.main
parent
4bab776011
commit
b14fe7f94f
|
@ -75,7 +75,10 @@ class CMEModule:
|
|||
result = tx.run(
|
||||
"MATCH (c:Computer {{name:\"{}\"}}) SET c.owned=True RETURN c.name AS name".format(host_fqdn))
|
||||
record = result.single()
|
||||
try:
|
||||
value = record.value()
|
||||
except AttributeError:
|
||||
value = []
|
||||
if len(value) > 0:
|
||||
context.log.success("Node {} successfully set as owned in BloodHound".format(host_fqdn))
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue