Documentation ¶
Index ¶
- Constants
- func RegisterModule()
- type BuildEnvironment_t
- type BuildInfo_t
- type Connection
- type Flags
- type IsMaster_t
- type Module
- type Result
- type Scanner
- func (scanner *Scanner) GetName() string
- func (scanner *Scanner) GetTrigger() string
- func (scanner *Scanner) Init(flags zgrab2.ScanFlags) error
- func (scanner *Scanner) InitPerSender(senderID int) error
- func (s *Scanner) Protocol() string
- func (scanner *Scanner) Scan(target zgrab2.ScanTarget) (zgrab2.ScanStatus, interface{}, error)
- func (scanner *Scanner) StartScan(target *zgrab2.ScanTarget) (*scan, error)
Constants ¶
const ( OP_REPLY = 1 OP_UPDATE = 2001 OP_INSERT = 2002 RESERVED = 2003 OP_QUERY = 2004 OP_GET_MORE = 2005 OP_DELETE = 2006 OP_KILL_CURSORS = 2007 OP_COMMAND = 2010 OP_COMMANDREPLY = 2011 OP_MSG = 2013 QUERY_RESERVED = 1 QUERY_TAILABLEC = 2 QUERY_SLAVEOK = 4 QUERY_OPLOGREPLAY = 8 QUERY_NOCTIMEOUT = 16 QUERY_AWAITDATA = 32 QUERY_EXHAUST = 64 QUERY_PARTIAL = 128 QUERY_RESP_CUR_NOTFOUND = 1 QUERY_RESP_FAILED = 2 QUERY_RESP_SHARD_STALE = 4 QUERY_RESP_AWAIT_CAP = 8 MSGHEADER_LEN = 16 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BuildEnvironment_t ¶
type BuildEnvironment_t struct { Distmod string `bson:"distmod,omitempty" json:"dist_mod,omitempty"` Distarch string `bson:"distarch,omitempty" json:"dist_arch,omitempty"` Cc string `bson:"cc,omitempty" json:"cc,omitempty"` CcFlags string `bson:"ccflags,omitempty" json:"cc_flags,omitempty"` Cxx string `bson:"cxx,omitempty" json:"cxx,omitempty"` CxxFlags string `bson:"cxxflags,omitempty" json:"cxx_flags,omitempty"` LinkFlags string `bson:"linkflags,omitempty" json:"link_flags,omitempty"` TargetArch string `bson:"target_arch,omitempty" json:"target_arch,omitempty"` TargetOS string `bson:"target_os,omitempty" json:"target_os,omitempty"` }
BuildEnvironment_t holds build environment information returned by scan.
type BuildInfo_t ¶
type BuildInfo_t struct { Version string `bson:"version,omitempty" json:"version,omitempty"` GitVersion string `bson:"gitVersion,omitempty" json:"git_version,omitempty"` BuildEnvironment BuildEnvironment_t `bson:"buildEnvironment,omitempty" json:"build_environment,omitempty"` }
BuildInfo_t holds the data returned by the the buildInfo query
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
Connection holds the state for a single connection within a scan.
func (*Connection) ReadMsg ¶
func (conn *Connection) ReadMsg() ([]byte, error)
ReadMsg reads a full MongoDB message from the connection.
func (*Connection) Write ¶
func (conn *Connection) Write(data []byte) error
Write writes a full message to the connection.
type Flags ¶
type Flags struct {
zgrab2.BaseFlags
}
Flags contains mongodb-specific command-line flags.
type IsMaster_t ¶
type IsMaster_t struct { IsMaster bool `bson:"ismaster" json:"is_master"` MaxWireVersion int32 `bson:"maxWireVersion,omitempty" json:"max_wire_version,omitempty"` MinWireVersion int32 `bson:"minWireVersion,omitempty" json:"min_wire_version,omitempty"` MaxBsonObjectSize int32 `bson:"maxBsonObjectSize,omitempty" json:"max_bson_object_size,omitempty"` MaxWriteBatchSize int32 `bson:"maxWriteBatchSize,omitempty" json:"max_write_batch_size,omitempty"` LogicalSessionTimeoutMinutes int32 `bson:"logicalSessionTimeoutMinutes,omitempty" json:"logical_session_timeout_minutes,omitempty"` MaxMessageSizeBytes int32 `bson:"maxMessageSizeBytes,omitempty" json:"max_message_size_bytes,omitempty"` ReadOnly bool `bson:"readOnly" json:"read_only"` }
IsMaster_t holds the data returned by an isMaster query
type Module ¶
type Module struct { }
Module implements the zgrab2.Module interface
func (*Module) Description ¶
Description returns an overview of this module.
func (*Module) NewFlags ¶
func (module *Module) NewFlags() interface{}
NewFlags provides an empty instance of the flags that will be filled in by the framework
func (*Module) NewScanner ¶
func (module *Module) NewScanner() zgrab2.Scanner
NewScanner provides a new scanner instance
type Result ¶
type Result struct { IsMaster *IsMaster_t `json:"is_master,omitempty"` BuildInfo *BuildInfo_t `json:"build_info,omitempty"` }
Result holds the data returned by a scan
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
Scanner implements the zgrab2.Scanner interface
func (*Scanner) GetTrigger ¶
GetTrigger returns the Trigger defined in the Flags.
func (*Scanner) InitPerSender ¶
InitPerSender initializes the scanner for a given sender