Skip to content
Open
Show file tree
Hide file tree
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
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,28 @@
# PIN_Generator
NOTE RUN THIS PROGRAM IN PYTHON3
NOTE RUN THIS PROGRAM IN PYTHON3

<img src="https://simonsayspsychstuff.files.wordpress.com/2015/05/matrix-gif-3.gif" alt="matrix" width="200"/>

This password generator can go max 900,000 Characters for me it may be diffrent for you.

## Prerequisites
This project requires the _pyperclip_ module, please install it.

```

pip install pyperclip

```

## Usage
python pin_generator.py <password length>

E.g.

```

python pin_generator.py 50

```

The generated password will be copied to your system's clipboard.
30 changes: 19 additions & 11 deletions pin_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,23 @@
# By https://github.com/hacker41d4n/

import random
chars ="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^&*()_+}{"
length = int(input("Enter password length "))
password=""
for i in range(length+1):
password += random.choice(chars)
print(password)
import sys
import pyperclip

# Sample output :
#
#
# Enter password length 8
# l#9RX!ufa
# ---- Handle arguments ----
if len(sys.argv) < 2:
print("Usage: " + sys.argv[0] + " <password length>")
sys.exit(1)

# ---- Variables ----
length = int(sys.argv[1])
charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^&*()_+}{"
password = str()

# ---- Work -----
for i in range(length):
password += random.choice(charset)

# --------- Output -------------
print(str(length) + ' character password copied to clipboard.')
pyperclip.copy(password)