bytepeel
v0.1.2Decode and edit hex, base64, PEM, JWT, gzip, DER, CBOR, MessagePack and protobuf data byte-exactly.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
peel Decode data
Decode data byte-exactly through every layer (hex, base64, PEM, JWT, dumps, gzip/zlib/zstd, DER/ASN.1, CBOR, MessagePack, schemaless protobuf) and return a JSON tree with byte ranges. Ambiguous protobuf LEN fields list ranked alternatives (message, string, bytes, packed); 64-bit integers are JSON strings. Long text and bytes are previewed ("truncated":true); use get with format raw for a full payload. Paths: protobuf field numbers (1.3[2].4: the third field 3 of message 1), DER child indices (0.0.5), a PEM bundle's block index first, CBOR/MessagePack map keys and array indices (users.0.name),…
| Parameter | Type | Description |
|---|---|---|
alts | integer | Max interpretations kept per protobuf LEN field (default 3). |
as | string | Force how the innermost decoded bytes are interpreted, when auto-detection picks wrongly. |
depth | integer | Max nesting of layers and messages (default 16). |
file | string | Path of a local file to read instead of input (binary files are fine). |
format | string | json (default); tree: a compact indented outline; raw: the selected item's payload bytes as lowercase hex (needs get). |
get | string | Select one item by path and return only it. |
in | string | How to read the input (default auto). raw = the bytes as they are. |
input | string | The data as text: hex, base64, PEM, a JWT, an xxd or hexdump -C dump, or any nesting of these. Give either input or file. |
max_items | integer | Max protobuf fields, CBOR/MessagePack values and DER elements decoded in total (default 1000000). |
output_file | string | Write the result to this file instead of returning it. Fails if the file exists, unless overwrite is true. |
overwrite | boolean | Allow output_file to replace an existing file. |
set Edit and re-encode data
Change, add or remove values and get the data back in its original encoding (hex spacing, base64 alphabet and wrapping, PEM label, gzip header), with every other byte preserved. Edits apply in order; the result is decoded again and checked (REENCODE_VERIFY_FAILED otherwise). Editing signed data (a certificate) invalidates its signature; JWTs are not editable. Paths: protobuf field numbers (1.3[2].4: the third field 3 of message 1), DER child indices (0.0.5), a PEM bundle's block index first, CBOR/MessagePack map keys and array indices (users.0.name), a JWT part then JSON keys (payload.sub), JS…
| Parameter | Type | Description |
|---|---|---|
edits * | array | Edits, applied in order. |
alts | integer | Max interpretations kept per protobuf LEN field (default 3). |
as | string | Force how the innermost decoded bytes are interpreted, when auto-detection picks wrongly. |
depth | integer | Max nesting of layers and messages (default 16). |
file | string | Path of a local file to read instead of input (binary files are fine). |
in | string | How to read the input (default auto). raw = the bytes as they are. |
input | string | The data as text: hex, base64, PEM, a JWT, an xxd or hexdump -C dump, or any nesting of these. Give either input or file. |
max_items | integer | Max protobuf fields, CBOR/MessagePack values and DER elements decoded in total (default 1000000). |
output_file | string | Write the result to this file instead of returning it. Fails if the file exists, unless overwrite is true. |
overwrite | boolean | Allow output_file to replace an existing file. |