Skip to content

Commit

Permalink
Add 1.4.0 features support
Browse files Browse the repository at this point in the history
  • Loading branch information
Yochai Blumenfeld committed Mar 27, 2017
1 parent 51af829 commit 6af947b
Show file tree
Hide file tree
Showing 26 changed files with 2,235 additions and 1,172 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
*.pyc
*.exe
*.zip
*.msi
.idea
*.swp
mazerunner_sdk_venv
build
mazerunner_sdk.egg-info/
dist
.coverage
.cache
sdk-venv
htmlcov
test_deployments
4 changes: 2 additions & 2 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2016, Cymmetria
Copyright (c) 2015-2017, Cymmetria
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Expand All @@ -9,4 +9,4 @@ Redistribution and use in source and binary forms, with or without modification,

3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
41 changes: 40 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,40 @@
See documentation [here](https://community.cymmetria.com/api)
# MazeRunner Python SDK


This library implements a convenient client for MazeRunner API for python.

Using this library, you'll be able to easily configure and manipulate

the key features of MazeRunner, such as creation of a deception campaign, turning

decoys on or off, deployment on remote endpoints, and inspect alerts with their

attached evidence.

For a quick start, it's recommended to perform the easy steps in the installation section, and

continue to trying some of the usage examples in the mazerunner/samples folder.

###Run tests:
`py.test -vvv --json_credentials=my_keys.json --lab_dependent --cov=mazerunner.api_client --cov-report html`

Structure of the json_credentials file:
~~~~
{
"ip_address": "mazerunner.host.or.ip",
"id": "mazerunner_api_key",
"secret": "mazerunner_api_secret",
"mazerunner_certificate_path": "MazeRunner.crt",
"endpoint_ip": "endpoint.host.or.ip",
"endpoint_username": "ep_username",
"endpoint_password": "ep_password"
}
~~~~

###Generate documentation files:
~~~~
export PYTHONPATH=`pwd`
make html
~~~~

###See documentation at [https://community.cymmetria.com/api](https://community.cymmetria.com/api)
7 changes: 5 additions & 2 deletions conftest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
def pytest_addoption(parser):
parser.addoption("--ip_address", action="store", default=None, help="IP Address of MazeRunner")
parser.addoption("--json_credentials", action="store", default=None, help="Json file with the relevant credentials")
parser.addoption("--json_credentials", action="store", default=None,
help="Json file with the relevant credentials")
parser.addoption("--runslow", action="store_true", default=False, help="Run slow tests")
parser.addoption("--lab_dependent", action="store_true", default=False,
help="Run tests that depend on the lab resources")
281 changes: 0 additions & 281 deletions make.bat

This file was deleted.

5 changes: 2 additions & 3 deletions mazerunner/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
from mazerunner import api_client


def connect(ip_address, api_key, api_secret, certificate, use_http=False):
def connect(ip_address, api_key, api_secret, certificate):
"""Establish a connection to the MazeRunner server"""
return api_client.APIClient(ip_address,
api_key,
api_secret,
certificate,
use_http=use_http)
certificate)
Loading

0 comments on commit 6af947b

Please sign in to comment.