A powerful TUI (Text User Interface) tool for analyzing binary files and network captures, combining the best features of hex editors, protocol analyzers, and structure viewers.
- π Interactive hex dump with field highlighting
- π³ Construct-based parsing with live structure tree
- βοΈ Edit field values with type-aware validation
- π SVG export in Corkami poster style
- π¨ Color-coded fields with bezier curve connectors
- π¦ PCAP/PCAPNG support - Load and analyze network captures
- π Fuzzy field search - Find fields across all packets instantly
- π Packet list view - Wireshark-like packet browser
- π·οΈ Protocol dissection - Automatic parsing of Ethernet, IPv4/IPv6, TCP, UDP, ICMP, ARP, DNS
- π― Display filters - Filter packets by protocol, address, or field values
- β¨οΈ Keyboard navigation - vim-style bindings for fast navigation
# Clone the repository
git clone https://github.com/yourusername/binteractiview.git
cd binteractiview
# Install dependencies
pip install -e .
# Or with optional dependencies
pip install -e ".[full]"# Open a binary file
bintv -t firmware.bin
# The construct editor (left panel) accepts construct library syntax:
# Struct("magic" / Bytes(4), "version" / Int32ul, "data" / GreedyBytes)# Open a PCAP file (auto-detected)
bintv -t capture.pcap
# Or force PCAP mode
bintv -p -t network.cap
# Direct PCAP viewer command
bintv-pcap capture.pcapng| Key | Action |
|---|---|
Ctrl+O |
Open file |
Ctrl+E |
Export SVG |
Ctrl+L |
Toggle log panel |
Ctrl+Q |
Quit |
| Key | Action |
|---|---|
/ |
Open filter input |
Ctrl+F |
Fuzzy search fields |
n / p |
Next/Previous packet |
j / k |
Move cursor down/up |
g / G |
First/Last packet |
Enter |
Select packet |
Escape |
Clear filter |
| Key | Action |
|---|---|
| Right-click | Context menu on tree |
Ctrl+O |
Load binary file |
Filter packets using simple expressions:
tcp # All TCP packets
udp # All UDP packets
192.168.1.1 # Packets with this IP
tcp.port == 80 # TCP port 80
ip.src == 10.0.0.1 # Source IP filter
dns # DNS packets
Press Ctrl+F in PCAP mode to search all packet fields:
- Type partial field names:
tcp.pβ matchestcp.port,tcp.payload - Search by layer:
ipβ matches all IP fields - Search by value:
80β matches port 80 fields
Currently supported protocols:
- Layer 2: Ethernet
- Layer 3: IPv4, IPv6, ARP
- Layer 4: TCP, UDP, ICMP
- Layer 7: DNS (basic), HTTP (detection)
Export beautiful Corkami-style visualizations:
# In binary mode: Ctrl+E
# In PCAP mode: Ctrl+E (exports current packet)Features:
- Color-coded hex dump with field highlighting
- Bezier curve connectors from hex to field table
- Raw bytes vs. decoded value comparison
- Transformation indicators (β‘) for decoded data
bintv/
βββ app.py # Main binary viewer app
βββ pcap_app.py # PCAP viewer app
βββ pcap_parser.py # PCAP parsing and protocol constructs
βββ svg_exporter.py # Legacy SVG export
βββ svg_exporter_v2.py # Corkami-style SVG export
βββ widgets/
β βββ hex_view.py # Hex dump widget
β βββ packet_list.py # Packet table widget
β βββ fuzzy_finder.py # Fuzzy search widget
β βββ reactive_construct_tree.py # Structure tree widget
# In the construct editor:
Struct(
"header" / Struct(
"magic" / Const(b"FW"),
"version" / Int16ul,
"size" / Int32ul,
),
"data" / Bytes(this.header.size),
"checksum" / Int32ul,
)# Load PCAP
bintv -t capture.pcap
# Press / and enter filter:
tcp.dst_port == 443 # HTTPS traffic- Right-click on any field in the parsed values tree
- Select "βοΈ Edit Value" from the context menu
- Supports: integers (decimal/hex), bytes, strings, floats, booleans
- Integers:
255or0xFF - Bytes:
DEADBEEForDE AD BE EF - Strings: Plain text
- Floats:
3.14159 - Booleans:
true/falseor1/0
When exiting with unsaved changes:
- Save & Exit: Saves to
/tmp/{filename}_modified{ext} - Exit Without Saving: Discards all changes
- Cancel: Returns to app
Contributions welcome! Areas for improvement:
- Additional protocol parsers (TLS, SSH, SMB, etc.)
- Packet reassembly and stream following
- Plugin system for custom dissectors
- Export to other formats (JSON, CSV)
MIT License - See LICENSE file
Ready to analyze! Open any binary or PCAP file and start exploring.
