Objective
Often, you will need, or want, to download Contrast software to a server that does not have a browser or GUI installed. In this case, it will be more convenient to get the Contrast software using curl commands. This article gives the necessary curl commands to use to download the Contrast software directly to your server without having to use a browser to access hub.contrastsecurity.com.
Process
For some of the curl commands given below, you will need the base64 encoded value of: username:password
(which is referred to as AUTH_TOKEN
in the below curl commands) where username and password are the credentials you use for logging into hub.contrastsecurity.com.
You can get the base64 encoded value at least a couple of different ways:
1. Using the openssl utility: echo -n 'username:pass'|openssl base64
2. Using an online base64 encoder such as the one at https://www.base64encode.org/
Curl commands:
To download the latest release version of the Linux TeamServer installer:
curl -L https://hub.contrastsecurity.com/h/api/artifacts/installer/sh/nocache -H "Authorization: Basic AUTH_TOKEN" -o "contrast-latest-nocache.sh"
To download the license file:
curl --request GET --url https://hub.contrastsecurity.com/h/rest/customer/license/text --header 'authorization: AUTH_TOKEN' > license.lic
To download the latest release of the TeamServer .war file:
curl -JLO https://hub.contrastsecurity.com/h/api/artifacts/war -u <contrast_hub_username>
To download the latest release of other artifacts, you can change the "war" in the url above, to any of the below:
- TeamServer Linux Installer:
installer/sh/nocache
- TeamServer Windows Installer:
installer/exe/nocache
- TeamServer .war File:
war
- .NET Framework Agent:
dotnet
- .NET Core Agent:
dotnet_core
- .NET Core installer for IIS:
dotnet_core_installer_for_iis
- Library Data Export:
ardy_export