Basic CLI usage
sapblob example.blob
sapblob example.blob --output recovered.pdf
sapblob example.blob --identify-type
sapblob example.blob --analyze
sapblob example.blob --json --analyze
sapblob example.blob --json --identify-type
sapblob example.blob --force
sapblob --help
sapblob --version
By default, the tool decompresses the SAP BLOB, tries to identify the
recovered payload type from magic bytes, and writes the output next to
the input file. If the type cannot be identified reliably, it falls back
to a .bin extension.
What each CLI option looks like
# Decompress and let sapblob choose the output extension
sapblob example.blob
# Write the recovered payload to an explicit path
sapblob example.blob --output recovered.pdf
# Inspect the SAP wrapper without writing output
sapblob example.blob --analyze
# Identify the recovered payload type from magic bytes
sapblob example.blob --identify-type
# Emit machine-readable JSON
sapblob example.blob --json --analyze
sapblob example.blob --json --identify-type
# Overwrite an existing output file
sapblob example.blob --output recovered.pdf --force
# Show help
sapblob --help
# Show version information
sapblob --version
Batch examples
# Linux / macOS
for f in samples/*.blob; do
sapblob "$f"
done
# Linux / macOS with explicit output directory
mkdir -p out
for f in samples/*.blob; do
base="$(basename "$f")"
sapblob "$f" --output "out/${base}.bin"
done
# PowerShell
Get-ChildItem .\samples\*.blob | ForEach-Object {
sapblob $_.FullName
}
# PowerShell with explicit output directory
New-Item -ItemType Directory -Force .\out | Out-Null
Get-ChildItem .\samples\*.blob | ForEach-Object {
sapblob $_.FullName --output (".\out\" + $_.BaseName + ".bin")
}
Batch processing is intentionally kept outside the core CLI. Shell loops
are simpler, easier to audit, and more in line with the traditional Unix
tool model.
Run the web version locally
bash ./web/build.sh
python -m http.server 8000 --directory web
That is enough for local testing. The browser version runs fully
client-side via Go WebAssembly, so uploaded files are processed locally
in the browser and are not sent to a server.
Host the web version as a static site
# Build the WebAssembly bundle
bash ./web/build.sh
# Serve the web directory locally for a final check
python -m http.server 8000 --directory web
# Then publish the contents of ./web through GitHub Pages
# or any other static site host.
No backend is required. The site only needs to serve static HTML, CSS,
JavaScript, wasm_exec.js, and the compiled
sapblob.wasm file.
Typical workflow
# 1. Inspect the blob
sapblob example.blob --analyze
# 2. Identify the recovered file type
sapblob example.blob --identify-type
# 3. Recover the original payload
sapblob example.blob
# 4. Or choose the output file explicitly
sapblob example.blob --output recovered.pdf
In practice, most users only need the default decompression path. The
analysis and identification modes are mainly there to make reverse
engineering, debugging, and validation easier.