etherapedump — A utility to dump network resources from an Etherape XML export.
etherapedump
[
-m
ENTRY
| --mode
ENTRY
] [
-f
FILENAME
| --export-file-xml
FILENAME
] [
-j
FILENAME
| --export-file-json
FILENAME
] [
-c
[true]|false
| --json-compact
[true]|false
] [
-s
[true]|false
| --show-jq-filter
[true]|false
] [
-h
[true]|false
| --help
[true]|false
] [
-H
[true]|false
| --help-long
[true]|false
] [
-v
[true]|false
| --verbose
[true]|false
] [ --version
[true]|false
]
The etherapedump script is used to dump network resources from an Etherape XML export. Information like IPv4 / IPv6 Addresses, Host Names and MAC Addresses can be dumped as text on the command line. The following two (2) utilities: xml2json and jq are used for network resource extraction. XML validation using the xmllint command is done prior to resource extraction.
The Etherape XML export can be from
standard input or from the "--export-file
"
option.
The entire Etherape XML export can be
converted to JSON format using the
"--mode
json" mode.
The following command line options are available:
-m ENTRY
] | [--mode ENTRY
]
This option controls what the
etherapedump script will do. The following
modes are available: ("ipv4
",
"ipv6
", "host
",
"mac
" and "json
"). Modes:
"ipv4
", "ipv6
",
"host
" and "mac
" will dump
the cooresponding network resource from an Etherape
XML export as text output. Mode:
"json
" will display the Etherape
XML export JSON
formatted.
-f FILENAME
] | [--export-file-xml FILENAME
]
Use this option to specify an Etherape XML export file name for extracting the associated network resources from. A path file name must be specified. If this option is not specified then standard input will be used.
-j FILENAME
] | [--export-file-json FILENAME
]
Use this option to specify an Etherape JSON export file name for extracting the associated network resources from. A path file name must be specified. This option is only used if an existing Etherape export has been converted to JSON format using the xml2json.
-c [true]|false
] | [--json-compact [true]|false
]
JSON output is generated using
the following two (2) utilities: xml2json and
jq. Choose this option to output
JSON "compact
" formatted
using jq. By default, the
jq "print-pretty
"
formatted output will be displayed.
-s [true]|false
] | [--show-jq-filter [true]|false
]
Show the actual jq filter for
the network resource to be extracted for modes:
"ipv4
", "ipv6
",
"host
" and "mac
". No
extracted resource data will be displayed.
-h [true]|false
] | [--help [true]|false
]
When this option is specified, etherapedump will display a short one line description of etherapedump, followed by a short description of each of the supported command line options. After displaying this information etherapedump will terminate.
-H [true]|false
] | [--help-long [true]|false
]
This option will attempt to pull up additional
etherapedump documentation within a text based
web browser. You can force which browser we use setting the
environment variable TEXTBROWSER
, otherwise,
we will search for some common ones.
-v [true]|false
] | [--verbose [true]|false
]
When you set this option to true, etherapedump will produce additional output. This is typically used for diagnostic purposes to help track down when things go wrong.
--version [true]|false
]
If this option is specified, the version number of the script is displayed.