Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Command Line Interface

Basic Syntax

stringy [OPTIONS] <FILE>
stringy [OPTIONS] -        # read from stdin

Options

Input/Output

OptionDescriptionDefault
<FILE>Binary file to analyze (use - for stdin)-
--jsonJSONL output; conflicts with --yara-
--yaraYARA rule output; conflicts with --json-
--helpShow help-
--versionShow version-

Filtering

OptionDescriptionDefault
--min-len NMinimum string length (must be >= 1)4
--top NLimit to top N strings by score (applied after all filters)-
--enc ENCODINGFilter by encoding: ascii, utf8, utf16, utf16le, utf16beall
--only-tags TAGInclude strings with any of these tags (OR); repeatableall
--no-tags TAGExclude strings with any of these tags; repeatablenone

Mode Flags

OptionDescription
--rawExtraction-only mode (no tagging, ranking, or scoring); conflicts with --only-tags, --no-tags, --top, --debug, --yara
--summaryAppend summary block (TTY table mode only); conflicts with --json, --yara
--debugInclude score-breakdown fields (section_weight, semantic_boost, noise_penalty) in JSON output; conflicts with --raw

Encoding Options

The --enc flag accepts exactly one encoding value per invocation:

ValueDescription
ascii7-bit ASCII only
utf8UTF-8 (includes ASCII)
utf16UTF-16 (both little- and big-endian)
utf16leUTF-16 Little Endian only
utf16beUTF-16 Big Endian only

Examples

# ASCII only
stringy --enc ascii binary

# UTF-16 only (common for Windows)
stringy --enc utf16 app.exe

# UTF-8 only
stringy --enc utf8 binary

Tag Filtering

Tags are specified with the repeatable --only-tags and --no-tags flags. Repeat the flag for each tag value:

# Network indicators only
stringy --only-tags url --only-tags domain --only-tags ipv4 --only-tags ipv6 malware.exe

# Exclude noisy Base64
stringy --no-tags b64 binary

# File system related
stringy --only-tags filepath --only-tags regpath app.exe

Available Tags

TagDescriptionExample
urlHTTP/HTTPS URLshttps://api.example.com
domainDomain namesexample.com
ipv4IPv4 addresses192.168.1.1
ipv6IPv6 addresses2001:db8::1
filepathFile paths/usr/bin/app
regpathRegistry pathsHKEY_LOCAL_MACHINE\...
guidGUIDs/UUIDs{12345678-1234-...}
emailEmail addressesuser@example.com
b64Base64 dataSGVsbG8=
fmtFormat stringsError: %s
user-agent-ishUser-agent-like stringsMozilla/5.0 ...
demangledDemangled symbolsstd::io::Read::read
importImport namesCreateFileW
exportExport namesmain
versionVersion stringsv1.2.3
manifestManifest dataXML/JSON config
resourceResource stringsUI text
dylib-pathDynamic library paths/usr/lib/libfoo.dylib
rpathRuntime search paths/usr/local/lib
rpath-varRpath variables@loader_path/../lib
framework-pathFramework paths (macOS)/System/Library/Frameworks/...

Output Formats

Table (Default, TTY)

When stdout is a TTY, results are shown as a table with columns:

String | Tags | Score | Section

When piped (non-TTY), output is plain text with one string per line and no headers.

JSON Lines (--json)

Each line is a JSON object with full metadata. See Output Formats for the schema.

YARA (--yara)

Generates a YARA rule template. See Output Formats for details.

Exit Codes

CodeMeaning
0Success (including unknown binary format, empty binary, no filter matches)
1General runtime error
2Configuration or validation error (tag overlap, --summary in non-TTY)
3File not found
4Permission denied

Clap argument parsing errors (invalid flag, flag conflict, invalid tag name) use clap’s own exit code (typically 2).

Advanced Usage

Pipeline Integration

# Extract URLs and check them
stringy --only-tags url --json binary | jq -r '.text' | xargs -I {} curl -I {}

# Find high-score strings
stringy --json binary | jq 'select(.score > 80)'

# Count strings by tag
stringy --json binary | jq -r '.tags[]' | sort | uniq -c

Batch Processing

# Process multiple files
find /path/to/binaries -type f -exec stringy --json {} \; > all_strings.jsonl

# Compare two versions
stringy --json old_binary > old.jsonl
stringy --json new_binary > new.jsonl
diff <(jq -r '.text' old.jsonl | sort) <(jq -r '.text' new.jsonl | sort)

Focused Analysis

# Fast scan for high-value strings only
stringy --top 20 --min-len 8 --only-tags url --only-tags guid --only-tags filepath large_binary

# Extraction-only mode (no classification overhead)
stringy --raw binary