From 25fd949e513b13f0f9ca01417875a4788aa5e336 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Mon, 3 Jan 2022 20:23:04 -0600 Subject: [PATCH] Have -B remove more characters Ted Tso's implementation doesn't emit. --- toys/other/pwgen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toys/other/pwgen.c b/toys/other/pwgen.c index c6621ccd..c34daf5a 100644 --- a/toys/other/pwgen.c +++ b/toys/other/pwgen.c @@ -61,7 +61,7 @@ void pwgen_main(void) else c |= (0x80&randbuf[rand])>>2; } if (FLAG(0) && c>='0' && c<='9') continue; - if (FLAG(B) && strchr("0O1lI'`.,", c)) continue; + if (FLAG(B) && strchr("0O1lI8B5S2ZD'`.,", c)) continue; if (FLAG(v) && strchr("aeiou", tolower(c))) continue; if (!FLAG(y) || (0x80&randbuf[rand])) if (c<'0' || (c>'9' && c<'A') || (c>'Z' && c<'a') || c>'z') continue; -- 2.39.2