cyjax-cti provides a Python library to use Cyjax platform API.
Project description
Introduction
cyjax-cti
is a Python library to use Cyjax platform API. You can access different resources (incident reports,
threat actors, indicators of compromise, etc.) from a Python script.
The library is available on Python Package Index.
Install
You can install the cyjax-cti
library with pip:
pip install cyjax-cti
Supported resources
Resource class | .one() | .list() |
---|---|---|
IncidentReport | ☑ | ☑ |
IndicatorOfCompromise | ☒ | ☑ |
LeakedEmail | ☑ | ☑ |
MaliciousDomain | ☒ | ☑ |
MyReport | ☑ | ☑ |
Paste | ☒ | ☑ |
Tweet | ☒ | ☑ |
TorExitNode | ☑ | ☒ |
Examples
Set the API key
import cyjax
# set a global API key
cyjax.api_key = "346568ecf85f0b5ca98f389908e8b803"
# set a resource API key
cyjax.IndicatorOfCompromise(api_key="346568ecf85f0b5ca98f389908e8b803")
Get indicators of compromise in the last 5 minutes
import cyjax
from datetime import timedelta
cyjax.api_key = "346568ecf85f0b5ca98f389908e8b803"
indicators = cyjax.IndicatorOfCompromise().list(since=timedelta(minutes=5))
for indicator in indicators:
print(indicator)
Get APT activity in last 6 months
import cyjax
from datetime import timedelta
cyjax.api_key = "346568ecf85f0b5ca98f389908e8b803"
reports = cyjax.IncidentReport().list(query="APT", since=timedelta(days=30*6))
for report in reports:
print("Title: {}" % report['title'])
print("Severity: {}" % report['severity'])
print("Timestamp: {}" % report['last_update'])
Get leaked emails in the last 30 days
import cyjax
from datetime import timedelta
cyjax.api_key = "346568ecf85f0b5ca98f389908e8b803"
for leaked_email in cyjax.LeakedEmail().list(since=timedelta(days=30)):
print("Email: {}" % leaked_email['email'])
print("Source: {}" % leaked_email['source'])
print("Timestamp: {}" % leaked_email['discovered_at'])
Get incident report by ID
import cyjax
cyjax.api_key = "346568ecf85f0b5ca98f389908e8b803"
incident_report = cyjax.IncidentReport().one(10)
print("Report title: {}" % incident_report.get('title'))
print("Report severity: {}" % incident_report.get('severity'))
print("Report content: {}" % incident_report.get('content'))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cyjax-cti-1.0.5.tar.gz
(12.4 kB
view hashes)
Built Distribution
cyjax_cti-1.0.5-py3-none-any.whl
(25.8 kB
view hashes)
Close
Hashes for cyjax_cti-1.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7e82cb6c0c3919ea70fc5cf65d145374741b003e8e3726bdc1e678d44067538 |
|
MD5 | d2261e97f8085309abc178de4975b120 |
|
BLAKE2b-256 | b77b7a6135a9f05bb4fb1c06e20471c69cf94c1cd4e01a854b788cfa1eb1a9e7 |