Module: Ronin::Wordlists::Mixin

Defined in:
lib/ronin/wordlists/mixin.rb

Overview

Wordlist helper methods.

Instance Method Summary collapse

Instance Method Details

#wordlists_download(url) ⇒ Object Also known as: download_wordlist

Downloads a new wordlist.

Parameters:

  • url (String, URI::HTTP)

    The URL of the wordlist to download.

See Also:



39
40
41
# File 'lib/ronin/wordlists/mixin.rb', line 39

def wordlists_download(url)
  Wordlists.download(url)
end

#wordlists_find(name) ⇒ String? Also known as: find_wordlist

Finds a wordlist.

Parameters:

  • name (String)

    The wordlist file name.

Returns:

  • (String, nil)

    The path to the wordlist file.

See Also:



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

def wordlists_find(name)
  Wordlists.find(name)
end

#wordlists_list(pattern = '*') ⇒ Set<String> Also known as: list_wordlists

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.

See Also:



77
78
79
# File 'lib/ronin/wordlists/mixin.rb', line 77

def wordlists_list(pattern='*')
  Wordlists.list(pattern)
end

#wordlists_open(name) ⇒ Wordlist::File Also known as: open_wordlist

Opens a wordlist.

Parameters:

  • name (String)

    The wordlist file name.

Returns:

  • (Wordlist::File)

    The opened wordlist file.

Raises:

See Also:



99
100
101
# File 'lib/ronin/wordlists/mixin.rb', line 99

def wordlists_open(name)
  Wordlists.open(name)
end