class Ronin::CLI::Commands::BannerGrab
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.
Public Instance Methods
process_value(service)
click to toggle source
Grabs the banner for the service.
@param [String] service
The `HOST:PORT` service pair.
# File lib/ronin/cli/commands/banner_grab.rb, line 69 def process_value(service) host, port = host_and_port(service) begin banner = Support::Network::TCP.banner(host,port) if options[:with_host_port] puts "#{service}: #{banner}" else puts banner end rescue StandardError => error print_error("#{service}: #{error.message}") end end