package
0.0.0-20240523144707-f5b61b103af6
Repository: https://github.com/packetloop/zgrab2.git
Documentation: pkg.go.dev
# Functions
RegisterModule registers the module with zgrab2.
# Constants
Broadcast is an AssociationMode indicating that the this is a broadcast packet.
Client is an AssociationMode indicating that the caller is a client.
Control is an AssociationMode reserved for NTP control messages.
ExtraSecond is a LeapIndicator that indicates that the last minute has 61 seconds.
ImplUniv corresponds to the IMPL_UNIV constant.
ImplXNTPD corresponds to the IMPL_XNTPD constant.
ImplXNTPDOld corresponds to the IMPL_XNTPD_OLD constant.
InfoErrorAuth corresponds to the INFO_ERR_AUTH constant.
InfoErrorFmt corresponds to the INFO_ERR_FMT constant.
InfoErrorImpl corresponds to the INFO_ERR_IMPL constant.
InfoErrorNoData corresponds to the INFO_ERR_NODATA constant.
InfoErrorOkay corresponds to the INFO_OKAY constant.
InfoErrorReq corresponds to the INFO_ERR_REQ constant.
InfoErrorUnknown5 has no corresponding constant (it is the unused value 5).
InfoErrorUnknown6 has no corresponding constant (it is the unused value 6).
MissingSecond is a LeapIndicator that indicates that the last minute has 59 seconds.
NoWarning is a LeapIndicator that indicates that there is no problem.
Private is an AssociationMode reserved for private use.
ReqAddTrap corresponds to the REQ_ADD_TRAP constant.
ReqAuthInfo corresponds to the REQ_AUTH_INFO constant.
ReqClrSysFlag corresponds to the REQ_CLR_SYS_FLAG constant.
ReqClrTrap corresponds to the REQ_CLR_TRAP constant.
ReqConfig corresponds to the REQ_CONFIG constant.
ReqControlKey corresponds to the REQ_CONTROL_KEY constant.
ReqDoDirtyHack corresponds to the REQ_DO_DIRTY_HACK constant.
ReqDontDirtyHack corresponds to the REQ_DONT_DIRTY_HACK constant.
ReqGetClkBugInfo corresponds to the REQ_GET_CLKBUGINFO constant.
ReqGetClockInfo corresponds to the REQ_GET_CLOCKINFO constant.
ReqGetCtlStats corresponds to the REQ_GET_CTLSTATS constant.
ReqGetKernel corresponds to the REQ_GET_KERNEL constant.
ReqGetLeapInfo corresponds to the REQ_GET_LEAPINFO constant.
ReqGetRestrict corresponds to the REQ_GET_RESTRICT constant.
ReqHostnameAssocID corresponds to the REQ_HOSTNAME_ASSOCID constant.
ReqIfReload corresponds to the REQ_IF_RELOAD constant.
ReqIfStats corresponds to the REQ_IF_STATS constant.
ReqIOStats corresponds to the REQ_IO_STATS constant.
ReqLoopInfo corresponds to the REQ_LOOP_INFO constant.
ReqMemStats corresponds to the REQ_MEM_STATS constant.
ReqMonGetList corresponds to the REQ_MON_GETLIST constant.
ReqMonGetList1 corresponds to the REQ_MON_GETLIST_1 constant.
ReqMonitor corresponds to the REQ_MONITOR constant.
ReqNoMonitor corresponds to the REQ_NOMONITOR constant.
ReqPeerInfo corresponds to the REQ_PEER_INFO constant.
ReqPeerList corresponds to the REQ_PEER_LIST constant.
ReqPeerListSum corresponds to the REQ_PEER_LIST_SUM constant.
ReqPeerStats corresponds to the REQ_PEER_STATS constant.
ReqRequestKey corresponds to the REQ_REQUEST_KEY constant.
ReqRereadKeys corresponds to the REQ_REREAD_KEYS constant.
ReqResAddFlags corresponds to the REQ_RES_ADD_FLAGS constant.
ReqResetPeer corresponds to the REQ_RESET_PEER constant.
ReqResetStats corresponds to the REQ_RESET_STATS constant.
ReqResSubFlags corresponds to the REQ_RES_SUB_FLAGS constant.
ReqSetClkFudge corresponds to the REQ_SET_CLKFUDGE constant.
ReqSetPrecision corresponds to the REQ_SET_PRECISION constant.
ReqSetSysFlag corresponds to the REQ_SET_SYS_FLAG constant.
ReqSysInfo corresponds to the REQ_SYS_INFO constant.
ReqSysStats corresponds to the REQ_SYS_STATS constant.
ReqTimerStats corresponds to the REQ_TIMER_STATS constant.
ReqTraps corresponds to the REQ_TRAPS constant.
ReqTrustKey corresponds to the REQ_TRUST_KEY constant.
ReqUnconfig corresponds to the REQ_UNCONFIG constant.
ReqUnrestrict corresponds to the REQ_UNRESTRICT constant.
ReqUntrustKey corresponds to the REQ_UNTRUST_KEY constant.
Reserved is a reserved AssociationMode.
Server is an AssociationMode indicating that the packet is to be interpreted as a server.
SymmetricActive is an AssociationMode indicating that the service is in the active symmetric mode.
SymmetricPassive is an AssociationMode indicating that the service is in the passive symmetric mode.
Unknown is a LeapIndicator that indicates an unknown alarm condition.
# Variables
ErrBufferTooSmall is returned if a buffer is not large enough to contain the input.
ErrInvalidHeader is returned if the header cannot be interpreted as a valid NTP header.
ErrInvalidLeapIndicator is returned if an invalid LeapIndicator is found.
ErrInvalidMode is returned if an invalid mode identifier is found.
ErrInvalidReferenceID is returned if an invalid reference ID is found (i.e.
ErrInvalidRequestCode is returned if an invalid RequestCode is found.
ErrInvalidResponse is returned if the response cannot be interpreted as a valid NTP response.
ErrInvalidStratum is returned if an invalid stratum identifier is found.
ErrInvalidVersion is returned if an invalid version number is found.
# Structs
Flags holds the command-line flags for the scanner.
Module is the zgrab2 module implementation.
NTPHeader is defined in figure 8 of RFC5905.
NTPLong is a 64-bit fixed-length number defined in figure 3 of RFC5905.
NTPShort a 32-bit struct defined in figure 3 of RFC5905.
PrivatePacketHeader represents a header for a mode-7 packet, roughly corresponding to struct resp_pkt in ntp_request.h.
Results is the struct that is returned to the zgrab2 framework from Scan().
Scanner holds the state for a single scan.
# Type aliases
AssociationMode is a three-bit value, whose values are defined in figure 9 of https://tools.ietf.org/html/rfc5905.
ImplNumber is an 8-bit value used in Private packets.
InfoError is a 3-bit integer, values taken from ntp_request.h.
LeapIndicator is a two-bit field, whose values are defined in figure 9 of https://tools.ietf.org/html/rfc5905.
ReferenceID is defined in RFC5905 as a 32-bit code whose interpretation depends on the stratum field.
RequestCode is an 8-bit value used in Private packets, from ntp/include/ntp_request.h.