Hex dump, magic-byte detection, entropy, strings, and pattern search — from one zero-dependency CLI.
npx github:NickCirv/binary-inspector <file> [options]Or install globally:
npm install -g github:NickCirv/binary-inspector# Hex dump (default)
binx image.png
# Detect file type from magic bytes
binx /bin/ls --type
# Entropy + file info
binx firmware.bin --info
# Extract printable strings (min length 8)
binx /bin/ls --strings --min-len 8
# Search for a hex pattern
binx archive.zip --search "50 4B 03 04"
# Full analysis as JSON
binx image.png --all --json| Flag | Description |
|---|---|
--hex |
Hex dump (default when no other mode given) |
--type |
Detect file type from magic bytes (30+ signatures) |
--info |
File size, permissions, Shannon entropy |
--strings |
Find printable ASCII sequences |
--freq |
Byte frequency analysis, top 10 |
--search <hex> |
Search for a hex pattern, e.g. "FF D8 FF" |
--offset <n> |
Start at byte offset N |
--length <n> |
Read N bytes from offset |
--min-len <n> |
Min string length for --strings (default: 4) |
--all |
Run all analyses |
--json |
Output full analysis as JSON |
--no-color |
Disable color output |
binary-inspector reads any file and lets you explore its raw bytes without installing anything beyond Node. It identifies 30+ formats by magic bytes (PNG, JPEG, ELF, Mach-O, ZIP, SQLite, WASM, and more), computes Shannon entropy to flag encrypted or compressed regions, extracts printable strings, and searches for arbitrary hex patterns — all piped through a readable color terminal output or clean JSON.
Zero dependencies · Node ≥ 18 · MIT · by NickCirv