-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #109 from pratiksasmal/master
adding a password generator script made in Python for #10
- Loading branch information
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#Password_generator | ||
###Overview - Generates a password of your desired length. | ||
|
||
#### Requirements - Python3 should be installed on your system. | ||
####Steps - | ||
Download this repo to your system. | ||
|
||
Run the passgen.py in any IDE or terminal. | ||
|
||
Enter the length of password you want to generate. | ||
|
||
Your password is generated. | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import random | ||
import string | ||
|
||
up = string.ascii_uppercase | ||
lo = string.ascii_lowercase | ||
num = string.digits | ||
sym = string.punctuation | ||
|
||
len=int(input("Enter password length\n")) | ||
|
||
s= [] | ||
s.extend(list(up)) | ||
s.extend(list(lo)) | ||
s.extend(list(num)) | ||
s.extend(list(sym)) | ||
#print(s) | ||
random.shuffle(s) | ||
#print(s) | ||
print("".join(s[0:len])) |