How nolaforensix/scalpel3-release works
Scalpel3 is a high-performance file-carving application: users provide an image and configuration, the carver scans and validates candidate files, reassembles fragmented candidates, and writes recovered output. Its domain-specific validators are designed to be added independently of the threading model. The repository also includes blockmap and checkpoint utilities, image-layout visualization, and a synthetic image generator. The README documents these capabilities; sampled source confirms the ELF ONNX inference boundary and some internal relationships, but most runtime calls and tool implementations were not inspected, so those links are omitted or documented as such.
Main entry points: carve.c Carving engine · blockmap.c Blockmap storage · scalpel.c Scalpel CLI · src File validators
Components 25
Carving runtime
- Scalpel CLI
src/scalpel.c - Carve configuration
src/scalpelconf.c - Carving engine
src/carve.c - Fragment reassembly
src/reassembly.c
Validation and inference
- File validators
src - ELF ONNX inference
src/exe_vision/unix/elf_onnx.cpp - ELF inference API
src/exe_vision/unix/elf_onnx.h - ELF singleton
src/exe_vision/unix/elf_onnx_global.c - ONNX providers
src/onnx_providers.c
Image and recovery state
- Promising candidates
src/promising_output.h - Image block access
src/filemirror.c - Blockmap storage
src/blockmap.c - Recovered output
src/scalpel_output.h
Recovery toolchain
- Create blockmap
src/crblockmap.c - Edit blockmap
src/modblockmap.c - Compare blockmaps
src/cmpblockmaps.c - Merge blockmaps
src/mergeblockmap.c - Blockmap FUSE view
src/blockmapfs.c - Header/footer database
src/dumphf.c - Block confidence database
src/dumpbt.c - Merge checkpoints
src/mergecps.c - Layout visualization
src/diskviz.c
Image simulation
- Synthetic image generator
src/fragmentator.c
Other components
- Operator
- Disk image
Connections 28
- Operator → Scalpel CLI: runs
- Disk image → Scalpel CLI: provides input
- Operator → Carve configuration: defines types
- Scalpel CLI → Carving engine: starts carving
- Carving engine → Image block access: reads image blocks
- Carving engine → Blockmap storage: uses required map
- Carving engine → File validators: validates candidates
src/carve.c - Carving engine → Fragment reassembly: dispatches reassembly
src/carve.c - Carving engine → Promising candidates: queues candidates
src/carve.c - Carving engine → Recovered output: writes recovery
- File validators → ELF singleton: uses optional inference
src/exe_vision/unix/elf_onnx_global.c - ELF singleton → ELF inference API: creates handle
src/exe_vision/unix/elf_onnx_global.c - ELF inference API → ELF ONNX inference: exposes inference
src/exe_vision/unix/elf_onnx.h - ELF ONNX inference → ONNX providers: selects provider
src/exe_vision/unix/elf_onnx.cpp - Operator → Create blockmap: creates map
- Create blockmap → Blockmap storage: produces
- Operator → Edit blockmap: edits map
- Edit blockmap → Blockmap storage: updates
- Operator → Compare blockmaps: compares maps
- Operator → Merge blockmaps: combines maps
- Operator → Blockmap FUSE view: mounts view
- Blockmap FUSE view → Blockmap storage: reads coverage
- Operator → Header/footer database: inspects locations
- Operator → Block confidence database: inspects confidence
- Operator → Merge checkpoints: merges checkpoints
- Operator → Synthetic image generator: generates test image
- Synthetic image generator → Layout visualization: supplies layouts
- Operator → Layout visualization: visualizes layouts