length.go (620B)
1 package main 2 3 import "fmt" 4 5 func length_test(pass string) { 6 7 length := len(pass); 8 fmt.Printf("Length: %d\n", length); 9 10 if (length <= 7) { 11 fmt.Printf(RED + "[!] Your password is very short! " + RESET); 12 fmt.Printf("It is vulnerable to a pure bruteforce attack\n"); 13 } else if (length <= 10) { 14 fmt.Printf(RED + "[!] Your password is short. " + RESET); 15 fmt.Printf("It is vulnerable to a pure bruteforce attack\n"); 16 } else if (length <= 20) { 17 fmt.Printf(GREEN + "[+] Your password is pretty long.\n" + RESET); 18 } else if (length <= 30) { 19 fmt.Printf(GREEN +"[+] Your password is very long!\n" + RESET); 20 } 21 }