git

package
v1.1.0 Latest Latest
Warning

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

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

Documentation

Overview

Package git provides fingerprinting for the Git daemon service.

Git daemon serves Git repositories over TCP port 9418 using the pkt-line protocol. It provides unauthenticated read access to public repositories. Detection is performed by sending a git-upload-pack request and parsing the pkt-line ref advertisement response.

Protocol reference: https://git-scm.com/docs/pack-protocol Wire format: https://git-scm.com/docs/gitprotocol-pack

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TCPPlugin

type TCPPlugin struct{}

TCPPlugin implements the plugins.Plugin interface for Git daemon fingerprinting.

func (*TCPPlugin) Name

func (p *TCPPlugin) Name() string

Name returns the protocol identifier for this plugin.

func (*TCPPlugin) PortPriority

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

PortPriority returns true if port 9418 is the default Git daemon port.

func (*TCPPlugin) Priority

func (p *TCPPlugin) Priority() int

Priority returns the execution priority for this plugin.

func (*TCPPlugin) Run

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

Run performs Git daemon fingerprinting by sending a git-upload-pack request and parsing the pkt-line ref advertisement response.

Returns nil, nil when the target is not a Git daemon (empty response, flush-only, or ERR response). Returns a Service on successful detection.

func (*TCPPlugin) Type

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

Type returns the transport protocol used by Git daemon.

Jump to

Keyboard shortcuts

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