activemq

package
v1.42.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 21, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package activemq implements service detection for Apache ActiveMQ using the OpenWire protocol.

Detection Strategy: 1. Sends minimal WIREFORMAT_INFO frame (21 bytes):

  • 4-byte size prefix (big-endian, value = 17)
  • 1-byte type (0x01 = WIREFORMAT_INFO)
  • 8-byte magic "ActiveMQ" (ASCII)
  • 4-byte protocol version (big-endian, value = 1)
  • 4-byte empty properties (big-endian, value = 0)

2. Validates server WIREFORMAT_INFO response:

  • Minimum 17 bytes required
  • Byte 4 must be 0x01 (WIREFORMAT_INFO type)
  • Bytes 5-12 must be "ActiveMQ" (magic bytes)
  • Bytes 13-16 contain protocol version (1-12 valid range)

3. Returns Service with protocol version or wildcard CPE if version unknown

Index

Constants

View Source
const (
	ActiveMQOpenWire    = "activemq-openwire"
	ActiveMQOpenWireTLS = "activemq-openwire-tls"
	WireFormatInfo      = 0x01
	MagicBytes          = "ActiveMQ"
	MinResponseSize     = 17
	MaxProtocolVersion  = 12
	ActiveMQCPEMatch    = "cpe:2.3:a:apache:activemq:*:*:*:*:*:*:*:*"
)

Variables

This section is empty.

Functions

func DetectActiveMQ

func DetectActiveMQ(conn net.Conn, timeout time.Duration) (version int, detected bool, err error)

DetectActiveMQ performs ActiveMQ OpenWire protocol detection

Types

type Plugin

type Plugin struct{}

func (*Plugin) Name

func (p *Plugin) Name() string

func (*Plugin) PortPriority

func (p *Plugin) PortPriority(port uint16) bool

func (*Plugin) Priority

func (p *Plugin) Priority() int

func (*Plugin) Run

func (p *Plugin) Run(conn net.Conn, timeout time.Duration, target plugins.Target) (*plugins.Service, error)

Plugin implements TCP ActiveMQ OpenWire detection

func (*Plugin) Type

func (p *Plugin) Type() plugins.Protocol

type TLSPlugin

type TLSPlugin struct{}

func (*TLSPlugin) Name

func (p *TLSPlugin) Name() string

func (*TLSPlugin) PortPriority

func (p *TLSPlugin) PortPriority(port uint16) bool

func (*TLSPlugin) Priority

func (p *TLSPlugin) Priority() int

func (*TLSPlugin) Run

func (p *TLSPlugin) Run(conn net.Conn, timeout time.Duration, target plugins.Target) (*plugins.Service, error)

TLSPlugin implements TLS ActiveMQ OpenWire detection

func (*TLSPlugin) Type

func (p *TLSPlugin) Type() plugins.Protocol

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL