Skip to main content

Crate binscout

Crate binscout 

Source
Expand description

binscout core: headless agent-first binary analysis.

Modules§

analysis
M4 analysis: function discovery, CFGs, callgraph, xrefs, queries.
annotations
Versioned, identity-checked annotation interchange.
crypto
First-minute crypto triage: static constant scan over mapped bytes.
db
M5 persist: redb project store plus annotations.
diff
Bindiff-lite: function-level diff between two binaries, plus per-function block/instruction detail.
disasm
M2 disassembler: x86_64 via iced-x86, AArch64/ARM32/Thumb via yaxpeax-arm, RISC-V 32/64 via rvdasm, MIPS32 via rabbitizer, PowerPC 32/64 via powerpc.
error
Core errors: the Error variants and the Result alias.
flirt
FLIRT-like library-function identification hints (read-only).
gopclntab
Go pclntab recovery: function names and exact boundaries for stripped Go binaries.
headers
On-demand header metadata (headers command / MCP tool).
ir
M3 IR: minimal P-code-inspired lift over Insn.
loader
M1 loader: binary format readers mapped to shared Segments.
mcp
binscout MCP server: 43 tools over a cached Project.
patch
Patch export: assemble replacement bytes at a VA without writing the binary.
pseudo
Approximate pseudo-C rendering over the thin M3 IR.
search
Bounded literal/wildcard byte search over mapped file bytes.
stackstrings
Stack-constructed string recovery (rsdbg-em6.18, M item).
yara
YARA rule scanning via yara-x over mapped file bytes.

Structs§

BytesView
Raw byte range with VA/file provenance and a typed view.
CallNode
One transitive callgraph row: a reachable function plus its distance.
DebugOptions
Explicit debug inputs for an open: local PDB and external DWARF files.
FuncMeta
Compact function metadata: entry, rename-resolved name, and counts.
FunctionFilter
Filters for Project::functions_filtered: every present field must match.
LoaderProject
Cache-hit view for loader-only commands: binary plus stored snapshot rows, without re-decoding a single instruction.
Page
One page of rows under the protocol-1 envelope (docs/book/src/json-protocol.md).
Project
Opened analysis project: binary plus its cached analysis and annotations.
SliceNode
One backward-slice row: an instruction that can reach the query target. addr is the reaching instruction address, depth the shortest reverse-walk distance from the query root (direct predecessors are depth 1), func the entry of the function containing addr (null when in no function), and name that function’s rename-resolved display name, if any.
StringRow
One extracted string with an optional referencing-instruction list.
StringXref
One instruction referring to a string: the referrer plus its function.
XrefRow
One cross-reference with listing context resolved.

Enums§

BytesAs
Typed view over raw bytes for Project::bytes_view.
BytesEndian
Byte order for multi-byte BytesAs views.
LoaderOpened
Outcome of Project::open_loader_only: either a decode-free cache-hit view or a fully analyzed project.

Constants§

MAX_COVERAGE_MNEMONICS
Cap on distinct unlifted mnemonics in an Project::ir_coverage_at range summary; beyond it truncated is set.
MAX_RANGE_BYTES
Cap on raw bytes per Project::bytes_at call.
MAX_STRING_XREFS
Cap on referring instructions per StringRow.
WIRE_PROTOCOL
Wire protocol revision served in every Page envelope.

Functions§

addr_hex
Format a virtual address as canonical 0x-hex (0x401000).
addr_pair
Dual address encoding: integer value plus canonical 0x-hex string.
ir_coverage
Machine-readable lift coverage for arch, without opening a binary.
open_mapped
Open a binary with an optional explicit raw mapping, an optional fat Mach-O slice selection, optional explicit debug inputs, and an optional explicit DB path.
open_mapped_loader_only
open_mapped for loader-only commands: explicit DB path (or the default sidecar), explicit raw mapping, fat Mach-O slice selection, and explicit debug inputs interpreted identically, returning LoaderOpened so cache hits skip instruction re-decode (see Project::open_loader_only).
opt_addr_pair
Dual encoding for optional addresses: (None, None) stays null on both sides instead of inventing an address.
parse_addr
Parse a CLI/MCP address: 0x-prefixed hex or plain decimal.
parse_bytes_as
Parse a typed byte view: u8, u16, u32, u64, ptr, cstr, or utf16 (case-insensitive, see BytesAs).
parse_bytes_endian
Parse a byte order: le or be (case-insensitive, see BytesEndian).
parse_diagnostic_kind
Parse a diagnostics kind filter: unresolved-indirect-jump, unresolved-indirect-call, noreturn-cut, or decode-failure (case-insensitive).
parse_raw_arch
Parse an explicit raw architecture name.
parse_raw_options
Parse the shared explicit-raw options used by the CLI (--raw --arch --base [--entry]) and MCP (raw: {arch, base, entry?}).
parse_xref_kind
Parse an xref kind filter: code, data, string, import (call sites through an import slot or stub), or inferred-code (provenance-marked single-slot resolutions).
version
Crate version, also served via CLI --version and MCP project_info.