Class: Ronin::CLI::Commands::EmailAddr Private
- Inherits:
-
ValueProcessorCommand
- Object
- Core::CLI::Command
- Ronin::CLI::Command
- ValueProcessorCommand
- Ronin::CLI::Commands::EmailAddr
- Defined in:
- lib/ronin/cli/commands/email_addr.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.
Processes email addresses.
Usage
ronin email-addr [options] [EMAIL_ADDR ...]
Options
-f, --file FILE Optional file to read values from
-O, --obfuscate Obfuscates the email address(es)
--enum-obfuscations Enumerate over every obfuscation
-D, --deobfuscate Deobfuscates the email address(es)
-n, --name Extracts the name part of the email address(es)
-m, --mailbox Extracts the mailbox part of the email address(es)
-d, --domain Extracts the domain part of the email address(es)
-N, --normalize Normalizes the email address(es)
-h, --help Print help information
Arguments
[EMAIL_ADDR ...] The email address(es) to process
Examples
ronin email-addr --deobfuscate "john{DOT}smith{AT}example{DOT}com"
ronin email-addr --input emails.txt --domain
Instance Attribute Summary
Attributes inherited from ValueProcessorCommand
Instance Method Summary collapse
-
#process_value(string) ⇒ Object
private
Processes an individual email address.
Methods inherited from ValueProcessorCommand
#initialize, #process_file, #run
Constructor Details
This class inherits a constructor from Ronin::CLI::ValueProcessorCommand
Instance Method Details
#process_value(string) ⇒ 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 an individual email address.
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
# File 'lib/ronin/cli/commands/email_addr.rb', line 99 def process_value(string) if [:deobfuscate] string = Support::Network::EmailAddress.deobfuscate(string) end email_address = Support::Network::EmailAddress.parse(string) email_address = email_address.normalize if [:normalize] if [:enum_obfuscations] email_address.each_obfuscation do || puts end elsif [:obfuscate] puts email_address.obfuscate elsif [:name] puts email_address.name elsif [:mailbox] puts email_address.mailbox elsif [:domain] puts email_address.domain else puts email_address end end |