Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit fbef5e2

Browse files
committedOct 5, 2023
custom password generator using cmd line arguement
1 parent 6f08f62 commit fbef5e2

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed
 

‎C/custom-password-generator/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Custom password generator!
2+
3+
Command to run the script
4+
5+
```
6+
>>python custom-password-generator.py <character to use> <password length>
7+
```
8+
this would be the exmaple
9+
10+
```
11+
>>python custom-password-generator.py abcdABCD123@#$% 9
12+
```
13+
14+
#### Thank you for using!!
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import sys, random, pyperclip
2+
3+
charused = sys.argv[1]
4+
passlength = sys.argv[2]
5+
while True:
6+
password = "".join(random.choices(population=str(charused),k=int(passlength)))
7+
pyperclip.copy(password)
8+
print("Your Password has been copied to clipboard!")
9+
isitok = input("\n\nPress enter to exit\npress 1 to regenerate password\n")
10+
if isitok == "":
11+
break
12+
elif isitok == "1":
13+
continue

0 commit comments

Comments
 (0)
Please sign in to comment.