Class: Masscan::Banner

Inherits:
Struct
  • Object
show all
Defined in:
lib/masscan/banner.rb

Overview

Represents a banner record.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(protocol:, port:, ttl: nil, ip:, timestamp:, app_protocol:, payload:) ⇒ Banner

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.

Initializes the banner.

Parameters:

  • protocol (:icmp, :tcp, :udp, :sctp)

    The IP protocol.

  • port (Integer)

    The port number.

  • ttl (Integer, nil) (defaults to: nil)

    The optional TTL.

  • ip (IPAddr)

    The IP address.

  • timestamp (Time)

    The record timestamp.

  • app_protocol (Symbol)

    The application protocol.

  • payload (String)

    The banner/capture payload.



35
36
37
# File 'lib/masscan/banner.rb', line 35

def initialize(protocol: , port: , ttl: nil, ip: , timestamp: , app_protocol: , payload: )
  super(protocol,port,ttl,ip,timestamp,app_protocol,payload)
end

Instance Attribute Details

#app_protocolObject Also known as: service

Returns the value of attribute app_protocol

Returns:

  • (Object)

    the current value of app_protocol



7
8
9
# File 'lib/masscan/banner.rb', line 7

def app_protocol
  @app_protocol
end

#ipObject

Returns the value of attribute ip

Returns:

  • (Object)

    the current value of ip



7
8
9
# File 'lib/masscan/banner.rb', line 7

def ip
  @ip
end

#payloadObject Also known as:

Returns the value of attribute payload

Returns:

  • (Object)

    the current value of payload



7
8
9
# File 'lib/masscan/banner.rb', line 7

def payload
  @payload
end

#portObject

Returns the value of attribute port

Returns:

  • (Object)

    the current value of port



7
8
9
# File 'lib/masscan/banner.rb', line 7

def port
  @port
end

#protocolObject

Returns the value of attribute protocol

Returns:

  • (Object)

    the current value of protocol



7
8
9
# File 'lib/masscan/banner.rb', line 7

def protocol
  @protocol
end

#timestampObject

Returns the value of attribute timestamp

Returns:

  • (Object)

    the current value of timestamp



7
8
9
# File 'lib/masscan/banner.rb', line 7

def timestamp
  @timestamp
end

#ttlObject

Returns the value of attribute ttl

Returns:

  • (Object)

    the current value of ttl



7
8
9
# File 'lib/masscan/banner.rb', line 7

def ttl
  @ttl
end