A Python library to create and display STIX2 graphs
Project description
PySTIXView
PySTXIView is a Python library to create and display STIX2 graphs.
PySTIXView is based on pyvis that allows you to create graph and visualize them in your browser or in Jupyter Notebook.
Installation
Requirements
- python3 (tested on python 3.12)
- pyvis
- stix2
Install from pip
pip install PySTIXview
Install from source code
git clone https://github.com/vincenzocaputo/PySTIXView
cd PySTIXView
python3 setup.py install
Usage
Below is a simple example to create a graph from the STIX2 Bundle Threat Actor Leveraging Attack Patterns and Malware. (The JSON file is available at https://github.com/oasis-open/cti-documentation/blob/main/examples/example_json/threat-actor-leveraging-attack-patterns-and-malware.json)
from pystixview import PySTIXView
stix_graph = PySTIXView()
with open("threat-actor-leveraging-attack-patterns-and-malware.json", "r") as fd:
stix_graph.add_bundle(fd.read())
stix_graph.save_graph("threat-actor-leveraging-attack-patterns-and-malware.html", width="100%", height="600px")
PySTIXView can be used also in Jupyter Notebook:
Documentation
Documentation is available here
Credits
- The resources used for examples and library tests are taken from https://oasis-open.github.io/cti-documentation/stix/examples.html.
- The images used in the library for the node icons are taken from https://github.com/freetaxii/stix2-graphics
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
Built Distribution
File details
Details for the file pystixview-0.1.1.tar.gz
.
File metadata
- Download URL: pystixview-0.1.1.tar.gz
- Upload date:
- Size: 12.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7cccec38e8fb510f8c5c33beba1fe791e0932a3ad260e939f20c5730880ff961 |
|
MD5 | cde7ff7131fdd56622c0fe2e73b02e12 |
|
BLAKE2b-256 | 35467a78a6bc1d1870d9beecaf989aefd74e525cc6cd4822c9957fcf1125ab1f |
File details
Details for the file pystixview-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: pystixview-0.1.1-py3-none-any.whl
- Upload date:
- Size: 11.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e60e1ffcc4b9e85fd7540882d1d795c736fbcecc3bd08e340a5cdcb958a3e49a |
|
MD5 | c9ebf0c681149007d6a81ce23aa053c2 |
|
BLAKE2b-256 | a0574da514a00ea854e00ef5335134594f8175b9fb4627afa10117c60a9aabf4 |