From f267b783b87353a70eacf786e940d5d480c4da03 Mon Sep 17 00:00:00 2001 From: standenboy Date: Tue, 9 Jan 2024 11:31:33 +0000 Subject: added eoracle --- comp/work/14/passwordgen.py | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 comp/work/14/passwordgen.py (limited to 'comp/work/14/passwordgen.py') diff --git a/comp/work/14/passwordgen.py b/comp/work/14/passwordgen.py new file mode 100644 index 0000000..d052745 --- /dev/null +++ b/comp/work/14/passwordgen.py @@ -0,0 +1,33 @@ +import random, sys + +def randomchar(): + num = random.randint(65, 90) + return chr(num) + +def fliprandom(char): + if random.randint(0,1) == 0: + return char.lower() + else: + return char + +def usenumber(char): + if random.randint(0,3) == 0: + return ord(char) + else: + return char + +def shift(char): + if random.randint(0,1) == 0: + return chr(random.randint(58, 63)) + else: + return char + +password = [] + +for i in range(30): + password.append(usenumber(fliprandom(shift(randomchar())))) + +for i in password: + sys.stdout.write(str(i)) + +print("") -- cgit v1.2.3