shadow1ng/fscan · error

config_read_passwords_failed

config_read_passwords_failed

Error message

%s

What it means

Raised in parsePasswords when reading the -pwdf passwords file fails (missing, unreadable, or I/O error); the localized message carries the file path and wrapped cause. Only file reading, not password content, triggers it.

Source

Thrown at common/config_builder.go:147

func parsePasswords(fv *FlagVars) ([]string, error) {
	var passwords []string

	// 命令行密码(支持逗号分隔多个值,保留空格作为密码的一部分)
	if fv.Password != "" {
		for _, p := range strings.Split(fv.Password, ",") {
			p = strings.TrimSpace(p)
			if p != "" {
				passwords = append(passwords, p)
			}
		}
	}

	// 从文件读取
	if fv.PasswordsFile != "" {
		if lines, err := parsers.ReadLinesFromFile(fv.PasswordsFile); err == nil {
			passwords = append(passwords, lines...)
		} else {
			return nil, fmt.Errorf("%s", i18n.Tr("config_read_passwords_failed", fv.PasswordsFile, err))
		}
	}

	// 额外密码
	if fv.AddPasswords != "" {
		passwords = append(passwords, splitCredentialValues(fv.AddPasswords)...)
	}

	return removeDuplicate(passwords), nil
}

func splitCredentialValues(input string) []string {
	fields := strings.FieldsFunc(input, func(r rune) bool {
		return r == ',' || r == ' ' || r == '\t' || r == '\n' || r == '\r'
	})

	values := make([]string, 0, len(fields))
	for _, field := range fields {

View on GitHub (pinned to 95cc12e753)

Solutions

  1. Confirm the passwords file path is correct and readable
  2. Ensure one password per line with no binary content
  3. Use -pw to supply passwords inline as a workaround
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at common/config_builder.go:147 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/989add603c810081. Report an issue: GitHub.