Skip to content

feat: Add output formats, for using in other apps#2

Draft
stripsior wants to merge 1 commit into
arch3rek:masterfrom
stripsior:master
Draft

feat: Add output formats, for using in other apps#2
stripsior wants to merge 1 commit into
arch3rek:masterfrom
stripsior:master

Conversation

@stripsior

Copy link
Copy Markdown

This pull request adds support for machine-readable output formats (JSON and CSV) to the paping tool, along with new options to control output verbosity. The changes introduce new command-line flags, refactor output functions to handle different formats, and add helper functions for proper escaping in JSON and CSV outputs.

Output format and verbosity enhancements:

  • Added a new OutputFormat enum and corresponding field in the Config struct to support human, json, and csv output formats, selectable via the --format command-line option. Also added --silent and --stats-only flags to suppress per-probe and/or banner/target output. [1] [2]
  • Updated the print_probe and print_stats functions to output results and summary statistics in the selected format (human-readable, JSON, or CSV), using new helper functions for JSON and CSV escaping. [1] [2] [3] [4]
  • Modified the main program flow to respect the new output and verbosity options, including printing CSV headers when appropriate and suppressing output as requested. [1] [2] [3] [4]

Code structure and usability improvements:

  • Refactored banner and target printing to respect new output and verbosity options, ensuring clean output for machine-readable formats and silent modes. [1] [2]
  • Improved argument parsing with helpers for string and integer extraction, and added validation for the new format and verbosity flags.

@stripsior

Copy link
Copy Markdown
Author

I don't have time to test this on my machine, as I'm leaving literally in 10 minutes for trip

@arch3rek arch3rek self-assigned this Apr 12, 2026
@arch3rek arch3rek added the enhancement New feature or request label May 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants