aboutsummaryrefslogtreecommitdiff
path: root/pwgen.c
diff options
context:
space:
mode:
Diffstat (limited to 'pwgen.c')
-rw-r--r--pwgen.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/pwgen.c b/pwgen.c
index a371f92..3ae457a 100644
--- a/pwgen.c
+++ b/pwgen.c
@@ -41,11 +41,12 @@ struct option pwgen_options[] = {
{ "no-capitalize", no_argument, 0, 'A' },
{ "sha1", required_argument, 0, 'H' },
{ "ambiguous", no_argument, 0, 'B' },
+ { "no-vowels", no_argument, 0, 'v' },
{ 0, 0, 0, 0}
};
#endif
-const char *pw_options = "01AaBCcnN:shH:y";
+const char *pw_options = "01AaBCcnN:shH:vy";
static void usage(void)
{
@@ -78,6 +79,9 @@ static void usage(void)
fputs(" -C\n\tPrint the generated passwords in columns\n", stderr);
fputs(" -1\n\tDon't print the generated passwords in columns\n",
stderr);
+ fputs(" -v or --no-vowels\n", stderr);
+ fputs("\tDo not use any vowels so as to avoid accidental nasty words\n",
+ stderr);
exit(1);
}
@@ -134,6 +138,7 @@ int main(int argc, char **argv)
break;
case 's':
pwgen = pw_rand;
+ pwgen_flags = PW_DIGITS | PW_UPPERS;
break;
case 'C':
do_columns = 1;
@@ -148,6 +153,10 @@ int main(int argc, char **argv)
case 'y':
pwgen_flags |= PW_SYMBOLS;
break;
+ case 'v':
+ pwgen = pw_rand;
+ pwgen_flags |= PW_NO_VOWELS | PW_DIGITS | PW_UPPERS;
+ break;
case 'h':
case '?':
usage();