Skip to content

yurikrupenin/cbor-explorer

Repository files navigation

cbx: CBOR Explorer

A TUI application for inspecting CBOR (Concise Binary Object Representation) files, built with Rust and Ratatui. An online version is available here (a bit rough around the edges).

A demo GIF recording

Installation

Pre-built Binaries

Pre-built binaries for Linux (.deb, .snap), Windows, and macOS (untested) are available in Releases.

Cargo

cargo install --git https://github.com/yurikrupenin/cbor-explorer

Build from Source

cargo build --release
./target/release/cbx <file.cbor>

Usage

cbx <FILE>

Keybindings

Key Action
? Toggle Help
q Quit
Tab Switch focus (Tree / Hex)
t Switch Theme
/ Search
n / N Next / Previous match
: Go to Offset
m Toggle Scan Mode (Single / Auto)
s Sort chunks (Score / Offset)
x Toggle Hex / Dec integers
e Expand all nodes
c Collapse all nodes
z Zoom Into/Out of a data chunk
Enter / Space Toggle node expansion
j / Move Down
k / Move Up
h / Move Left (Hex view)
l / Move Right (Hex view)
g / Home Go to Start
G / End Go to End

Modes

By default, cbx assumes that the file contains a single CBOR sequence.

If your file contains multiple embedded CBOR sequences, press m to toggle Auto Mode. This uses simple heuristics to scan the file and identify potential CBOR sequences.

The scanning is not perfect but works pretty well for discovering complex nested structures.

Zoom into data

If you have a good idea of where the target data is located in a large file (or the utility was able to find something, but borked the beginning), you can use z to zoom into the data, reinterpreting the data at the cursor as the beginning of a CBOR sequence.

A recording of a zoom-in operation

License

MIT

About

A TUI application for inspecting CBOR data

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors