Python script that parses a Cisco IOS configuration file and generates a report to efficiently perform an IT Security Audit
- Python versions 2.6, 2.7 or 3.2+
- ciscoconfparse module
- python setuptools
./cisco-ios-audit.py ConfigFile
- Run the script
./cisco-ios-audit.py ConfigFile
Notes:
- Ensure that the configuration files don't have 2 consecutive blank lines as it introduces inaccurate results.
- This sed command could be used to remove blank lines in the config file.
sed -i '/^\s*$/d' ConfigFile
- This sed command could be used to remove blank lines in the config file.
- Rename configuration files with bad format.
- Sample -
2015.05.25 07.23 switch.txt
. This should be renamed toswitch.txt
.
- Sample -
- Use "for loop" for multiple configuration files