Cisco Cisco Firepower Management Center 2000 Entwickleranleitung

Seite von 102
 
2-42
FireSIGHT System Host Input API Guide
 
Chapter 2      Using the Host Input API 
  Example Host Input API Scripts
The Asset Management App map set contains a product map mapping the third-party product name 
Microsoft Win2K
 to the Cisco product definition for Microsoft Windows 2000 SP3:
The script sets the product map to 
“Asset Management App”
:
# Set the current product map set to “Asset Management App”
if ($retval = SF::SFDataCorrelator::HostInput::SetCurrent3rdPartyMap ("Asset 
Management App”))
{
warn "SetCurrent3rdPartyMap Failed with error $retval";
exit;
}
The script then uses the 
vendor_str
 and 
product_str
 keys to set the operating system display name to 
Microsoft Windows 2000
, mapping that third-party operating system name to the Cisco product 
definition as defined in the 
Asset Management App
 product map set because the product map set is 
already in effect:
# Set the operating system on the newly created host 
if ($retval = SF::SFDataCorrelator::HostInput::SetOS(
$source_type_id, $source_id, "1.2.3.4", [],
{
vendor_str => 'Microsoft',
product_str => 'Windows 2000',
}))
{
warn "SetOS Failed with error $retval";
exit;
}