{"record":{"id":"b94d10d97fd9efd8","repo":"shadow1ng/fscan","slug":"s-b94d10","errorCode":null,"errorMessage":"%s","messagePattern":"%s","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugins/services/ldap.go","lineNumber":48,"sourceCode":"\t\treturn p.identifyService(ctx, info, session)\n\t}\n\n\ttarget := info.Target()\n\n\t// Hash 认证优先：检查是否配置了 Hash 和 Domain\n\tif len(config.Credentials.HashValues) > 0 && config.Credentials.Domain != \"\" {\n\t\tresult := p.tryHashAuth(ctx, info, session)\n\t\tif result != nil && result.Success {\n\t\t\treturn result\n\t\t}\n\t}\n\n\tcredentials := GenerateCredentials(\"ldap\", config)\n\tif len(credentials) == 0 {\n\t\treturn &ScanResult{\n\t\t\tSuccess: false,\n\t\t\tService: \"ldap\",\n\t\t\tError:   fmt.Errorf(\"%s\", i18n.GetText(\"service_no_credentials\")),\n\t\t}\n\t}\n\n\t// 使用公共框架进行并发凭据测试\n\tauthFn := p.createAuthFunc(info, session)\n\ttestConfig := DefaultConcurrentTestConfigWithTarget(config, info)\n\n\tresult := TestCredentialsConcurrently(ctx, credentials, authFn, \"ldap\", testConfig)\n\n\tif result.Success {\n\t\tsession.LogVuln(i18n.Tr(\"ldap_credential\", target, result.Username, result.Password))\n\t}\n\n\treturn result\n}\n\n// createAuthFunc 创建LDAP认证函数\nfunc (p *LDAPPlugin) createAuthFunc(info *common.HostInfo, session *common.ScanSession) AuthFunc {","sourceCodeStart":30,"sourceCodeEnd":66,"githubUrl":"https://github.com/shadow1ng/fscan/blob/95cc12e753bf43de7004e5aef42a9ffba3934303/plugins/services/ldap.go#L30-L66","documentation":"Guard in LDAPPlugin.Scan: GenerateCredentials returned no credential pairs for the ldap service (no matching entries in the configured username/password lists), so brute-force authentication is skipped and the scan ends with this sentinel error rather than attempting an empty credential loop.","triggerScenarios":"Thrown at plugins/services/ldap.go:48 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add ldap entries to the username and password dictionaries in the config","Enable built-in default credential lists for ldap","Run with --disable-brute to perform service identification only"],"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-14T05:17:10.506Z"}