feat: updated with goroutines

This commit is contained in:
Darwin
2026-02-24 11:56:28 -05:00
parent 66a2eb9546
commit 042bfac734
2 changed files with 92 additions and 26 deletions

View File

@@ -47,7 +47,7 @@ func Check(input string, wordList, passwordList []string) (string, error) {
// Check if password is in common passwords
for _, entry := range passwordList {
if strings.Contains(strings.ToLower(entry), strings.ToLower(input)) {
if strings.Contains(strings.ToLower(entry), strings.ToLower(input)) && len(entry) > 3 {
return "Weak password", fmt.Errorf("password found inside common passwords")
}
}