shadow1ng/fscan · error
netbios_name_connect_failed: %w
Error message
netbios_name_connect_failed: %w
What it means
Guard in queryNetBIOSNames: net.DialTimeout failed to open a UDP 'connection' to host:137 within the module timeout, so the name-service query was never sent. Typically the host is unreachable, the port is filtered, or the timeout is too short for the path.
Source
Thrown at plugins/services/netbios.go:169
return strings.Join(parts, " ")
}
// queryNetBIOSNames 查询NetBIOS名称服务(UDP 137)
func (p *NetBIOSPlugin) queryNetBIOSNames(host string, config *common.Config, state *common.State) (*NetBIOSInfo, error) {
// NetBIOS名称查询数据包
queryPacket := []byte{
0x66, 0x66, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x20, 0x43, 0x4B, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,
0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,
0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x00, 0x00, 0x21, 0x00, 0x01,
}
target := fmt.Sprintf("%s:137", host)
conn, err := net.DialTimeout("udp", target, config.ModuleTimeout())
if err != nil {
return nil, fmt.Errorf("%s: %w", i18n.GetText("netbios_name_connect_failed"), err)
}
state.IncrementUDPPacketCount()
defer func() { _ = conn.Close() }()
_ = conn.SetDeadline(time.Now().Add(config.ModuleTimeout()))
_, err = conn.Write(queryPacket)
if err != nil {
return nil, fmt.Errorf("%s: %w", i18n.GetText("netbios_query_send_failed"), err)
}
response := make([]byte, 1024)
n, err := conn.Read(response)
if err != nil {
return nil, fmt.Errorf("%s: %w", i18n.GetText("netbios_response_read_failed"), err)
}
return p.parseNetBIOSNames(response[:n])View on GitHub (pinned to 95cc12e753)
Solutions
- Verify host reachability and that UDP 137 is not filtered by a firewall
- Increase the module timeout for slow links
- Confirm the target is a Windows/Samba host that answers NetBIOS
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at plugins/services/netbios.go:169 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of shadow1ng/fscan@95cc12e753 (2026-09-06).
Data as JSON: /api/errors/5a966179bd9aa327.
Report an issue: GitHub.