Fishbones
Fishbones is a library for implementing decompiled code with Python.
Requirements
- Python 3.6+
Installation
$ pip install fishbones
Usage
Fishbones defines some integer types with fixed size. You can use shorthand functions (int8, int16, int32, int64, uint8, uint16, uint32, uint64) to create them.
from fishbones import uint8
v = uint8(0x53)
Pointer operations are common in the decompiled code.
unsigned __int8 data[8] = {71, 114, 97, 118, 105, 116, 117, 109};
unsigned __int8 *p = data;
unsigned __int8 v = p[4];
*((unsigned __int32 *)p + 1) = v;
So Fishbones provides vptr.
from fishbones import vptr
data = bytearray([71, 114, 97, 118, 105, 116, 117, 109])
p = vptr(data, 'uint8')
v = p.add(4).read()
p.cast('uint32').add(1).write(v)
In some cases, decompilers may use their built-in functions in the output. Fishbones implements some of them. You can look up from fishbones.decompiler_builtins.
from fishbones import uint32
from fishbones.decompiler_builtins.ida import ror4
v = uint32(0x53683477)
v = ror4(v, 2)
Metadata
Release files for fishbones 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 |
|---|---|---|---|---|
| fishbones-0.3.1.tar.gz | 9.5 kB | Without provenance | Details for fishbones-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fishbones-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for fishbones-0.3.1-py3-none-any.whl |
Total release size: 19.8 kB
Release files / fishbones-0.3.1.tar.gz
| Download URL | fishbones-0.3.1.tar.gz |
|---|---|
| Size | 9.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
19c821b8b14c62405b122f71968322de275c7aa63c5caf29d79dc6e1aa734b76
|
|
BLAKE2b-256 checksum How to use checksums |
587707811a5fb7ba3b76c21cc30485e1f3d37b38bac6ece251c310fa1469cb1e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.9.6 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.10.1 urllib3/1.26.15 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.7
|
Release files / fishbones-0.3.1-py3-none-any.whl
| Download URL | fishbones-0.3.1-py3-none-any.whl |
|---|---|
| Size | 10.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7a382f775979aafb688c4d42e34d975594e205be511b9f72c20b037d2d2a47d0
|
|
BLAKE2b-256 checksum How to use checksums |
8f5ef097d611bd3b868bd7054e41a903a4514217eb934813498470fc333a4659
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.9.6 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.10.1 urllib3/1.26.15 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.7
|
Security for fishbones 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.