Registry / data / binary-refinery

binary-refinery

JSON →
library0.11.1pypypi✓ verified 84d ago

A toolkit to transform and refine (mostly) binary data. Current version 0.10.11, frequent releases. Provides a pipeline framework for unpacking, decoding, and transforming binary payloads, with built-in units for cryptography, compression, encoding, and more.

pip install binary-refinery
INSTALL
IMPORT
SIG · BINARY-REFINERY
B
binary-refinery
datapythonv0.11.1
Install
17.2s avg
Import
183ms
Disk
168MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.11.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.198s · 160.7MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 17.2s · import 0.168s · 157MB
168MB installed
● package 168MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

refinery
import refinery
import binary_refinery
The package installs as 'binary-refinery' but the module is 'refinery'. Common mistake.
refinery.units
from refinery import units
from refinery.units import ...
Top-level import of units works; deeper paths may not be importable directly.

Basic pipeline: pipe binary data through refinery units using the | operator.

import os import json from refinery import units # Process a binary payload: base64 decode, decompress, and display hex payload = b'JVBERi0xLjQ...' # truncated for example result = payload | units.b64() | units.zlib() | units.hexview() print(result) # Use a variable for conditional branching (requires 'refinery.lib') from refinery.lib import argformats print(argformats), # just to demonstrate import is available
refinery --version
Debug
Known issues
breakingIn version 0.9.x, many unit names changed (e.g., 'base64' became 'b64'). Scripts from 0.8.x will break.
fix
Update unit names: e.g., base64 -> b64, hex -> hex, etc. Check migration guide.
affects: <0.9.0
gotchaThe pipeline operator | does not behave like shell pipes: units must be instantiated (with parentheses) even if no arguments needed.
fix
Use 'data | unit.Class()' not 'data | unit.Class'.
affects: all
gotchaImporting 'refinery' works, but many submodules (e.g., 'refinery.units.crypto') are not importable directly; always use 'from refinery import units' and access via 'units.xxx'.
fix
Use 'from refinery import units; units.aes()' instead of 'from refinery.units.crypto import aes'.
affects: all
deprecatedThe 'malwares' unit has been deprecated in favor of generic units like 'xtrmem' and 'xtrfile'.
fix
Replace 'malwares(...)' with specific units for memory extraction.
affects: >=0.9.5
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'binary_refinery'
Wrong import name; the Python package installs as 'binary-refinery' but the module is 'refinery'.
fix
pip install binary-refinery; then use 'import refinery'.
AttributeError: module 'refinery' has no attribute 'b64'
Units are not available as attributes on the top-level module; must import 'units' submodule.
fix
from refinery import units; units.b64()
TypeError: 'NoneType' object is not callable
Forgetting to instantiate a unit class (missing parentheses).
fix
data | units.b64()  # with parentheses
Upgrade
Version history
0.11.1latest on PyPI · released May 28, 2026
Audit
Dependencies
capstoneoptionalDisassembly support for x86, x64, ARM, etc.
yara-pythonoptionalYARA pattern matching
Agent activity
18 hits · last 30 days
node
16
OpenAI (training)
1
Resources
binary-refinery — pip install binary-refinery · libregistry