Skip to content

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

Closed

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

Activity

  1. added this to the v0.1 milestone on Sep 30, 2025
  2. self-assigned this
    on Sep 30, 2025
  3. added theissue type on Nov 10, 2025
  4. unclesp1d3r commented on Nov 10, 2025

    @unclesp1d3r
    MemberAuthor

    @coderabbitai Enhance this issue body with additional context and a proposed solution. Improve the issue title and assign the proper labels and other metadata.

  5. changed the title [-]Human-Readable Output[/-] [+]Implement Human-Readable Table Formatter for String Analysis Results[/+] on Nov 10, 2025
  6. traycerai commented on Nov 10, 2025

    @traycerai

    Warning

    Rate limit exceeded. Please try after 2316 seconds.

  7. coderabbitai commented on Nov 10, 2025

    @coderabbitai
    Contributor

    Tip

    For best results, initiate chat on the files or code changes.

    🧩 Analysis chain

    🏁 Script executed:

    #!/bin/bash
    # Fetch the current issue details
    gh issue view 27 --json title,body,labels,assignees,milestone,state
    

    Length of output: 1293


    🏁 Script executed:

    #!/bin/bash
    # Update the issue with enhanced title and body
    
    gh issue edit 27 \
      --title "Implement Human-Readable Table Formatter for String Analysis Results" \
      --body "## 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"
    
    echo "Issue updated successfully!"
    

    Length of output: 89


    🏁 Script executed:

    #!/bin/bash
    # Try to add a priority label if available
    gh label list --search "priority" --json name,description
    

    Length of output: 125


    🏁 Script executed:

    #!/bin/bash
    # Add the priority:medium label to the issue
    gh issue edit 27 --add-label "priority:medium"
    
    echo ""
    echo "Final issue status:"
    gh issue view 27 --json title,labels,assignees --jq '{title: .title, labels: [.labels[].name], assignees: [.assignees[].login]}'
    

    Length of output: 298


    @unclesp1d3r, I've successfully enhanced issue #27 with comprehensive details! Here's what was updated:

    Title Enhancement

    Before: "Human-Readable Output"
    After: "Implement Human-Readable Table Formatter for String Analysis Results"

    Body Enhancements

    Added the following sections:

    1. Overview - Clear description of the feature's purpose
    2. Context - Explains why human-readable output is valuable for developers and security researchers
    3. Proposed Solution - Detailed technical approach including:
      • Module structure (src/output/human.rs)
      • Table formatting features (sorting, alignment, special character handling)
      • Display capabilities (filtering, pagination, summary statistics)
      • Technical recommendations (suggest using comfy-table or prettytable-rs crates)
    4. Acceptance Criteria - Checklist format for clear definition of done
    5. Testing Requirements - Comprehensive test scenarios including edge cases and performance testing
    6. Dependencies - Clear blocking relationships
    7. Related Issues - Links to prerequisites and future enhancements

    Metadata Updates

    • ✅ Added priority:medium label
    • ✅ Maintained existing labels: area:analyzer, type:enhancement, status:backlog, lang:rust, needs:tests
    • ✅ Assigned to you (unclesp1d3r)
    • ✅ Kept in milestone v0.1

    The issue is now ready for implementation with clear guidance on approach, acceptance criteria, and testing requirements! You can view it here: #27

  8. unclesp1d3r commented on Jul 4, 2026

    @unclesp1d3r
    MemberAuthor

    Implemented: human-readable table formatter in src/output/table/ (tty and plain modes). Closing as completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions