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) PortPriority ¶
PortPriority returns true if port 9418 is the default Git daemon port.
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.