Binary Inspect
A Python binary analysis tool for reverse engineering - detect formats, parse structures, inspect values.
Install
pip install binary-inspect
Or from source:
git clone https://github.com/daedalus/binary-inspect.git
cd binary-inspect
pip install -e ".[test]"
Usage
# Analyze a binary file (auto-detect format, inspect data, calculate entropy)
binary-inspect analyze file.bin
# Detect file format using magic bytes
binary-inspect detect file.bin
# Inspect data at specific offset
binary-inspect inspect file.bin 0x100
# Calculate entropy
binary-inspect entropy file.bin
# Find strings
binary-inspect strings file.bin
# Search for hex pattern
binary-inspect search file.bin -p "4D 5A"
# Display hex dump
binary-inspect hexview file.bin
# Parse with pattern
binary-inspect parse file.bin --pattern my_format.pybip --format json -o output.json
Features
- Magic Detection: Identify file format via header signatures (PE, ELF, PNG, ZIP, etc.)
- Data Inspector: Decode integers, floats, strings, GUIDs, timestamps at cursor
- Pattern Language: Define custom binary structures with DSL
- Entropy Analysis: Detect packed/encrypted sections
- Search: Find strings, integers, hex patterns
- Export: JSON, CSV, YAML output
API
from binary_inspect import (
MagicDetector,
DataInspector,
EntropyAnalyzer,
BinaryReader,
)
# Detect format
detector = MagicDetector()
match = detector.detect_one(data)
print(f"Format: {match.format_name}")
# Inspect at offset
inspector = DataInspector()
results = inspector.inspect(data, 0x100)
for r in results:
print(f"{r['type']}: {r['value']}")
# Calculate entropy
analyzer = EntropyAnalyzer()
entropy = analyzer.shannon_entropy(data)
print(f"Entropy: {entropy:.2f}")
Development
# Install dev dependencies
pip install -e ".[test]"
# Run tests
pytest
# Format
ruff format src/ tests/
# Lint
ruff check src/ tests/
License
MIT
Metadata
Release files for binary-inspect 0.1.0
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 |
|---|---|---|---|---|
| binary_inspect-0.1.0.tar.gz | 15.3 kB | With provenance | Details for binary_inspect-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| binary_inspect-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for binary_inspect-0.1.0-py3-none-any.whl |
Total release size: 34.8 kB
Release files / binary_inspect-0.1.0.tar.gz
| Download URL | binary_inspect-0.1.0.tar.gz |
|---|---|
| Size | 15.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
73869010b8d320d1888fb2687fb5d6c8c7df143f1f5ec81c37c22c62e7c38e78
|
|
BLAKE2b-256 checksum How to use checksums |
537a29504a8b9973f3d0649484d45662dc36bffc2ddec29bd556cedb0906380d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 9, 2026.
Transparency logRelease files / binary_inspect-0.1.0-py3-none-any.whl
| Download URL | binary_inspect-0.1.0-py3-none-any.whl |
|---|---|
| Size | 19.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a964dfcfc08a72a7812bf2111bcfb40747dcc54b2159b3dca156a8e82f954962
|
|
BLAKE2b-256 checksum How to use checksums |
509410ac900e404d68acbc84c05825cf8de526684a0e0b0e5d3b4c75613ff1bf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 9, 2026.
Transparency logSecurity for binary-inspect 0.1.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for binary_inspect-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 9, 2026.
Transparency logA 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.