Dosu LogoDosu Logo
Ask
Join our Discord
Organization avatar
stringyPublic
EvilBit Labs LLC
Documentsstringy
cli
cli
Type
External
Status
Published
Created
Mar 7, 2026
Updated
Mar 7, 2026
Source
docs/src/cli.md

Command Line Interface#

Current Status: Basic CLI is implemented with argument parsing. Advanced features are in development. This documentation describes both current and planned functionality.

Basic Syntax#

stringy [OPTIONS] <FILE>

Currently Implemented:

stringy <FILE> # Basic binary analysis
stringy --help # Show help information 
stringy --version # Show version

In Development:

stringy [OPTIONS] <FILE> # Full option support

Global Options#

Input/Output#

OptionDescriptionDefault
<FILE>Binary file to analyzeRequired
--output <FILE>Write output to filestdout
--format <FORMAT>Output format: human, json, yarahuman
--jsonShorthand for --format json-
--yaraShorthand for --format yara-

Filtering#

OptionDescriptionDefault
--min-len <N>Minimum string length4
--max-len <N>Maximum string length1024
--enc <ENCODINGS>Comma-separated encodingsascii,utf16
--only <TAGS>Only show these tagsAll tags
--exclude <TAGS>Exclude these tagsNone
--sections <NAMES>Only scan these sectionsAll sections
--top <N>Limit to top N results100
--allShow all results (no limit)-

Analysis Options#

OptionDescriptionDefault
--no-dedupDon't deduplicate stringsDeduplicate
--no-rankDon't apply rankingApply ranking
--debugInclude debug sectionsExclude debug
--importsInclude import namesInclude
--exportsInclude export namesInclude

Format-Specific Options#

PE (Windows) Options#

OptionDescription
--pe-versionExtract version information
--pe-manifestExtract manifest resources
--pe-stringsExtract string table resources
--utf16-onlyOnly extract UTF-16 strings

ELF (Linux) Options#

OptionDescription
--elf-notesInclude note sections
--elf-dynamicInclude dynamic section strings
--elf-debugInclude DWARF debug info

Mach-O (macOS) Options#

OptionDescription
--macho-lcInclude load command strings
--macho-fatProcess all architectures in fat binary

Encoding Options#

Supported Encodings#

EncodingDescriptionAlias
ascii7-bit ASCIIa
utf8UTF-8 (includes ASCII)u8
utf16UTF-16 (both endians)u16
utf16leUTF-16 Little Endianu16le
utf16beUTF-16 Big Endianu16be

Examples#

# ASCII only
stringy --enc ascii binary

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

# Multiple encodings
stringy --enc ascii,utf16le,utf8 binary

Tag Filtering#

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
importImport namesCreateFileW
exportExport namesmain
versionVersion stringsv1.2.3
manifestManifest dataXML/JSON config
resourceResource stringsUI text

Examples#

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

# Exclude noisy Base64
stringy --exclude b64 binary

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

Section Filtering#

Common Section Names#

ELF Sections#

  • .rodata - Read-only data
  • .data.rel.ro - Read-only after relocation
  • .comment - Build information
  • .note.* - Various notes

PE Sections#

  • .rdata - Read-only data
  • .rsrc - Resources
  • .data - Initialized data

Mach-O Sections#

  • __TEXT,__cstring - C strings
  • __TEXT,__const - Constants
  • __DATA_CONST - Read-only data

Examples#

# High-value sections only
stringy --sections .rodata,.rdata,__cstring binary

# Resource sections
stringy --sections .rsrc app.exe

# Multiple sections
stringy --sections ".rodata,.data.rel.ro" elf_binary

Output Formats#

Human-Readable Format#

Default format for interactive use:

stringy binary

Output columns:

  • Score: Relevance ranking (0-100)
  • Offset: File offset (hex)
  • Section: Section name
  • Encoding: String encoding
  • Tags: Semantic classifications
  • String: The extracted string (truncated if long)

JSON Lines Format#

Machine-readable format:

stringy --json binary

Each line contains a JSON object:

{
  "text": "https://api.example.com",
  "encoding": "utf-8",
  "offset": 4096,
  "rva": 4096,
  "section": ".rdata",
  "length": 23,
  "tags": [
    "url"
  ],
  "score": 95,
  "source": "SectionData"
}

YARA Format#

Optimized for security rule creation:

stringy --yara binary

Output includes:

  • Properly escaped strings
  • Hex representations for binary data
  • Comments with metadata
  • Grouped by confidence level

Advanced Usage#

Pipeline Integration#

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

# Find high-confidence 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.json
stringy --json new_binary > new.json
diff <(jq -r '.text' old.json | sort) <(jq -r '.text' new.json | sort)

Performance Tuning#

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

# Memory-efficient processing
stringy --sections .rodata --enc ascii huge_binary

Configuration File#

Future versions will support configuration files:

# ~/.config/stringy/config.toml
[default]
min_len = 6
encodings = ["ascii", "utf16"]
exclude_tags = ["b64"]
top = 50

[profiles.security]
only_tags = ["url", "domain", "ipv4", "ipv6", "filepath"]
min_len = 8

[profiles.yara]
format = "yara"
min_len = 10
exclude_tags = ["import", "export"]

Usage:

stringy --profile security malware.exe

Exit Codes#

CodeMeaning
0Success
1General error
2Invalid arguments
3File not found
4Unsupported format
5Permission denied

Environment Variables#

VariableDescriptionDefault
STRINGY_CONFIGConfig file path~/.config/stringy/config.toml
STRINGY_CACHECache directory~/.cache/stringy/
NO_COLORDisable colored output-

This comprehensive CLI interface provides flexibility for both interactive analysis and automated processing workflows.

Documents
Binary Container Parsers
Binary Section Weighting and Symbol Extraction
Project Specification and Task Documentation
Section Weighting and Symbol Extraction
Stringy Binary Analyzer Specification
Stringy Project Specification
Code Quality and Formatting Tools
contributing
Developer Tooling and Quality Configurations
Developer Tooling and Quality Configurations
Documentation and Repository Naming Conventions
Kiro Automation Hooks
Rust Code Analysis and Performance Hooks
Continuous Integration and Dependency Management
AI Agent Contribution Guidelines
CI/CD Pipeline and Release Workflow
Kiro Automation Hooks
release-process
Security Analysis with CodeQL
Security Analysis with CodeQL
Memory-Mapped File I/O Abstraction
api-reference
architecture
development
getting-started
integration
release-process
safety
testing
Project Overview
product
tech
Specification-Driven Development
Documentation and Repository Naming Consistency
Project Specification and Task Documentation
Stringy Project Specification
String Extraction and Deduplication
Binary Section Weighting and Symbol Extraction
Project Specification and Task Documentation
Section Weighting and Symbol Extraction
Stringy Binary Analyzer Specification
Stringy Project Specification
tech
Testing Infrastructure and Quality Assurance
contributing
Contributor Code of Conduct
Documentation and Repository Naming Conventions
release-process
Rust Code Analysis and Performance Hooks
Stringy Binary Analyzer Specification
Stringy Project Specification
testing
AGENTS
Architecture & Design Internals
Architecture Decision Records (ADR) Summary
CHANGELOG
CLAUDE
CODE_OF_CONDUCT
CONTRIBUTING
Contributor & AI-Agent Guidelines - Stringy
GOTCHAS
Product Overview
README
Recently Opened Issues / Near-Term Planned Work
SECURITY
SKILL
SUMMARY
SUMMARY
Strategy
THIRD_PARTY_NOTICES
api
architecture
binary-formats
classification
cli
coding-style
commit-instructions
configuration
development
hooks
installation
introduction
introduction
output-formats
patterns
performance
quickstart
ranking
security
security-assurance
string-extraction
structure
testing
troubleshooting