Class: Ronin::Recon::CLI::Commands::Workers Private

Inherits:
Ronin::Recon::CLI::Command show all
Defined in:
lib/ronin/recon/cli/commands/workers.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.

Lists the available recon workers.

Usage

ronin-recon help [options]

Options

-h, --help Print help information

Arguments

[COMMAND] Command name to lookup

Instance Method Summary collapse

Instance Method Details

#run(dir = 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 workers command.

Parameters:

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

    The optional recon worker directory to list.



60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/ronin/recon/cli/commands/workers.rb', line 60

def run(dir=nil)
  files = if dir
            dir = "#{dir}/" unless dir.end_with?('/')

            Ronin::Recon.list_files.select do |file|
              file.start_with?(dir)
            end
          else
            Ronin::Recon.list_files
          end

  files.each do |file|
    puts "  #{file}"
  end
end