./HAVOC SDK

Easy Setup

The ./HAVOC CLI will create a Python virtual environment and install the ./HAVOC dependencies for you as part of the initial deployment. See the Installation page for more details. If you would like to setup just the ./HAVOC CLI and build and configure the virtual environment without doing a full deployment, use the -s option of the ./HAVOC CLI. See the ./HAVOC CLI page for more details.

To start developing with the ./HAVOC SDK from the installed CLI, change to the havoc directory and activate the environment:

cd havoc
source venv/bin/activate

Start python:

python3

Import the ./HAVOC SDK package and create the connection:

import havoc

api_domain_name =  '<api_domain_name>'
api_region = '<api_region>'
api_key = '<api_key>'
secret = '<secret>'
h = havoc.Connect(api_region, api_domain_name, api_key, secret)

Manual Setup

Interacting with the ./HAVOC platform through the Python SDK requires Python3 (version 3.7 or higher) and it's recommended to install it into a virtual environment.

Create a directory to use as your havoc workspace and setup a virtual environment:

mkdir havoc
cd havoc
python3 -m venv venv
source venv/bin/activate

Install the havoc Python package into your virtual environment:

pip install havoc

Once the havoc Python package is installed, you can import it and setup the connection as detailed below.

Start python:

python3

Import the havoc package and create the connection:

import havoc

api_domain_name =  '<api_domain_name>'
api_region = '<api_region>'
api_key = '<api_key>'
secret = '<secret>'
h = havoc.Connect(api_region, api_domain_name, api_key, secret)

See the Administration Through SDK and Usage Through SDK pages for more information about available SDK methods.