diff --git a/random-pass-gen.py b/random-pass-gen.py new file mode 100644 index 0000000..0bd1ff8 --- /dev/null +++ b/random-pass-gen.py @@ -0,0 +1,47 @@ +import string,random + +def generate(n): + + """ + This function will take n as password length then generate final string which has letters,digits and puntuation + then convert that string into list + then uses random.shuffle to shuffle that list + initiale another list in which we store our password + then iterate a loop to password length so it can save characters through random.choice in pw_list + shuffle pw_list for more randomness + converts pw_list into string password. + """ + + s1 = str(input("\033[92m [*] Enter Name : ")) + s2=str(input("\033[92m [*] Enter Name : ")) + s3=str(input("\033[92m [*] Enter Name : ")) + + final = s1+s2+s3 + + l1 = list(final) + random.shuffle(l1) + + pw_list = [] + + i=0 + while i