Skip to content

Added a user-defined random password generator to replace brute-force… #503

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions password_generator.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
small ='a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z''A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S',"T","U","V","W","X","Y","Z"
speci_char= "!","@","#","$","%","^","&","*","(",")","/","+","-0"
num="1","2","3","4","5","6","7","8","9"
import random

password =""
# length= int (input ("length of your password"))
alpha_len= int (input("how many alphabets you want in your password "))
special = int (input("how many special characters you want"))
num_length=int (input("how many number you want in your password"))

# for i in range(length+1):
for j in range(alpha_len+1):
e= random.choice(small)
password+=e

for j in range(special+1):
e= random.choice(speci_char)
password+=e

for j in range(num_length+1):
e = random.choice(num)
password+=e

print(password)