if
(
windows of operating system
)
then
(
exists keys whose
(
value "DisplayName" of it = "Carbon Black Sensor"
)
of key "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall" of registry
)
else if
(
(
exists match
(
regex "Linux CentOS (6|7)"
)
of name of operating system
)
OR
(
(
name of operating system starts with "Linux Red Hat"
)
AND
(
exists file "/etc/redhat-release" whose
(
exists line whose
(
exists match
(
regex "Red Hat Enterprise Linux (Client|Server|Workstation) release 6|7"
)
of it
)
of it
)
AND NOT exists file "/etc/vmware-release" whose
(
exists line whose
(
it contains "VMware ESX"
)
of it
)
AND NOT exists file "/etc/enterprise-release" whose
(
exists line whose
(
it contains "Enterprise Linux Enterprise Linux"
)
of it
)
)
)
)
then
(
exists package "cbsensor" of rpm
)
else false
if (windows of operating system) then (exists keys whose (value "DisplayName" of it = "Carbon Black Sensor") of key "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall" of registry) else if ((exists match (regex "Linux CentOS (6|7)") of name of operating system) OR ((name of operating system starts with "Linux Red Hat") AND (exists file "/etc/redhat-release" whose (exists line whose (exists match (regex "Red Hat Enterprise Linux (Client|Server|Workstation) release 6|7") of it) of it) AND NOT exists file "/etc/vmware-release" whose (exists line whose (it contains "VMware ESX") of it) AND NOT exists file "/etc/enterprise-release" whose (exists line whose (it contains "Enterprise Linux Enterprise Linux") of it)))) then (exists package "cbsensor" of rpm) else false