# EVM CFG BUILDER [](https://travis-ci.org/crytic/evm_cfg_builder) [](https://empireslacking.herokuapp.com) [](https://badge.fury.io/py/evm-cfg-builder)
> This version is modified by Soptq to possible infinite loop error.
evm-cfg-builder is used to extract a control flow graph (CFG) from EVM bytecode. It is used by Ethersplay, Manticore, and other tools from Trail of Bits. It is a reliable foundation to build program analysis tools for EVM.
We encourage contributions that address any known [issues](https://github.com/trailofbits/evm_cfg_builder/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc) and will pay out bounties for accepted PRs. Join us on the [Empire Hacking Slack](https://empireslacking.herokuapp.com) to discuss using or extending evm-cfg-builder.
## Features
Reliably recovers a Control Flow Graph (CFG) from EVM bytecode using a dedicated Value Set Analysis
Recovers functions names
Recovers attributes (e.g., payable, view, pure)
Outputs the CFG to a dot file
Library API
## Usage
### Command-line
To export basic dissassembly information, run: `bash evm-cfg-builder mycontract.evm `
To export the CFG of each function (dot format), run: `bash evm-cfg-builder mycontract.evm --export-dot my_dir `
dot files can be read using xdot.
### Library See [examples/explore_cfg.py](examples/explore_cfg.py) and [examples/explore_functions.py](examples/explore_functions.py) for library examples.
## How to install
### Using Pip `bash pip install evm-cfg-builder `
### Using Git `bash git clone https://github.com/trailofbits/evm_cfg_builder pip install . `
## Requirements
Python >= 3.6
[pyevmasm](https://github.com/trailofbits/pyevmasm)
## Getting Help
Feel free to stop by our [Slack channel](https://empireslacking.herokuapp.com) (#ethereum) for help using or extending evm-cfg-builder.
## License
evm-cfg-builder is licensed and distributed under the AGPLv3. [Contact us](mailto:opensource@trailofbits.com) if you’re looking for an exception to the terms.
Metadata
Release files for evm-cfg-builder-fixed 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| evm-cfg-builder-fixed-0.3.1.tar.gz | 6.0 MB | Without provenance | Details for evm-cfg-builder-fixed-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| evm_cfg_builder_fixed-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for evm_cfg_builder_fixed-0.3.1-py3-none-any.whl |
Total release size: 12.1 MB
Release files / evm-cfg-builder-fixed-0.3.1.tar.gz
| Download URL | evm-cfg-builder-fixed-0.3.1.tar.gz |
|---|---|
| Size | 6.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
56965d1b948b3e58f78733178337340969f4fa6eadcbcffda451e0b786100a0f
|
|
BLAKE2b-256 checksum How to use checksums |
fd8836d38d7918769d583cbd35f07ff4a2003376cb4b8070da0860b42181b7e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.0
|
Release files / evm_cfg_builder_fixed-0.3.1-py3-none-any.whl
| Download URL | evm_cfg_builder_fixed-0.3.1-py3-none-any.whl |
|---|---|
| Size | 6.1 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
29ce7204b535f05c383ac67137f38effff3e3e113d9480c6d20b26a5e27684df
|
|
BLAKE2b-256 checksum How to use checksums |
c997e0e8d68f9473c35cdc0de59a2f35b65696e33ed50404b63eb318223d2386
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.0
|
Security for evm-cfg-builder-fixed 0.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.