Class: Ronin::Recon::CLI::Commands::Worker Private

Inherits:
WorkerCommand show all
Includes:
CommandKit::Printing::Lists, Core::CLI::Printing::Metadata, Core::CLI::Printing::Params, Printing
Defined in:
lib/ronin/recon/cli/commands/worker.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Prints information about a recon worker.

Usage

ronin-recon worker [options] {--file FILE | NAME}

Options

-f, --file FILE                  The recon worker file to load
-v, --verbose                    Enables verbose output
-h, --help                       Print help information

Arguments

[NAME]                           The recon worker to load

Constant Summary

Constants included from Printing

Printing::VALUE_CLASS_NAMES

Instance Attribute Summary

Attributes inherited from WorkerCommand

#worker_class

Instance Method Summary collapse

Methods included from Printing

#format_value, #print_value, #value_class_name

Methods inherited from WorkerCommand

#load_worker, #load_worker_from

Instance Method Details

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Prints the metadata for a recon worker class.

Parameters:



80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# File 'lib/ronin/recon/cli/commands/worker.rb', line 80

def print_worker(worker)
  puts "[ #{worker.id} ]"
  puts

  indent do
    puts "Summary: #{worker.summary}" if worker.summary

    print_authors(worker)
    print_description(worker)

    puts 'Accepts:'
    puts
    indent do
      print_list(worker.accepts.map(&method(:value_class_name)))
    end
    puts

    puts 'Outputs:'
    puts
    indent do
      print_list(worker.outputs.map(&method(:value_class_name)))
    end
    puts

    puts "Intensity: #{worker.intensity}"

    print_params(worker)
  end
end

#run(name = nil) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Runs the ronin-recon worker command.

Parameters:

  • name (String, nil) (defaults to: nil)

    The optional worker name to load and print metadata for.



68
69
70
71
72
# File 'lib/ronin/recon/cli/commands/worker.rb', line 68

def run(name=nil)
  super(name)

  print_worker(worker_class)
end