{"record":{"id":"c02fc364236b7bcb","repo":"shadow1ng/fscan","slug":"netbios-response-read-failed-w","errorCode":null,"errorMessage":"netbios_response_read_failed: %w","messagePattern":"netbios_response_read_failed: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugins/services/netbios.go","lineNumber":184,"sourceCode":"\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])\n}\n\n// queryNetBIOSSession 查询NetBIOS会话服务(TCP 139)\nfunc (p *NetBIOSPlugin) queryNetBIOSSession(ctx context.Context, host string, session *common.ScanSession) (*NetBIOSInfo, error) {\n\ttarget := fmt.Sprintf(\"%s:139\", host)\n\n\tconn, err := session.DialTCP(ctx, \"tcp\", target, session.Config.ModuleTimeout())\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"%s: %w\", i18n.GetText(\"netbios_session_connect_failed\"), err)\n\t}\n\tdefer func() { _ = conn.Close() }()\n\n\t_ = conn.SetDeadline(time.Now().Add(session.Config.ModuleTimeout()))\n\n\t// 发送SMB协商数据包","sourceCodeStart":166,"sourceCodeEnd":202,"githubUrl":"https://github.com/shadow1ng/fscan/blob/95cc12e753bf43de7004e5aef42a9ffba3934303/plugins/services/netbios.go#L166-L202","documentation":"Guard in queryNetBIOSNames: the query was sent but conn.Read of the 1024-byte response buffer failed (timeout or ICMP port-unreachable). No name-service reply arrived within the deadline, so there is nothing to parse.","triggerScenarios":"Thrown at plugins/services/netbios.go:184 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Confirm the host answers NetBIOS name queries on UDP 137","Allow UDP 137 through firewalls in both directions","Retry, as UDP responses can be dropped"],"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-14T05:17:10.506Z"}