Skip to main content

cloudonecli

This package provides a command line tool for use with Trend Micro Cloud One suite of products, including

  • Deep Security (on premises and DSaaS)
  • Smart Check
  • Cloud Conformity (coming)
  • Network Security (coming)

This package currently supports Python versions:

  • 3.6.x and greater
  • 3.7.x and greater
  • 3.8.x and greater

Note: All replys from the server are in JSON. Therefore jq is a good companion program to pipe the output to. For most distros, you can install jq with yum install jq or apt-get install jq

Installation

The easiest way to install thus is to use pip in a pip in a virtualenv:

$ pip3 install thus --user

or, if you are not installing in a virtualenv, to install globally:

$ sudo pip3 install thus

or for your user:

$ pip3 install --user thus

If you have the thus installed and want to upgrade to the latest version you can run::

$ pip3 install --upgrade thus

Command Completion -- HIGHLY recommended

Not sure what shell you have? Run echo $SHELL if the result is /bin/bash you have bash. If it comes back /bin/zsh you have zsh. ###bash To enable tab completion for bash, execute

source thus_completer_bash.sh

If you used --user when installing thus, the standard location for thus_completer_bash.sh is in ~/.local/bin/thus_completer_bash.sh If you did not use --user when installing thus, the standard location for thus_completer_bash.sh is in /usr/bin/thus_comleter_bash.sh To enable this everytime, add the source command to the full path to thus_completer_bash.sh to your ~/.bashrc file.

zsh

Locate your thus_completer_zsh.sh file. If you used --user then installing thus, the standard location for thus_completer_zsh.sh is in ~/.local/bin/thus_completer_zsh.sh If you did not use --user when installing thus, the standard location for thus_completer_zsh.sh is in /usr/bin/thus_comleter_zsh.sh

Edit the ~/.zshrc file. Add the following lines to the top of the file. It must be before any call to autoload $fpath=$fpath:~/.local/bin/thus_completer_zsh.sh

Restart your terminal for changes to take effect.

Getting Started

Before using thus, you need to provide credentials and hostnames of your services. You do this by creating a config file. The file should be placed in ~/.thus/credentials

[default]
DSMapikey = F16564D5-492A-F167-5472-2CEDA60E12D7:GDwCvBV2kV7FjSVuYJXdEqeeeu0WKlls3/sqwu+HEXM=
SCUser: administrator
SCPassword: MySuperPassword   

This creates a default profile that has both Deep Security and Smart Check credentials. You can add additional profiles for more servers.

Next, we need a config file to tell the thus, when using profile default what settings we want to use. The file should nbe placed in ~/.thus/config

[default]
DSMhost = https://emydsm.example.com:443/api
DSMverifyssl = False
SCHost = https://mySmartCheck.example.com:443/api
SCverifyssl = False

Note The /api at the end of the URL is required.

Now when default profile is used for Smart Check, it will connect to https://mySmartCheck.example.com:443/api using the usernameadministrator and password MySuperPassword

Examples

Get a list of computers from Deep Security:

thus deepsecurity computers list

Get a list of computers from Deep Security with only two expand values:

thus deepsecurity computers list expand=interfaces,webreputation

Get a list of polices from Deep Security:

thus deepsecurity policies list

Get a list of scans from Smart Check

thus smartcheck scans list

Getting Help

Use github issues for logging bugs and feature requests.

Release files for cloudonecli 0.0.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cloudonecli 0.0.11
File Size Uploaded
cloudonecli-0.0.11.tar.gz 11.6 kB Details

Release files / cloudonecli-0.0.11.tar.gz

Download URL cloudonecli-0.0.11.tar.gz
Size 11.6 kB
Tags Source
SHA-256 checksum
How to use checksums
1343dfcf156075829af39c1a5397204773faf3d3f8b63065c0420f1b412c6dc0
BLAKE2b-256 checksum
How to use checksums
73beda55ba5acbf20f6b87c41582b43d6e1e778fdd73c099160f2311c43e9f4d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.0

Release history Release notifications | RSS feed

This release

0.0.11 This release

1 release file

0.0.10

1 release file

0.0.9

1 release file

0.0.8

1 release file

0.0.7

1 release file

0.0.6

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page