shadow1ng/fscan · error

%s

Error message

%s

What it means

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.

Source

Thrown at plugins/services/ldap.go:48

		return p.identifyService(ctx, info, session)
	}

	target := info.Target()

	// Hash 认证优先:检查是否配置了 Hash 和 Domain
	if len(config.Credentials.HashValues) > 0 && config.Credentials.Domain != "" {
		result := p.tryHashAuth(ctx, info, session)
		if result != nil && result.Success {
			return result
		}
	}

	credentials := GenerateCredentials("ldap", config)
	if len(credentials) == 0 {
		return &ScanResult{
			Success: false,
			Service: "ldap",
			Error:   fmt.Errorf("%s", i18n.GetText("service_no_credentials")),
		}
	}

	// 使用公共框架进行并发凭据测试
	authFn := p.createAuthFunc(info, session)
	testConfig := DefaultConcurrentTestConfigWithTarget(config, info)

	result := TestCredentialsConcurrently(ctx, credentials, authFn, "ldap", testConfig)

	if result.Success {
		session.LogVuln(i18n.Tr("ldap_credential", target, result.Username, result.Password))
	}

	return result
}

// createAuthFunc 创建LDAP认证函数
func (p *LDAPPlugin) createAuthFunc(info *common.HostInfo, session *common.ScanSession) AuthFunc {

View on GitHub (pinned to 95cc12e753)

Solutions

  1. Add ldap entries to the username and password dictionaries in the config
  2. Enable built-in default credential lists for ldap
  3. Run with --disable-brute to perform service identification only
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at plugins/services/ldap.go:48 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/b94d10d97fd9efd8. Report an issue: GitHub.