smb

package
v3.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2023 License: MIT, Apache-2.0 Imports: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SMBClient

type SMBClient struct{}

SMBClient is a client for SMB servers.

Internally client uses github.com/zmap/zgrab2/lib/smb/smb driver. github.com/hirochachacha/go-smb2 driver

func (*SMBClient) ConnectSMBInfoMode

func (c *SMBClient) ConnectSMBInfoMode(host string, port int) (*smb.SMBLog, error)

ConnectSMBInfoMode tries to connect to provided host and port and discovery SMB information

Returns handshake log and error. If error is not nil, state will be false

func (*SMBClient) DetectSMBGhost

func (c *SMBClient) DetectSMBGhost(host string, port int) (bool, error)

DetectSMBGhost tries to detect SMBGhost vulnerability by using SMBv3 compression feature.

func (*SMBClient) ListSMBv2Metadata

func (c *SMBClient) ListSMBv2Metadata(host string, port int) (*plugins.ServiceSMB, error)

ListSMBv2Metadata tries to connect to provided host and port and list SMBv2 metadata.

Returns metadata and error. If error is not nil, state will be false

func (*SMBClient) ListShares

func (c *SMBClient) ListShares(host string, port int, user, password string) ([]string, error)

ListShares tries to connect to provided host and port and list shares by using given credentials.

Credentials cannot be blank. guest or anonymous credentials can be used by providing empty password.

Jump to

Keyboard shortcuts

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