From 815b6e159c28865a769ebc2589277503f495c8fb Mon Sep 17 00:00:00 2001 From: cynic Date: Mon, 7 Nov 2022 08:10:38 -0500 Subject: [PATCH] spit the password for added users to stdout --- tools/add_users.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/add_users.py b/tools/add_users.py index a96bbb0..6999446 100644 --- a/tools/add_users.py +++ b/tools/add_users.py @@ -33,8 +33,9 @@ def generate_list_from_emails(infile): usr = addy.split("@")[0] if usr in cur: continue - pwd = crypt.crypt(secrets.token_urlsafe(10), crypt.mksalt()) - key.append((usr, pwd)) + opwd = secrets.token_urlsafe(10) + pwd = crypt.crypt(opwd, crypt.mksalt()) + key.append((usr, opwd)) add_user(usr, pwd) print(key)