get_package.py -h
usage: get_package.py [-h] [-u USERNAME] [-p PASSWORD]
[--session_id SESSION_ID] [--host HOST] [--port PORT]
[-l LOGLEVEL] [--debugformat] [--debug_method_locals]
[--record_all_requests] [--stats_loop_enabled]
[--http_auth_retry]
[--http_retry_count HTTP_RETRY_COUNT]
[--pytan_user_config PYTAN_USER_CONFIG]
[--force_server_version FORCE_SERVER_VERSION] [--all]
[--id ID] [--name NAME] [--file REPORT_FILE]
[--dir REPORT_DIR] [--export_format {csv,xml,json}]
[--sort HEADER_SORT | --no-sort | --auto_sort]
[--no-explode-json | --explode-json]
[--no-include_type | --include_type]
[--no-minimal | --minimal]
Get an object of type: package and save the object to a report file
optional arguments:
-h, --help show this help message and exit
Handler Authentication:
-u USERNAME, --username USERNAME
Name of user (default: None)
-p PASSWORD, --password PASSWORD
Password of user (default: None)
--session_id SESSION_ID
Session ID to authenticate with instead of
username/password (default: None)
--host HOST Hostname/ip of SOAP Server (default: None)
--port PORT Port to use when connecting to SOAP Server (default:
443)
Handler Options:
-l LOGLEVEL, --loglevel LOGLEVEL
Logging level to use, increase for more verbosity
(default: 0)
--debugformat Enable debug format for logging (default: False)
--debug_method_locals
Enable debug logging for each methods local variables
(default: False)
--record_all_requests
Record all requests in
handler.session.ALL_REQUESTS_RESPONSES (default:
False)
--stats_loop_enabled Enable the statistics loop (default: False)
--http_auth_retry Disable retry on HTTP authentication failures
(default: True)
--http_retry_count HTTP_RETRY_COUNT
Retry count for HTTP failures/invalid responses
(default: 5)
--pytan_user_config PYTAN_USER_CONFIG
PyTan User Config file to use for PyTan arguments
(defaults to: ~/.pytan_config.json) (default: )
--force_server_version FORCE_SERVER_VERSION
Force PyTan to consider the server version as this,
instead of relying on the server version derived from
the server info page. (default: )
Get Package Options:
--all Get all packages (default: False)
--id ID id of package to get (default: [])
--name NAME name of package to get (default: [])
Report File Options:
--file REPORT_FILE File to save report to (will be automatically
generated if not supplied) (default: None)
--dir REPORT_DIR Directory to save report to (current directory will be
used if not supplied) (default: None)
Export Options:
--export_format {csv,xml,json}
Export Format to create report file in, only used if
sse = False (default: csv)
--sort HEADER_SORT Only for export_format csv, Sort headers by given
names (default: [])
--no-sort Only for export_format csv, Do not sort the headers at
all
--auto_sort Only for export_format csv, Sort the headers with a
basic alphanumeric sort (default)
--no-explode-json Only for export_format csv or json, Do not explode any
embedded JSON into their own columns
--explode-json Only for export_format csv or json, Only for
export_format csv, Explode any embedded JSON into
their own columns (default)
--no-include_type Only for export_format json, Do not include SOAP type
in JSON output
--include_type Only for export_format json, Include SOAP type in JSON
output (default)
--no-minimal Only for export_format xml, Produce the full XML
representation, including empty attributes
--minimal Only for export_format xml, Only include attributes
that are not empty (default)
Validation Test: exitcode
Validation Test: noerror
bin/get_package.py -u Administrator -p 'Tanium2015!' --host 10.0.1.240 --port 443 --loglevel 1 --all --file "/tmp/out.json" --export_format json
PyTan v2.1.6 Handler for Session to 10.0.1.240:443, Authenticated: True, Platform Version: 6.5.314.4301
Found items: PackageSpecList, len: 59
Report file '/tmp/out.json' written with 179177 bytes
Validation Test: exitcode
Validation Test: file_exist
Validation Test: noerror
bin/get_package.py -u Administrator -p 'Tanium2015!' --host 10.0.1.240 --port 443 --loglevel 1 --all --file "/tmp/out.csv"
PyTan v2.1.6 Handler for Session to 10.0.1.240:443, Authenticated: True, Platform Version: 6.5.314.4301
Found items: PackageSpecList, len: 59
Report file '/tmp/out.csv' written with 87003 bytes
Validation Test: exitcode
Validation Test: file_exist
Validation Test: noerror
bin/get_package.py -u Administrator -p 'Tanium2015!' --host 10.0.1.240 --port 443 --loglevel 1 --all --file "/tmp/out.xml"
PyTan v2.1.6 Handler for Session to 10.0.1.240:443, Authenticated: True, Platform Version: 6.5.314.4301
Found items: PackageSpecList, len: 59
Report file '/tmp/out.xml' written with 87003 bytes
Validation Test: exitcode
Validation Test: file_exist
Validation Test: noerror
build_bin_doc v2.1.0
, date: Fri Oct 2 16:08:01 2015 EDT, Contact info: Jim Olsen jim.olsen@tanium.com