Add passwords separator
This commit is contained in:
parent
8889eccef6
commit
7291c3a19f
12
main.go
12
main.go
@ -19,6 +19,7 @@ func main() {
|
|||||||
flagSetNumbers := flag.Bool("n", false, "use numbers")
|
flagSetNumbers := flag.Bool("n", false, "use numbers")
|
||||||
flagSetSpecialChars := flag.Bool("s", false, "use special characters")
|
flagSetSpecialChars := flag.Bool("s", false, "use special characters")
|
||||||
flagSetSpaces := flag.Bool("S", false, "use spaces")
|
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")
|
flagSetUnicodeJapanese := flag.Bool("unicode-japanese", false, "use unicode Japanese characters")
|
||||||
flagSetUnicodeChinese := flag.Bool("unicode-chinese", false, "use unicode Chinese characters")
|
flagSetUnicodeChinese := flag.Bool("unicode-chinese", false, "use unicode Chinese characters")
|
||||||
|
|
||||||
@ -42,12 +43,13 @@ func main() {
|
|||||||
*flagSetSpecialChars = true
|
*flagSetSpecialChars = true
|
||||||
*flagSetSpaces = true
|
*flagSetSpaces = true
|
||||||
|
|
||||||
|
*flagSetUnicodeCyrillic = true
|
||||||
*flagSetUnicodeJapanese = true
|
*flagSetUnicodeJapanese = true
|
||||||
*flagSetUnicodeChinese = true
|
*flagSetUnicodeChinese = true
|
||||||
}
|
}
|
||||||
|
|
||||||
// use default password preset no sets were requested
|
// 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
|
*flagSetAsciiLowercase = true
|
||||||
*flagSetAsciiUppercase = true
|
*flagSetAsciiUppercase = true
|
||||||
*flagSetNumbers = true
|
*flagSetNumbers = true
|
||||||
@ -73,6 +75,9 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// unicode
|
// unicode
|
||||||
|
if *flagSetUnicodeCyrillic {
|
||||||
|
characterSets = append(characterSets, dictionary.ShuffleDictionarySet(sets.Cyrillic()))
|
||||||
|
}
|
||||||
if *flagSetUnicodeJapanese {
|
if *flagSetUnicodeJapanese {
|
||||||
characterSets = append(characterSets, dictionary.ShuffleDictionarySet(sets.Japanese()))
|
characterSets = append(characterSets, dictionary.ShuffleDictionarySet(sets.Japanese()))
|
||||||
}
|
}
|
||||||
@ -87,5 +92,10 @@ func main() {
|
|||||||
for _, i := range password {
|
for _, i := range password {
|
||||||
fmt.Printf("%c", i)
|
fmt.Printf("%c", i)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// new line
|
||||||
|
if i < *flagCount {
|
||||||
|
fmt.Print("\n")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user