shadow1ng/fscan · error
config_targets_parse_failed
config_targets_parse_failed
Error message
%s: %w
What it means
Wrapper in BuildConfig: parseTargets failed while resolving -h/-hf hosts, -p ports, and -u/-uf URL targets into the scan target set; the localized 'config_targets_parse_failed'-style prefix is joined with the underlying cause.
Source
Thrown at common/config_builder.go:38
*/
// BuildConfig 从 FlagVars 构建完整的 Config 和 State
// 这是新的统一入口,替代原来的 Parse() + BuildConfigFromFlags() + updateGlobalVariables()
func BuildConfig(fv *FlagVars, info *HostInfo) (*Config, *State, error) {
// 1. 构建基础 Config(从 flag_config.go 的 BuildConfigFromFlags)
cfg := BuildConfigFromFlags(fv)
// 2. 创建 State
state := NewState()
// 3. 解析凭据
if err := parseCredentials(fv, cfg); err != nil {
return nil, nil, fmt.Errorf("%s: %w", i18n.GetText("config_credentials_parse_failed"), err)
}
// 4. 解析目标(主机、端口、URL)
if err := parseTargets(fv, info, cfg, state); err != nil {
return nil, nil, fmt.Errorf("%s: %w", i18n.GetText("config_targets_parse_failed"), err)
}
// 5. 应用日志级别
applyLogLevelFromConfig(fv)
return cfg, state, nil
}
// =============================================================================
// 凭据解析
// =============================================================================
func parseCredentials(fv *FlagVars, cfg *Config) error {
// 解析用户名
usernames, err := parseUsernames(fv)
if err != nil {
return err
}View on GitHub (pinned to 95cc12e753)
Solutions
- Check host/URL target files exist and contain valid entries
- Fix CIDR/IP-range syntax in the -h argument
- Inspect the wrapped error for the specific target that failed
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at common/config_builder.go:38 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/39fd6f795e2f0d74.
Report an issue: GitHub.