A simple Python wrapper for the Verodin Director API
Tested on Director Version: 3.5.4.0
https://www.verodin.com/technology/platform
Nolan B. Kennedy (https://github.com/nxkennedy)
- An object oriented interface to the Verodin Director API
- Supports Action lookup, execution and results retrieval
- Supports job monitoring
Before you get started, make sure you have:
- Python >= 3.6
- Installed requests (
pip3 install requests
or from this directorypip3 install -r requirements.txt
) - A Verodin Director account (Power User or System Admin privileges for best results)
git clone https://github.com/MindPointGroup/python-verodin-director-api.git
change directories to the newly cloned folder
There is a sample script in the examples folder which will execute an action, monitor the job status, and retrieve the results. See below for specific examples.
First create a Verodin DirectorAPI object:
from verodin.api import DirectorAPI
verodin = DirectorAPI(url='<https://director-url>', username='<username>', password='<password>')
If the Director's SSL cert is broken, the insecure flag can be set to override the errors (obviously not best practice):
verodin = DirectorAPI(url='<https://director-url>', username='<username>', password='<password>', insecure=True)
We can retrieve the name of an action by calling the actions method
action = verodin.actions(id=1165)
action_name = action['sim_action']['name']
We can execute an action by using the actions_execute method
job = verodin.actions_execute(id=1165, attack_node=38, target_node=39)
job_id = job['id']
Monitor the current status of a job by calling the jobs method
monitor = verodin.jobs(id=11222)
status = monitor['status']
Retrieve the results of a job by calling the jobs method
monitor = verodin.jobs(id=11222)
results = monitor['job_actions'][0]
detected = results['detected']
blocked = results['blocked']
if detected or blocked:
events = results['ja_events']
print('---EVENTS---')
for event in events:
print(event)
- Add check to determine if job is currently running and that requested job is in queue
- Document additional module methods