From f00bc1999459e021ea265a32a353e647af7040a7 Mon Sep 17 00:00:00 2001 From: cami Date: Thu, 22 Jul 2021 00:02:57 +0200 Subject: [PATCH] Add special character and numbers inside the password --- backend/src/password_util.py | 89 +++++++++++++++++++++++++++++------- 1 file changed, 73 insertions(+), 16 deletions(-) diff --git a/backend/src/password_util.py b/backend/src/password_util.py index 189488c..8146a93 100644 --- a/backend/src/password_util.py +++ b/backend/src/password_util.py @@ -23,6 +23,15 @@ def get_random_password(): ] second_part = [ + "%", + "(", + ")", + "$", + "+", + "!", + ] + + third_part = [ "frisst", "küsst", "begrüsst", @@ -33,28 +42,76 @@ def get_random_password(): "vergisst", ] - third_part = [ - "den Vogel", - "die Mücke", - "den Adler", - "den Apfel", - "die Birne", - "die Biene", - "eine Gurke", - ] - forth_part = [ - "auf der Terasse.", - "auf der Wiese.", - "im Garten.", - "in der Kühltruhe.", - "auf dem Balkon.", + "1 Vogel!", + "2 Vögel!", + "3 Vögel!", + "4 Vögel!", + "5 Vögel!", + "6 Vögel!", + "7 Vögel!", + "8 Vögel!", + "9 Vögel!", + "1 Mücke", + "2 Mücken!", + "3 Mücken!", + "4 Mücken!", + "5 Mücken!", + "6 Mücken!", + "7 Mücken!", + "8 Mücken!", + "9 Mücken!", + "1 Adler", + "2 Adler!", + "3 Adler!", + "4 Adler!", + "5 Adler!", + "6 Adler!", + "7 Adler!", + "8 Adler!", + "9 Adler!", + "1 Apfel", + "2 Äpfel!", + "3 Äpfel!", + "4 Äpfel!", + "5 Äpfel!", + "6 Äpfel!", + "7 Äpfel!", + "8 Äpfel!", + "9 Äpfel!", + "1 Birne", + "2 Birnen!", + "3 Birnen!", + "4 Birnen!", + "5 Birnen!", + "6 Birnen!", + "7 Birnen!", + "8 Birnen!", + "9 Birnen!", + "1 Biene", + "2 Bienen!", + "3 Bienen!", + "4 Bienen!", + "5 Bienen!", + "6 Bienen!", + "7 Bienen!", + "8 Bienen!", + "9 Bienen!", + "1 Gurke", + "2 Gurken!", + "3 Gurken!", + "4 Gurken!", + "5 Gurken!", + "6 Gurken!", + "7 Gurken!", + "8 Gurken!", + "9 Gurken!", ] password = "" password += str(first_part[get_random_value(len(first_part)-1)]) password += " " + str(second_part[get_random_value(len(second_part)-1)]) password += " " + str(third_part[get_random_value(len(third_part)-1)]) - # password += " " + str(forth_part[get_random_value(len(forth_part)-1)]) + password += " " + str(forth_part[get_random_value(len(forth_part)-1)]) return password