HP 800 User Manual page 371

Network access controller
Hide thumbs Also See for 800:
Table of Contents

Advertisement

#!/usr/bin/python
from BaseClasses.SABase import SABase as SABase
#
# This allows a script to be tested from the command line.
#
if __name__ == '__main__':
import checkOpenPorts
t = checkOpenPorts.CheckOpenPorts()
t.processCommandLine()
#
# The class definition. All classes must be derived from the SABase class.
#
class CheckOpenPorts(SABase):
#
# Make up a test id. Just make sure it doesn't match any existing test ids
#
testId = "CheckOpenPorts"
#
# Make up test name. Just make sure it doesn't match any existing test
names.
#
testName = "Open ports"
#
# Assign the test to an existing group or create a new group.
# Groups are configured and created in the policies.xml file <group>
# section (See the Adding new groups section).
#
testGroupId = "MyCustomTests"
#
# This is the HTML that will be displayed in the test properties page
# in the policy editor. All this HTML isn't REALLY necessary, but we
# to keep the NAC 800 Web UI pretty.
#
Figure 13-6. checkOpenPorts.py script
2.
figure 13-6 shows the code for the new checkOpenPorts.py test. The
file is included on the NAC 800 CD as /sampleTests/
checkOpenPorts.py. Review the code. The comments explain each
section of the code.
System Administration
Adding Custom Tests
13-23

Advertisement

Table of Contents
loading

This manual is also suitable for:

Procurve nac 800

Table of Contents