Skip to content

Implement Human-Readable Table Formatter for String Analysis Results #27

@unclesp1d3r

Description

@unclesp1d3r

Overview

This issue tracks the implementation of a human-readable table formatter that displays string analysis results in a sorted, well-aligned tabular format. This formatter will provide users with an intuitive way to review extracted strings from binary analysis.

Context

The string analyzer needs a user-friendly output format for interactive use and manual review. While JSON and other machine-readable formats serve automation needs, developers and security researchers require a clean, sorted table view to quickly identify patterns, assess results, and make informed decisions during binary analysis workflows.

Requirements

  • Requirement ID: 6.2
  • Blocked by: Output Formatting Framework (must be implemented first)
  • Task ID: stringy-analyzer/human-readable-output

Proposed Solution

Implementation Details

  1. Create src/output/human.rs module

    • Implement a HumanFormatter struct that implements the output formatter trait
    • Integrate with the output formatting framework
  2. Table Formatting Features

    • Sort strings alphabetically or by other relevant criteria (offset, length, type)
    • Implement proper column alignment for readability
    • Support configurable column widths based on terminal size
    • Handle special characters and escape sequences properly
    • Provide headers for columns (e.g., Offset, Type, Value, Encoding)
  3. Display Capabilities

    • Format extracted strings in a clean tabular layout
    • Support optional filtering (by string type, length, etc.)
    • Implement pagination for large result sets (optional enhancement)
    • Add summary statistics (total strings found, types breakdown)

Technical Approach

  • Use Rust crate like prettytable-rs or comfy-table for table rendering
  • Implement sorting using standard library sort methods with custom comparators
  • Ensure UTF-8 handling for various string encodings
  • Make formatter configurable via command-line flags or config file

Acceptance Criteria

  • src/output/human.rs module created and integrated
  • Table displays with proper column alignment and headers
  • Results are sorted (default: alphabetically by string value)
  • Special characters are properly escaped/displayed
  • Unit tests cover:
    • Table formatting with various input sizes
    • Sorting functionality
    • Column alignment edge cases
    • Special character handling
  • Documentation includes usage examples
  • Integration with CLI argument parsing

Testing Requirements

  • Unit tests for formatter implementation
  • Integration tests with sample binary analysis output
  • Edge case testing (empty results, very long strings, special characters)
  • Performance testing with large result sets (>10k strings)

Dependencies

  • Output Formatting Framework (blocking)
  • Table rendering crate (e.g., comfy-table)
  • CLI argument parsing framework

Related Issues

  • Prerequisite: Output Formatting Framework implementation
  • Future enhancement: Support for color-coded output based on string classification

Labels

  • area:analyzer - Core analyzer functionality
  • type:enhancement - New feature
  • lang:rust - Rust implementation
  • needs:tests - Requires comprehensive test coverage
  • priority:medium - Important for v0.1 usability

Metadata

Metadata

Assignees

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions