pyrit.executor.promptgen.FuzzerResultPrinter#

class FuzzerResultPrinter(*, width: int = 100, indent_size: int = 2, enable_colors: bool = True)[source]#

Bases: object

Printer for Fuzzer generation strategy results with enhanced console formatting.

This printer displays fuzzer-specific information including successful templates, jailbreak conversations, and execution statistics in a formatted, colorized output similar to the original FuzzerAttack result display.

__init__(*, width: int = 100, indent_size: int = 2, enable_colors: bool = True)[source]#

Initialize the fuzzer result printer.

Parameters:
  • width (int) – Maximum width for text wrapping. Must be positive. Defaults to 100.

  • indent_size (int) – Number of spaces for indentation. Must be non-negative. Defaults to 2.

  • enable_colors (bool) – Whether to enable ANSI color output. Defaults to True.

Methods

__init__(*[, width, indent_size, enable_colors])

Initialize the fuzzer result printer.

print_result(result)

Print the complete fuzzer result to console.

print_templates_only(result)

Print only the successful templates (equivalent to original print_templates method).

print_result(result: FuzzerResult) None[source]#

Print the complete fuzzer result to console.

Parameters:

result (FuzzerResult) – The fuzzer result to print.

print_templates_only(result: FuzzerResult) None[source]#

Print only the successful templates (equivalent to original print_templates method).

Parameters:

result (FuzzerResult) – The fuzzer result containing templates.