Class: Ronin::CLI::Commands::Homoglyph Private
- Inherits:
-
ValueProcessorCommand
- Object
- Core::CLI::Command
- Ronin::CLI::Command
- ValueProcessorCommand
- Ronin::CLI::Commands::Homoglyph
- Defined in:
- lib/ronin/cli/commands/homoglyph.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.
Generates homoglyph equivalent words.
Usage
ronin homoglyph [] [WORD ...]
Options
-f, --file FILE Optional file to process
-C ascii|greek|cyrillic|punctuation|latin_numbers|full_width,
--char-set Selects the homoglyph character set
-E, --enum Enumerates over every possible typo of a word
-h, --help Print help information
Arguments
[WORD ...] Optional word(s) to homoglyph
Instance Attribute Summary
Attributes inherited from ValueProcessorCommand
Instance Method Summary collapse
-
#process_value(word) ⇒ Object
private
Processes each word.
-
#run(*words) ⇒ Object
private
Runs the
ronin homoglyph
command.
Methods inherited from ValueProcessorCommand
Constructor Details
This class inherits a constructor from Ronin::CLI::ValueProcessorCommand
Instance Method Details
#process_value(word) ⇒ 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.
Processes each word.
85 86 87 88 89 90 91 92 93 |
# File 'lib/ronin/cli/commands/homoglyph.rb', line 85 def process_value(word) if [:enum] @table.each_substitution(word) do |homoglyphed_word| puts homoglyphed_word end else puts @table.substitute(word) end end |
#run(*words) ⇒ 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 homoglyph
command.
73 74 75 76 77 |
# File 'lib/ronin/cli/commands/homoglyph.rb', line 73 def run(*words) @table = Support::Text::Homoglyph.table([:char_set]) super(*words) end |