Module: Ronin::Wordlists

Defined in:
lib/ronin/wordlists.rb,
lib/ronin/wordlists/cli.rb,
lib/ronin/wordlists/root.rb,
lib/ronin/wordlists/mixin.rb,
lib/ronin/wordlists/version.rb,
lib/ronin/wordlists/cache_dir.rb,
lib/ronin/wordlists/exceptions.rb,
lib/ronin/wordlists/cli/command.rb,
lib/ronin/wordlists/search_paths.rb,
lib/ronin/wordlists/wordlist_dir.rb,
lib/ronin/wordlists/wordlist_file.rb,
lib/ronin/wordlists/wordlist_repo.rb,
lib/ronin/wordlists/cli/commands/list.rb,
lib/ronin/wordlists/wordlist_metadata.rb,
lib/ronin/wordlists/cli/commands/purge.rb,
lib/ronin/wordlists/cli/wordlist_index.rb,
lib/ronin/wordlists/cli/commands/remove.rb,
lib/ronin/wordlists/cli/commands/search.rb,
lib/ronin/wordlists/cli/commands/update.rb,
lib/ronin/wordlists/cli/wordlist_option.rb,
lib/ronin/wordlists/cli/commands/download.rb,
lib/ronin/wordlists/cli/commands/completion.rb,
lib/ronin/wordlists/cli/wordlist_dir_option.rb

Overview

Top-level methods for ronin-wordlists.

Defined Under Namespace

Modules: Mixin, WordlistMetadata Classes: CLI, CacheDir, DownloadFailed, Exception, InvalidManifestFile, SearchPaths, WordlistDir, WordlistFile, WordlistNotFound, WordlistRepo

Constant Summary collapse

ROOT =

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

Path to ronin-wordlists root directory.

File.expand_path(File.join(__dir__,'..','..','..'))
VERSION =

ronin-wordlists version

'0.1.0'

Class Method Summary collapse

Class Method Details

.download(url) ⇒ Object

Downloads a new wordlist.

Parameters:

  • url (String, URI::HTTP)

    The URL of the wordlist to download.



44
45
46
# File 'lib/ronin/wordlists.rb', line 44

def self.download(url)
  @cache_dir.download(url)
end

.find(name) ⇒ String?

Finds a wordlist.

Parameters:

  • name (String)

    The wordlist file name.

Returns:

  • (String, nil)

    The path to the wordlist file.



59
60
61
# File 'lib/ronin/wordlists.rb', line 59

def self.find(name)
  @search_paths.find(name)
end

.list(pattern = '*') ⇒ Set<String>

Lists all wordlists on the system.

Parameters:

  • pattern (String) (defaults to: '*')

    Optional glob pattern to search for within the wordlist directory.

Returns:

  • (Set<String>)

    The wordlist files within the wordlist directories.



74
75
76
# File 'lib/ronin/wordlists.rb', line 74

def self.list(pattern='*')
  @search_paths.list(pattern)
end

.open(name) ⇒ Wordlist::File

Opens a wordlist.

Parameters:

  • name (String)

    The wordlist file name.

Returns:

  • (Wordlist::File)

    The opened wordlist file.

Raises:



92
93
94
# File 'lib/ronin/wordlists.rb', line 92

def self.open(name)
  @search_paths.open(name)
end