if
(
windows of operating system
)
then
(
percent decode
(
value "SensorBackendServer" of key "HKLM\Software\CarbonBlack\config" of native registry as string | "n/a"
)
)
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
(
percent decode
(
key "SensorBackendServer" of file "/var/lib/cb/sensorsettings.ini" | "n/a"
)
)
else "n/a"
if (windows of operating system) then (percent decode (value "SensorBackendServer" of key "HKLM\Software\CarbonBlack\config" of native registry as string | "n/a")) 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 (percent decode (key "SensorBackendServer" of file "/var/lib/cb/sensorsettings.ini" | "n/a")) else "n/a"