
70-42
Cisco ASA 5500 Series Configuration Guide using ASDM
Chapter 70 Configuring Dynamic Access Policies
Guide to Creating DAP Logical Expressions using LUA
Antivirus Example
The following example uses a custom function to check if CSD detects any antivirus software.
assert(function()
for k,v in pairs(endpoint.av) do
if (EVAL(v.exists, "EQ", "true", "string")) then
return true
end
end
return false
end)()
Antispyware Example
The following example uses a custom function to check if CSD detects any antispyware.
assert(function()
for k,v in pairs(endpoint.as) do
if (EVAL(v.exists, "EQ", "true", "string")) then
return true
end
end
return false
end)()
Firewall Example
The following example uses a custom function to check if CSD detects a firewall.
assert(function()
for k,v in pairs(endpoint.fw) do
if (EVAL(v.exists, "EQ", "true", "string")) then
return true
end
end
return false
end)()
Antivirus, Antispyware, or any Firewall Example
The following example uses a custom function to check if CSD detects any antivirus, antispyware, or
any firewall.
assert(function()
function check(antix)
if (type(antix) == "table") then
for k,v in pairs(antix) do
if (EVAL(v.exists, "EQ", "true", "string")) then
return true
end
end
end
return false
end
return (check(endpoint.av) or check(endpoint.fw) or check(endpoint.as))
end)()