Skip to content

Commit

Permalink
Merge pull request #109 from pratiksasmal/master
Browse files Browse the repository at this point in the history
adding a password generator script made in Python for #10
  • Loading branch information
harshareddy794 authored Oct 14, 2020
2 parents d151495 + 7ec4138 commit 37e5eb3
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Python/password_generator/README.md
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.



19 changes: 19 additions & 0 deletions Python/password_generator/passgen.py
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]))

0 comments on commit 37e5eb3

Please sign in to comment.