diff --git a/main.go b/main.go index d2ff7b8..e2a4265 100644 --- a/main.go +++ b/main.go @@ -19,6 +19,7 @@ func main() { flagSetNumbers := flag.Bool("n", false, "use numbers") flagSetSpecialChars := flag.Bool("s", false, "use special characters") flagSetSpaces := flag.Bool("S", false, "use spaces") + flagSetUnicodeCyrillic := flag.Bool("unicode-cyrillic", false, "use unicode cyrillic characters") flagSetUnicodeJapanese := flag.Bool("unicode-japanese", false, "use unicode Japanese characters") flagSetUnicodeChinese := flag.Bool("unicode-chinese", false, "use unicode Chinese characters") @@ -42,12 +43,13 @@ func main() { *flagSetSpecialChars = true *flagSetSpaces = true + *flagSetUnicodeCyrillic = true *flagSetUnicodeJapanese = true *flagSetUnicodeChinese = true } // use default password preset no sets were requested - if !*flagSetAll && !*flagSetAsciiLowercase && !*flagSetAsciiUppercase && !*flagSetNumbers && !*flagSetSpecialChars && !*flagSetSpaces && !*flagSetUnicodeJapanese && !*flagSetUnicodeChinese { + if !*flagSetAll && !*flagSetAsciiLowercase && !*flagSetAsciiUppercase && !*flagSetNumbers && !*flagSetSpecialChars && !*flagSetSpaces && !*flagSetUnicodeCyrillic && !*flagSetUnicodeJapanese && !*flagSetUnicodeChinese { *flagSetAsciiLowercase = true *flagSetAsciiUppercase = true *flagSetNumbers = true @@ -73,6 +75,9 @@ func main() { } // unicode + if *flagSetUnicodeCyrillic { + characterSets = append(characterSets, dictionary.ShuffleDictionarySet(sets.Cyrillic())) + } if *flagSetUnicodeJapanese { characterSets = append(characterSets, dictionary.ShuffleDictionarySet(sets.Japanese())) } @@ -87,5 +92,10 @@ func main() { for _, i := range password { fmt.Printf("%c", i) } + + // new line + if i < *flagCount { + fmt.Print("\n") + } } }