Class: Ronin::UI::CLI::Commands::Creds
- Inherits:
-
ResourcesCommand
- Object
- Thor::Group
- Ronin::UI::CLI::Command
- ModelCommand
- ResourcesCommand
- Ronin::UI::CLI::Commands::Creds
- Defined in:
- lib/ronin/ui/cli/commands/creds.rb
Overview
The ronin-creds
command.
Instance Method Summary collapse
-
#execute ⇒ Object
Queries the Credential model.
-
#print_resource(cred) ⇒ Object
protected
Prints a credential.
Methods inherited from ResourcesCommand
Methods inherited from ModelCommand
each_query_option, model, #query, query_option, query_options, #setup
Methods inherited from Ronin::UI::CLI::Command
banner, command_name, #indent, inherited, #initialize, #print_array, #print_exception, #print_hash, #print_section, #print_title, #puts, run, #setup
Constructor Details
This class inherits a constructor from Ronin::UI::CLI::Command
Instance Method Details
#execute ⇒ Object
Queries the Credential model.
53 54 55 56 57 |
# File 'lib/ronin/ui/cli/commands/creds.rb', line 53 def execute if .list? super end end |
#print_resource(cred) ⇒ Object (protected)
Prints a credential.
69 70 71 72 73 74 75 76 77 78 |
# File 'lib/ronin/ui/cli/commands/creds.rb', line 69 def print_resource(cred) case cred when ServiceCredential puts "#{cred}\t(#{cred.open_port.ip_address} #{cred.open_port})" when WebCredential puts "#{cred}\t(#{cred.url})" else super(cred) end end |