Documentation ¶
Overview ¶
Warning - This is generated code
Warning - This is generated code ¶
Warning - This is generated code
Index ¶
- type SMBClient
- func (c *SMBClient) ConnectSMBInfoMode(host string, port int) (*smb.SMBLog, error)
- func (c *SMBClient) DetectSMBGhost(host string, port int) (bool, error)
- func (c *SMBClient) ListSMBv2Metadata(host string, port int) (*plugins.ServiceSMB, error)
- func (c *SMBClient) ListShares(host string, port int, user, password string) ([]string, error)
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/projectdiscovery/go-smb2 driver @example ```javascript const smb = require('nuclei/smb'); const client = new smb.SMBClient(); ```
func (*SMBClient) ConnectSMBInfoMode ¶
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 @example ```javascript const smb = require('nuclei/smb'); const client = new smb.SMBClient(); const info = client.ConnectSMBInfoMode('acme.com', 445); log(to_json(info)); ```
func (*SMBClient) DetectSMBGhost ¶
DetectSMBGhost tries to detect SMBGhost vulnerability by using SMBv3 compression feature. If the host is vulnerable, it returns true. @example ```javascript const smb = require('nuclei/smb'); const isSMBGhost = smb.DetectSMBGhost('acme.com', 445); ```
func (*SMBClient) ListSMBv2Metadata ¶
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 @example ```javascript const smb = require('nuclei/smb'); const client = new smb.SMBClient(); const metadata = client.ListSMBv2Metadata('acme.com', 445); log(to_json(metadata)); ```
func (*SMBClient) ListShares ¶
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. @example ```javascript const smb = require('nuclei/smb'); const client = new smb.SMBClient(); const shares = client.ListShares('acme.com', 445, 'username', 'password');
for (const share of shares) { log(share); }
```