Skip to content

Commit dcab2a9

Browse files
committed
Merge branch 'release/2.0.0'
2 parents 061e4da + 585a360 commit dcab2a9

29 files changed

Lines changed: 1332 additions & 434 deletions

.gitignore

Lines changed: 15 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,91 +1,17 @@
1-
# Byte-compiled / optimized / DLL files
2-
__pycache__/
3-
*.py[cod]
4-
*$py.class
5-
6-
# C extensions
7-
*.so
8-
9-
# Distribution / packaging
10-
.Python
11-
env/
12-
build/
13-
develop-eggs/
1+
# Created by .ignore support plugin (hsz.mobi)
2+
.gitignore
3+
.idea/
4+
.vscode/
5+
tmp/
6+
*.pyc
147
dist/
15-
downloads/
16-
eggs/
17-
.eggs/
18-
lib/
19-
lib64/
20-
parts/
21-
sdist/
22-
var/
23-
*.egg-info/
24-
.installed.cfg
25-
*.egg
26-
27-
# PyInstaller
28-
# Usually these files are written by a python script from a template
29-
# before PyInstaller builds the exe, so as to inject date/other infos into it.
30-
*.manifest
31-
*.spec
32-
33-
# Installer logs
34-
pip-log.txt
35-
pip-delete-this-directory.txt
36-
37-
# Unit test / coverage reports
38-
htmlcov/
39-
.tox/
40-
.coverage
41-
.coverage.*
42-
.cache
43-
nosetests.xml
44-
coverage.xml
45-
*,cover
46-
.hypothesis/
47-
48-
# Translations
49-
*.mo
50-
*.pot
51-
52-
# Django stuff:
53-
*.log
54-
local_settings.py
55-
56-
# Flask stuff:
57-
instance/
58-
.webassets-cache
59-
60-
# Scrapy stuff:
61-
.scrapy
62-
63-
# Sphinx documentation
64-
docs/_build/
65-
66-
# PyBuilder
67-
target/
68-
69-
# IPython Notebook
70-
.ipynb_checkpoints
71-
72-
# pyenv
73-
.python-version
74-
75-
# celery beat schedule file
76-
celerybeat-schedule
77-
78-
# dotenv
79-
.env
80-
81-
# virtualenv
82-
venv/
83-
ENV/
84-
85-
# Spyder project settings
86-
.spyderproject
87-
88-
# Rope project settings
89-
.ropeproject
8+
build/
9+
*.egg-info
10+
build.sh
9011

91-
.idea
12+
# Python Venv
13+
bin/
14+
lib/
15+
lib64
16+
pyvenv.cfg
17+
venv/

AUTHORS

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
Authors
22
-------
33

4-
* Thomas Franco <toom@thehive-project.org> (lead developer, back-end)
5-
* Saâd Kadhi <saad@thehive-project.org> (project leader, product management & design)
6-
* Jérôme Leonard <jerome@thehive-project.org> (developer, front-end, analyzers)
4+
* Nabil Adouani <nabil@thehive-project.org>
5+
* Thomas Franco <toom@thehive-project.org>
6+
* Saâd Kadhi <saad@thehive-project.org> (project leader)
7+
* Jérôme Leonard <jerome@thehive-project.org>
78

8-
Contributors
9-
------------
109

11-
* Nabil Adouani
12-
* CERT Banque de France (CERT-BDF)
13-
14-
Copyright (C) 2017 Thomas Franco
15-
Copyright (C) 2017 Saâd Kadhi
16-
Copyright (C) 2017 Jérôme Leonard
10+
Copyright (C) 2017-2018 Nabil Adouani
11+
Copyright (C) 2017-2018 Thomas Franco
12+
Copyright (C) 2017-2018 Saâd Kadhi
13+
Copyright (C) 2017-2018 Jérôme Leonard

README.md

Lines changed: 17 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,40 +4,30 @@
44
# Cortex4py
55
Cortex4py is a Python API client for [Cortex](https://thehive-project.org/), a powerful observable analysis engine where observables such as IP and email addresses, URLs, domain names, files or hashes can be analyzed one by one using a Web interface.
66

7-
Cortex4py allows analysts to automate these operations and submit observables in bulk mode through the Cortex REST API from alternative SIRP platforms and custom scripts.
7+
Cortex4py allows analysts to automate these operations and submit observables in bulk mode through the Cortex REST API from alternative SIRP platforms, custom scripts or MISP.
8+
9+
10+
# Features
11+
Cortex4py 2 is compatible with Cortex 2 and does not work with Cortex 1. It can:
12+
- Manage organizations
13+
- Manage users
14+
- Configure analyzers within an organization
15+
- List and launch analyzers
16+
17+
For more details, please refer to the [full documentation](Usage.md).
18+
19+
**Note**: Cortex4py 2 requires Python 3. It does not support Python 2.
820

921
# Use It
1022
On macOS and Linux, type:
1123
```
1224
sudo pip install cortex4py
1325
```
1426

15-
Following is an example of a Python script that runs an analysis using MaxMind analyzer:
16-
17-
```python
18-
import sys
19-
import json
20-
from cortex4py.api import CortexApi
21-
from cortex4py.api import CortexException
22-
23-
api = CortexApi('http://127.0.0.1:9000')
24-
25-
# Run analysis
26-
job_id = None
27-
try:
28-
response = api.run_analyzer("MaxMind_GeoIP_3_0", "ip", 1, "8.8.8.8")
29-
job_id = response["id"]
30-
except CortexException as ex:
31-
print('[ERROR]: Failed to run analyzer: {}'.format(ex.message))
32-
sys.exit(0)
33-
34-
# Get the job report
35-
try:
36-
response = api.get_job_report(job_id, '30s')
37-
print(json.dumps(response, indent=4, sort_keys=True))
38-
except CortexException as ex:
39-
print('[ERROR]: Failed to get job report'.format(ex.message))
40-
sys.exit(0)
27+
or, if you already have it, update it:
28+
29+
```
30+
sudo pip install -U cortex4py
4131
```
4232

4333
If you are using Python on a Windows operating system, please forgo the `sudo` command.

0 commit comments

Comments
 (0)