{"record":{"id":"5a966179bd9aa327","repo":"shadow1ng/fscan","slug":"netbios-name-connect-failed-w","errorCode":null,"errorMessage":"netbios_name_connect_failed: %w","messagePattern":"netbios_name_connect_failed: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugins/services/netbios.go","lineNumber":169,"sourceCode":"\n\treturn strings.Join(parts, \" \")\n}\n\n// queryNetBIOSNames 查询NetBIOS名称服务(UDP 137)\nfunc (p *NetBIOSPlugin) queryNetBIOSNames(host string, config *common.Config, state *common.State) (*NetBIOSInfo, error) {\n\t// NetBIOS名称查询数据包\n\tqueryPacket := []byte{\n\t\t0x66, 0x66, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t\t0x20, 0x43, 0x4B, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,\n\t\t0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,\n\t\t0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x00, 0x00, 0x21, 0x00, 0x01,\n\t}\n\n\ttarget := fmt.Sprintf(\"%s:137\", host)\n\n\tconn, err := net.DialTimeout(\"udp\", target, config.ModuleTimeout())\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"%s: %w\", i18n.GetText(\"netbios_name_connect_failed\"), err)\n\t}\n\tstate.IncrementUDPPacketCount()\n\tdefer func() { _ = conn.Close() }()\n\n\t_ = conn.SetDeadline(time.Now().Add(config.ModuleTimeout()))\n\n\t_, err = conn.Write(queryPacket)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"%s: %w\", i18n.GetText(\"netbios_query_send_failed\"), err)\n\t}\n\n\tresponse := make([]byte, 1024)\n\tn, err := conn.Read(response)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"%s: %w\", i18n.GetText(\"netbios_response_read_failed\"), err)\n\t}\n\n\treturn p.parseNetBIOSNames(response[:n])","sourceCodeStart":151,"sourceCodeEnd":187,"githubUrl":"https://github.com/shadow1ng/fscan/blob/95cc12e753bf43de7004e5aef42a9ffba3934303/plugins/services/netbios.go#L151-L187","documentation":"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.","triggerScenarios":"Thrown at plugins/services/netbios.go:169 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"95cc12e753bf43de7004e5aef42a9ffba3934303","analyzedAt":"2026-09-06T17:07:30.094Z","contentChangedAt":"2026-09-06T17:07:30.094Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}