{"record":{"id":"88b435628e3c4480","repo":"shadow1ng/fscan","slug":"netbios-port-only","errorCode":null,"errorMessage":"netbios_port_only","messagePattern":"netbios_port_only","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugins/services/netbios.go","lineNumber":44,"sourceCode":"\treturn &NetBIOSPlugin{\n\t\tBasePlugin: plugins.NewBasePlugin(\"netbios\"),\n\t}\n}\n\n// GetPorts 实现Plugin接口\n\n// Scan 执行NetBIOS扫描 - 收集Windows主机和域信息\nfunc (p *NetBIOSPlugin) Scan(ctx context.Context, info *common.HostInfo, session *common.ScanSession) *ScanResult {\n\tconfig := session.Config\n\tstate := session.State\n\ttarget := info.Target()\n\n\t// 检查端口类型\n\tif info.Port != 137 && info.Port != 139 {\n\t\treturn &ScanResult{\n\t\t\tSuccess: false,\n\t\t\tService: \"netbios\",\n\t\t\tError:   fmt.Errorf(\"%s\", i18n.GetText(\"netbios_port_only\")),\n\t\t}\n\t}\n\n\tvar netbiosInfo *NetBIOSInfo\n\tvar err error\n\n\tif info.Port == 137 {\n\t\t// UDP端口137 - NetBIOS名称服务\n\t\tnetbiosInfo, err = p.queryNetBIOSNames(info.Host, config, state)\n\t} else {\n\t\t// TCP端口139 - NetBIOS会话服务\n\t\tnetbiosInfo, err = p.queryNetBIOSSession(ctx, info.Host, session)\n\t}\n\n\tif err != nil {\n\t\treturn &ScanResult{\n\t\t\tSuccess: false,\n\t\t\tService: \"netbios\",","sourceCodeStart":26,"sourceCodeEnd":62,"githubUrl":"https://github.com/shadow1ng/fscan/blob/95cc12e753bf43de7004e5aef42a9ffba3934303/plugins/services/netbios.go#L26-L62","documentation":"Guard in NetBIOSPlugin.Scan: the scan only operates on UDP 137 (name service) and TCP 139 (session service), but info.Port held a different port. The plugin declines to run and returns this sentinel error so the scheduler can route the port elsewhere.","triggerScenarios":"Thrown at plugins/services/netbios.go:44 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Run the netbios plugin only against ports 137 or 139","Check port-configuration/service-mapping if NetBIOS was expected on this port"],"exampleFix":null,"handlingStrategy":"validation","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"}