Class: Ronin::Wordlists::CLI::Commands::List Private

Inherits:
Ronin::Wordlists::CLI::Command show all
Includes:
WordlistDirOption
Defined in:
lib/ronin/wordlists/cli/commands/list.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 installed wordlists on the system.

Usage

ronin-wordlists list [options] [NAME]

Options

-d, --wordlist-dir DIR           The wordlist directory
-h, --help                       Print help information

Arguments

[NAME]                           Optional wordlist name to search for

Instance Method Summary collapse

Methods included from WordlistDirOption

included, #wordlist_dir

Instance Method Details

#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-wordlists list command.

Parameters:

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

    The optional wordlist name.



65
66
67
68
69
70
71
72
73
# File 'lib/ronin/wordlists/cli/commands/list.rb', line 65

def run(name=nil)
  wordlists = if name then wordlist_dir.list(name)
              else         wordlist_dir.list
              end

  wordlists.each do |wordlist|
    puts "  #{wordlist}"
  end
end