Class: Ronin::UI::CLI::Commands::URLs
- Inherits:
-
ResourcesCommand
- Object
- Thor::Group
- Ronin::UI::CLI::Command
- ModelCommand
- ResourcesCommand
- Ronin::UI::CLI::Commands::URLs
- Defined in:
- lib/ronin/ui/cli/commands/urls.rb
Overview
The ronin-urls
command.
Instance Method Summary collapse
-
#print_resource(url) ⇒ Object
protected
Prints a URL.
Methods inherited from ResourcesCommand
#execute, model, #print_resources
Methods inherited from ModelCommand
each_query_option, model, #query, query_option, query_options, #setup
Methods inherited from Ronin::UI::CLI::Command
banner, command_name, #execute, #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
#print_resource(url) ⇒ Object (protected)
Prints a URL.
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/ronin/ui/cli/commands/urls.rb', line 75 def print_resource(url) return super(url) unless .verbose? print_title url indent do print_hash 'Host' => url.host_name, 'Port' => url.port.number, 'Path' => url.path, 'Fragment' => url.fragment, 'Last Scanned' => url.last_scanned_at unless url.query_params.empty? params = {} url.query_params.each do |param| params[param.name] = param.value end print_hash params, :title => 'Query Params' end end end |