Class: Ronin::Recon::CLI::Commands::Worker Private
- Inherits:
-
WorkerCommand
- Object
- Core::CLI::Command
- Ronin::Recon::CLI::Command
- WorkerCommand
- Ronin::Recon::CLI::Commands::Worker
- 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
Instance Attribute Summary
Attributes inherited from WorkerCommand
Instance Method Summary collapse
-
#print_worker(worker) ⇒ Object
private
Prints the metadata for a recon worker class.
-
#run(name = nil) ⇒ Object
private
Runs the
ronin-recon worker
command.
Methods included from Printing
#format_value, #print_value, #value_class_name
Methods inherited from WorkerCommand
#load_worker, #load_worker_from
Instance Method Details
#print_worker(worker) ⇒ 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.
Prints the metadata for a recon worker class.
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 (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.
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 |