Skip to main content

Class: SMBClient

smb.SMBClient SMBClient is a client for SMB servers. Internally client uses github.com/zmap/zgrab2/lib/smb/smb driver. github.com/projectdiscovery/go-smb2 driver Example

Table of contents

Constructors

Methods

Constructors

constructor

• new SMBClient(): SMBClient

Returns

SMBClient

Defined in

smb.ts:17

Methods

ConnectSMBInfoMode

▸ ConnectSMBInfoMode(host, port): SMBLog 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

Parameters

Returns

SMBLog Example

Defined in

smb.ts:31

DetectSMBGhost

▸ DetectSMBGhost(host, port): boolean DetectSMBGhost tries to detect SMBGhost vulnerability by using SMBv3 compression feature. If the host is vulnerable, it returns true.

Parameters

Returns

boolean Example

Defined in

smb.ts:84

ListSMBv2Metadata

▸ ListSMBv2Metadata(host, port): ServiceSMB 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

Parameters

Returns

ServiceSMB Example

Defined in

smb.ts:49

ListShares

▸ ListShares(host, port, user): string[] 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.

Parameters

Returns

string[] Example

Defined in

smb.ts:69