xmlcheck
WatchGuard policy XML check utility.
xmlcheck is used to find duplicate aliases and services
xmlcheck is part of WatchGuard Toolbox Project
Installation
Prerequisites
this php projects needs composer for building the class autoloader and and ensuring the SimpleXML extension is installed.
~/xmlcheck$ composer install
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Writing lock file
Generating autoload files
~/xmlcheck$
Usage
$ ./xmlcheck.php <options> <args>
Command summary
-h, --help |
displays short cli help |
-l, --listaliases |
| lists all aliases |
-p, --listpolicies |
| lists all policies |
-s, --listservices |
| lists all services |
-t, --listtags |
lists all tags |
-a, --alias |
print alias aliasname |
--simplexmlout |
print SimpleXML structure
as read from xmlfile |
Listing aliases
$ ./xmlcheck.php -i <inputxml> -l
$ ./xmlcheck.php -i <inputxml> --listaliases
Description
List all aliases from the xml file.
Options
-v, --verbose |
verbose output |
-u, --unused |
show only unused objects |
Arguments
-i, --infile filename |
| inputfile filename (mandatory) |
Display single alias
$ ./xmlcheck.php -i <inputxml> -a <aliasname>
Description
Displays one single alias.
Options
-v, --verbose |
verbose output |
Arguments
-i, --infile filename |
| inputfile filename (mandatory) |
Listing services
$ ./xmlcheck.php -i <inputxml> -s
$ ./xmlcheck.php -i <inputxml> --listservices
Description
List all services from the xml file.
Options
-v, --verbose |
verbose output |
-u, --unused |
show only unused objects |
Arguments
-i, --infile filename |
| inputfile filename (mandatory) |
Listing policies
$ ./xmlcheck.php -i <inputxml> -p
$ ./xmlcheck.php -i <inputxml> --listpolicies
Description
List all policies from the xml file.
Options
-v, --verbose |
verbose output |
-E, --enabled |
only show enabled policies (= skip disabled policies) |
-D, --disabled |
only show disabled policies (= skip enabled policies) |
Arguments
-i, --infile filename |
| inputfile filename (mandatory) |
API documentation & download
Changelog
- 2020-07-27 - v0.4 - added -E and -D for enabled/disabled policies
- 2019-09-11 - v0.3 - fixed “–listtags –unused” - now correct if more than one tag per policy
- 2019-09-06 v0.2 - added –listtags
- 2019-08-24 v0.1 - initial release