PyTriage is a Python library for interacting with Cofense Triage's v1 and v2 API's.
Project description
PyTriage
PyTriage is a Python library for interacting with Cofense Triage's v1 and v2 API's.
Supported Actions
Reports
- Categorization
- Deletion
- Tag application
- Metadata retrieval
Reporters
- Update
- Review
- Metadata retrieval
Categories
- Creation
- Review
- Metadata retrieval
Rules
- Creation
- Review
- Update
- Deletion
Indicators
- Review
- Creation
- Update
- Deletion
Installation
pip install pytriage
Usage
# Client for v2 endpoint interaction
from pytriage.pytriage import TriageClient
# Instantiate your client
triage_client = TriageClient(<client_id>, <client_secret>, 'https://triageserver.com/')
# Authenticate to retrieve and store a JWT for subsequent requests
triage_client.authenticate()
# Create a new category
triage_client.create_category(name='phishing', score=3, color='#FFFFFF')
# Categorize a report
triage_client.categorize_report(report_id='9999', category_id='4', tag_list=['credential harvesting', 'o365'])
# Client for v1 endpoint interaction
from pytriage.pytriage import TriageClientv1
v1_client = TriageClientv1('joe@test.com', 'secret_token', 'https://triageserver.com')
# Retrieve an attachment
attachment_bytestring = v1_client.get_attachment('attachment_id')
# Download a report preview
v1_client.get_report_preview('9999', 'jpg')
# View all reports from a chosen timeframe
reports = v1_client.get_reports(start_date='2020-07-01', end_date='2020-07-08')
License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
PyTriage-0.2.1.tar.gz
(6.7 kB
view details)
File details
Details for the file PyTriage-0.2.1.tar.gz.
File metadata
- Download URL: PyTriage-0.2.1.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb4b471198bec03cd1c6be3c8cb12532f3517bff57cfb4dd7b07c72c54701202
|
|
| MD5 |
034b7003ae59abfb7bc78950737bb5fd
|
|
| BLAKE2b-256 |
141a702b670998587cae12395854f5837bea62c72b797cc8ba32eb1ebf85dcea
|