Documentation Index
Fetch the complete documentation index at: https://projectdiscovery.sec-lab.cn/llms.txt
Use this file to discover all available pages before exploring further.
类: SMBClient
smb.SMBClient
SMBClient 是一个用于SMB服务器的客户端。
内部客户端使用 github.com/zmap/zgrab2/lib/smb/smb 驱动程序。
github.com/projectdiscovery/go-smb2 驱动程序
示例
const smb = require('nuclei/smb');
const client = new smb.SMBClient();
构造函数
构造函数
constructor
• new SMBClient(): SMBClient
SMBClient
定义于
smb.ts:17
ConnectSMBInfoMode
▸ ConnectSMBInfoMode(host, port): SMBLog
ConnectSMBInfoMode 尝试连接到提供的主机和端口
并发现SMB信息
返回握手日志和错误。如果错误不为nil,
状态将为false
SMBLog
示例
const smb = require('nuclei/smb');
const client = new smb.SMBClient();
const info = client.ConnectSMBInfoMode('acme.com', 445);
log(to_json(info));
定义于
smb.ts:31
DetectSMBGhost
▸ DetectSMBGhost(host, port): boolean
DetectSMBGhost 尝试通过使用SMBv3压缩功能
检测SMBGhost漏洞。
如果主机存在漏洞,则返回true。
boolean
示例
const smb = require('nuclei/smb');
const isSMBGhost = smb.DetectSMBGhost('acme.com', 445);
定义于
smb.ts:84
▸ ListSMBv2Metadata(host, port): ServiceSMB
ListSMBv2Metadata 尝试连接到提供的主机和端口
并列出SMBv2元数据。
返回元数据和错误。如果错误不为nil,
状态将为false
ServiceSMB
示例
const smb = require('nuclei/smb');
const client = new smb.SMBClient();
const metadata = client.ListSMBv2Metadata('acme.com', 445);
log(to_json(metadata));
定义于
smb.ts:49
ListShares
▸ ListShares(host, port, user): string[]
ListShares 尝试连接到提供的主机和端口
并使用给定的凭据列出共享。
凭据不能为空。访客或匿名凭据
可以通过提供空密码来使用。
| 名称 | 类型 |
|---|
host | string |
port | number |
user | string |
string[]
示例
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);
}
定义于
smb.ts:69