jetdirect

package
v1.37.0 Latest Latest
Warning

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

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

Documentation

Overview

Package jetdirect implements JetDirect/PJL printer detection.

Detection Strategy: Phase 1: Send UEL + PJL INFO ID probe to identify PJL-aware printers.

  • The UEL escape sequence (\x1b%-12345X) resets the printer to PJL mode.
  • @PJL INFO ID requests the printer's identification string.
  • Valid responses contain @PJL INFO ID followed by a quoted model string.

Phase 2: Enrichment (best-effort, failures do not affect detection):

  • @PJL INFO STATUS for printer status code
  • @PJL FSDIRLIST to detect filesystem access (security finding)

Default port: 9100 (also 9101, 9102 for additional print channels)

Wire Protocol Reference:

  • HP PJL Technical Reference Manual
  • UEL: ESC%-12345X (hex: 1B 25 2D 31 32 33 34 35 58)

Index

Constants

View Source
const (
	JETDIRECT = "jetdirect"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type JetDirectPlugin

type JetDirectPlugin struct{}

JetDirectPlugin implements the fingerprintx Plugin interface for JetDirect/PJL detection.

func (*JetDirectPlugin) Name

func (p *JetDirectPlugin) Name() string

Name returns the protocol name.

func (*JetDirectPlugin) PortPriority

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

PortPriority returns true for the standard JetDirect ports.

func (*JetDirectPlugin) Priority

func (p *JetDirectPlugin) Priority() int

Priority returns the plugin priority. Port 9100 is exclusive to JetDirect.

func (*JetDirectPlugin) Run

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

Run implements the Plugin interface. Sends PJL INFO ID probe and returns service if detected.

func (*JetDirectPlugin) Type

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

Type returns TCP as the transport protocol.

Jump to

Keyboard shortcuts

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