Class: Ronin::CLI::Commands::BannerGrab Private
- Inherits:
-
ValueProcessorCommand
- Object
- Core::CLI::Command
- Ronin::CLI::Command
- ValueProcessorCommand
- Ronin::CLI::Commands::BannerGrab
- Includes:
- HostAndPort
- Defined in:
- lib/ronin/cli/commands/banner_grab.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.
Fetches the banner from one or more TCP services.
Usage
ronin banner-grab [options] {HOST:PORT} ...
Options
-f, --file FILE Optional file to read values from
--with-host-port Print the service with each banner
-h, --help Print help information
Arguments
HOST:PORT ... A TCP service to fetch the banner from.
Instance Attribute Summary
Attributes inherited from ValueProcessorCommand
Instance Method Summary collapse
-
#process_value(service) ⇒ Object
private
Grabs the banner for the service.
Methods included from HostAndPort
#host_and_port, #host_and_port_from_url
Methods inherited from ValueProcessorCommand
#initialize, #process_file, #run
Constructor Details
This class inherits a constructor from Ronin::CLI::ValueProcessorCommand
Instance Method Details
#process_value(service) ⇒ 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.
Grabs the banner for the service.
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/ronin/cli/commands/banner_grab.rb', line 69 def process_value(service) host, port = host_and_port(service) begin = Support::Network::TCP.(host,port) if [:with_host_port] puts "#{service}: #{}" else puts end rescue StandardError => error print_error("#{service}: #{error.}") end end |