PyJoern lifts Joern data and APIs into Pythonic form, focused on graph manipulation.
Project description
PyJoern
A Python frontend and lifter for Joern API, focused on CFG manipulation.
Install
The Python frontend depends on two native backends: Java 19 and Graphviz. You must have these installed on your machine before pip installing this library. To install everything in a working condition, do the following for Ubuntu:
sudo apt-get install -y openjdk-19-jdk graphviz-dev
pip3 install pyjoern && pyjoern --install
When you run pyjoern --install
(which should be in your path after pip install), it wil download the latest Joern binaries and install them
inside the Python package.
Usage
Use PyJoern as a library for lifting source into a CFG. The IL the source is lifted to is described in JIL.
from pyjoern import fast_cfgs_from_source
cfgs = fast_cfgs_from_source("tests/source/simple.c")
main_func = cfgs["main"]
print(main_func.edges)
Versioning
The current version of PyJoern can be found in [pyjoern/__init__.py] as __version__
.
The point in the version is the PyJoern specific updates.
The first three are the current version of Joern that PyJoern is supporting.
For instance:
__version__ = "v1.2.18.1"
This would mean Joern version v1.2.18
, with PyJoern update 1
.
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
Built Distribution
Hashes for pyjoern-1.2.18.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b78a48c97aef958d4682699a49ad245cf5f6752b63d26320202d922bb6811478 |
|
MD5 | c296da0403a8a53139b9ed4cb468053f |
|
BLAKE2b-256 | 3baf5c59c460445ea313f941e9bb358cfb0722fbf1fb15ceaf1d43d43e8c298e |