kpass-gen 0.1.4__tar.gz → 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- kpass_gen-0.2.0/PKG-INFO +175 -0
- kpass_gen-0.2.0/README.md +138 -0
- kpass_gen-0.2.0/kpass/__init__.py +19 -0
- kpass_gen-0.2.0/kpass/main.py +221 -0
- kpass_gen-0.2.0/kpass_gen.egg-info/PKG-INFO +175 -0
- {kpass_gen-0.1.4 → kpass_gen-0.2.0}/kpass_gen.egg-info/SOURCES.txt +1 -1
- {kpass_gen-0.1.4 → kpass_gen-0.2.0}/pyproject.toml +1 -1
- kpass_gen-0.1.4/PKG-INFO +0 -103
- kpass_gen-0.1.4/README.md +0 -66
- kpass_gen-0.1.4/kpass/__init__.py +0 -3
- kpass_gen-0.1.4/kpass/generator.py +0 -106
- kpass_gen-0.1.4/kpass_gen.egg-info/PKG-INFO +0 -103
- {kpass_gen-0.1.4 → kpass_gen-0.2.0}/LICENSE.txt +0 -0
- {kpass_gen-0.1.4 → kpass_gen-0.2.0}/kpass_gen.egg-info/dependency_links.txt +0 -0
- {kpass_gen-0.1.4 → kpass_gen-0.2.0}/kpass_gen.egg-info/requires.txt +0 -0
- {kpass_gen-0.1.4 → kpass_gen-0.2.0}/kpass_gen.egg-info/top_level.txt +0 -0
- {kpass_gen-0.1.4 → kpass_gen-0.2.0}/setup.cfg +0 -0
kpass_gen-0.2.0/PKG-INFO
ADDED
@@ -0,0 +1,175 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: kpass-gen
|
3
|
+
Version: 0.2.0
|
4
|
+
Summary: kpass is a simple password generator based on full name, age, and birthdate.
|
5
|
+
Author-email: "Lucas Paulino Da Silva (KsxDynamic)" <lucas.workps@gmail.com>
|
6
|
+
License: MIT License
|
7
|
+
|
8
|
+
Copyright (c) [year] [fullname]
|
9
|
+
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
11
|
+
of this software and associated documentation files (the "Software"), to deal
|
12
|
+
in the Software without restriction, including without limitation the rights
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
15
|
+
furnished to do so, subject to the following conditions:
|
16
|
+
|
17
|
+
The above copyright notice and this permission notice shall be included in all
|
18
|
+
copies or substantial portions of the Software.
|
19
|
+
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
23
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
24
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
25
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
26
|
+
SOFTWARE.
|
27
|
+
Project-URL: Homepage, https://github.com/lucaspy-stack/kpass
|
28
|
+
Project-URL: Repository, https://github.com/lucaspy-stack/kpass
|
29
|
+
Classifier: Programming Language :: Python :: 3
|
30
|
+
Classifier: License :: OSI Approved :: MIT License
|
31
|
+
Classifier: Operating System :: OS Independent
|
32
|
+
Requires-Python: >=3.6
|
33
|
+
Description-Content-Type: text/markdown
|
34
|
+
License-File: LICENSE.txt
|
35
|
+
Requires-Dist: rich
|
36
|
+
Dynamic: license-file
|
37
|
+
|
38
|
+
# kpass
|
39
|
+
|
40
|
+
**kpass** is a Python library that:
|
41
|
+
|
42
|
+
1. Generates hundreds (or thousands) of password combinations based on a person’s full name, age, and date of birth.
|
43
|
+
2. Applies “leet”-style substitutions (e.g., A → 4, S → $, E → 3).
|
44
|
+
3. Calculates **password strength** according to length, digit presence, special characters, mixed case, and absence of simple numeric sequences.
|
45
|
+
4. Automatically saves generated passwords to a `.txt` file with progress bars powered by the `rich` library.
|
46
|
+
|
47
|
+
---
|
48
|
+
|
49
|
+
## 📦 Installation
|
50
|
+
|
51
|
+
```bash
|
52
|
+
pip install kpass-gen
|
53
|
+
````
|
54
|
+
|
55
|
+
---
|
56
|
+
|
57
|
+
## 🚀 Example Usage
|
58
|
+
|
59
|
+
### 1. Generating Passwords
|
60
|
+
|
61
|
+
```python
|
62
|
+
from kpass import generator
|
63
|
+
|
64
|
+
# Generate hundreds of password combinations based on personal data
|
65
|
+
generator(
|
66
|
+
name="Johnny Silverhand",
|
67
|
+
age="34",
|
68
|
+
birth_date="16/11/1988"
|
69
|
+
)
|
70
|
+
```
|
71
|
+
|
72
|
+
> This will create a file named `pass_generated.txt` (in the default or specified folder) containing all valid passwords between 6 and 18 characters, with a progress bar shown during generation.
|
73
|
+
|
74
|
+
---
|
75
|
+
|
76
|
+
### 2. Applying Leet-Style Substitutions
|
77
|
+
|
78
|
+
```python
|
79
|
+
from kpass import aplly_ciphers
|
80
|
+
|
81
|
+
original = "SecurePass"
|
82
|
+
leet = aplly_ciphers(original)
|
83
|
+
print(leet) # → "$3cur3P4$$" (example)
|
84
|
+
```
|
85
|
+
|
86
|
+
---
|
87
|
+
|
88
|
+
### 3. Saving Passwords Manually
|
89
|
+
|
90
|
+
If you already have a list of passwords and only want to save them:
|
91
|
+
|
92
|
+
```python
|
93
|
+
from kpass import save_to_txt
|
94
|
+
|
95
|
+
passwords = ["abc123!", "Johnny34@", "4bcc!23"]
|
96
|
+
save_to_txt(passwords, file_name="my_passwords.txt")
|
97
|
+
```
|
98
|
+
|
99
|
+
---
|
100
|
+
|
101
|
+
### 4. Checking Password Strength
|
102
|
+
|
103
|
+
```python
|
104
|
+
from kpass import verify
|
105
|
+
|
106
|
+
# Returns a numeric score (0–6)
|
107
|
+
score = verify(password="Luc@s683", want_verdict=False)
|
108
|
+
print(score) # → 6
|
109
|
+
|
110
|
+
# Returns a hashtag verdict
|
111
|
+
label = verify(password="Luc@s683", want_verdict=True)
|
112
|
+
print(label) # → "#very_strong"
|
113
|
+
```
|
114
|
+
|
115
|
+
| Score | Verdict | Description |
|
116
|
+
| :---: | :------------ | :---------- |
|
117
|
+
| 0 | #very\_weak | Very weak |
|
118
|
+
| 1–2 | #weak | Weak |
|
119
|
+
| 3 | #mean | Average |
|
120
|
+
| 4 | #good | Good |
|
121
|
+
| 5 | #strong | Strong |
|
122
|
+
| 6 | #very\_strong | Very strong |
|
123
|
+
|
124
|
+
---
|
125
|
+
|
126
|
+
## 🔧 API Reference
|
127
|
+
|
128
|
+
```python
|
129
|
+
generator(
|
130
|
+
name: str,
|
131
|
+
age: str,
|
132
|
+
birth_date: str
|
133
|
+
) -> None
|
134
|
+
```
|
135
|
+
|
136
|
+
* **Generates** and **saves** password combinations automatically to `pass_generated.txt`.
|
137
|
+
|
138
|
+
```python
|
139
|
+
aplly_ciphers(
|
140
|
+
text: str
|
141
|
+
) -> str
|
142
|
+
```
|
143
|
+
|
144
|
+
* **Transforms** the input text using leet-style substitutions defined in the internal dictionary.
|
145
|
+
|
146
|
+
```python
|
147
|
+
save_to_txt(
|
148
|
+
passwords: list[str],
|
149
|
+
file_name: str = "pass_generated.txt"
|
150
|
+
) -> None
|
151
|
+
```
|
152
|
+
|
153
|
+
* **Saves** the list of passwords to a text file, displaying a progress bar in the terminal.
|
154
|
+
|
155
|
+
```python
|
156
|
+
verify(
|
157
|
+
password: str,
|
158
|
+
want_verdict: bool = True
|
159
|
+
) -> int | str
|
160
|
+
```
|
161
|
+
|
162
|
+
* **Evaluates** the strength of a password: returns a numeric score (0–6) or, if `want_verdict=True`, the corresponding hashtag verdict.
|
163
|
+
|
164
|
+
---
|
165
|
+
|
166
|
+
## ✅ Requirements
|
167
|
+
|
168
|
+
* Python 3.6 or higher
|
169
|
+
* `rich`
|
170
|
+
|
171
|
+
---
|
172
|
+
|
173
|
+
## 📄 License
|
174
|
+
|
175
|
+
This project is licensed under the MIT License.
|
@@ -0,0 +1,138 @@
|
|
1
|
+
# kpass
|
2
|
+
|
3
|
+
**kpass** is a Python library that:
|
4
|
+
|
5
|
+
1. Generates hundreds (or thousands) of password combinations based on a person’s full name, age, and date of birth.
|
6
|
+
2. Applies “leet”-style substitutions (e.g., A → 4, S → $, E → 3).
|
7
|
+
3. Calculates **password strength** according to length, digit presence, special characters, mixed case, and absence of simple numeric sequences.
|
8
|
+
4. Automatically saves generated passwords to a `.txt` file with progress bars powered by the `rich` library.
|
9
|
+
|
10
|
+
---
|
11
|
+
|
12
|
+
## 📦 Installation
|
13
|
+
|
14
|
+
```bash
|
15
|
+
pip install kpass-gen
|
16
|
+
````
|
17
|
+
|
18
|
+
---
|
19
|
+
|
20
|
+
## 🚀 Example Usage
|
21
|
+
|
22
|
+
### 1. Generating Passwords
|
23
|
+
|
24
|
+
```python
|
25
|
+
from kpass import generator
|
26
|
+
|
27
|
+
# Generate hundreds of password combinations based on personal data
|
28
|
+
generator(
|
29
|
+
name="Johnny Silverhand",
|
30
|
+
age="34",
|
31
|
+
birth_date="16/11/1988"
|
32
|
+
)
|
33
|
+
```
|
34
|
+
|
35
|
+
> This will create a file named `pass_generated.txt` (in the default or specified folder) containing all valid passwords between 6 and 18 characters, with a progress bar shown during generation.
|
36
|
+
|
37
|
+
---
|
38
|
+
|
39
|
+
### 2. Applying Leet-Style Substitutions
|
40
|
+
|
41
|
+
```python
|
42
|
+
from kpass import aplly_ciphers
|
43
|
+
|
44
|
+
original = "SecurePass"
|
45
|
+
leet = aplly_ciphers(original)
|
46
|
+
print(leet) # → "$3cur3P4$$" (example)
|
47
|
+
```
|
48
|
+
|
49
|
+
---
|
50
|
+
|
51
|
+
### 3. Saving Passwords Manually
|
52
|
+
|
53
|
+
If you already have a list of passwords and only want to save them:
|
54
|
+
|
55
|
+
```python
|
56
|
+
from kpass import save_to_txt
|
57
|
+
|
58
|
+
passwords = ["abc123!", "Johnny34@", "4bcc!23"]
|
59
|
+
save_to_txt(passwords, file_name="my_passwords.txt")
|
60
|
+
```
|
61
|
+
|
62
|
+
---
|
63
|
+
|
64
|
+
### 4. Checking Password Strength
|
65
|
+
|
66
|
+
```python
|
67
|
+
from kpass import verify
|
68
|
+
|
69
|
+
# Returns a numeric score (0–6)
|
70
|
+
score = verify(password="Luc@s683", want_verdict=False)
|
71
|
+
print(score) # → 6
|
72
|
+
|
73
|
+
# Returns a hashtag verdict
|
74
|
+
label = verify(password="Luc@s683", want_verdict=True)
|
75
|
+
print(label) # → "#very_strong"
|
76
|
+
```
|
77
|
+
|
78
|
+
| Score | Verdict | Description |
|
79
|
+
| :---: | :------------ | :---------- |
|
80
|
+
| 0 | #very\_weak | Very weak |
|
81
|
+
| 1–2 | #weak | Weak |
|
82
|
+
| 3 | #mean | Average |
|
83
|
+
| 4 | #good | Good |
|
84
|
+
| 5 | #strong | Strong |
|
85
|
+
| 6 | #very\_strong | Very strong |
|
86
|
+
|
87
|
+
---
|
88
|
+
|
89
|
+
## 🔧 API Reference
|
90
|
+
|
91
|
+
```python
|
92
|
+
generator(
|
93
|
+
name: str,
|
94
|
+
age: str,
|
95
|
+
birth_date: str
|
96
|
+
) -> None
|
97
|
+
```
|
98
|
+
|
99
|
+
* **Generates** and **saves** password combinations automatically to `pass_generated.txt`.
|
100
|
+
|
101
|
+
```python
|
102
|
+
aplly_ciphers(
|
103
|
+
text: str
|
104
|
+
) -> str
|
105
|
+
```
|
106
|
+
|
107
|
+
* **Transforms** the input text using leet-style substitutions defined in the internal dictionary.
|
108
|
+
|
109
|
+
```python
|
110
|
+
save_to_txt(
|
111
|
+
passwords: list[str],
|
112
|
+
file_name: str = "pass_generated.txt"
|
113
|
+
) -> None
|
114
|
+
```
|
115
|
+
|
116
|
+
* **Saves** the list of passwords to a text file, displaying a progress bar in the terminal.
|
117
|
+
|
118
|
+
```python
|
119
|
+
verify(
|
120
|
+
password: str,
|
121
|
+
want_verdict: bool = True
|
122
|
+
) -> int | str
|
123
|
+
```
|
124
|
+
|
125
|
+
* **Evaluates** the strength of a password: returns a numeric score (0–6) or, if `want_verdict=True`, the corresponding hashtag verdict.
|
126
|
+
|
127
|
+
---
|
128
|
+
|
129
|
+
## ✅ Requirements
|
130
|
+
|
131
|
+
* Python 3.6 or higher
|
132
|
+
* `rich`
|
133
|
+
|
134
|
+
---
|
135
|
+
|
136
|
+
## 📄 License
|
137
|
+
|
138
|
+
This project is licensed under the MIT License.
|
@@ -0,0 +1,19 @@
|
|
1
|
+
from .main import (
|
2
|
+
generator,
|
3
|
+
save_to_txt,
|
4
|
+
aplly_ciphers,
|
5
|
+
check_sequences,
|
6
|
+
veredict,
|
7
|
+
verify,
|
8
|
+
)
|
9
|
+
|
10
|
+
__version__ = "0.2.0"
|
11
|
+
|
12
|
+
__all__ = [
|
13
|
+
"generator",
|
14
|
+
"save_to_txt",
|
15
|
+
"aplly_ciphers",
|
16
|
+
"check_sequences",
|
17
|
+
"veredict",
|
18
|
+
"verify",
|
19
|
+
]
|
@@ -0,0 +1,221 @@
|
|
1
|
+
import itertools
|
2
|
+
from rich.progress import Progress, BarColumn, TextColumn, TimeElapsedColumn
|
3
|
+
import re
|
4
|
+
import string
|
5
|
+
|
6
|
+
# -----------------------------------------------------------------------------
|
7
|
+
# Ciphers dictionary to replace letters with leetspeak equivalents
|
8
|
+
# Each key is a character and the corresponding value is its cipher substitution
|
9
|
+
# -----------------------------------------------------------------------------
|
10
|
+
|
11
|
+
ciphers = {
|
12
|
+
"A": "4", "a": "4", "Á": "4", "á": "4", "@": "4",
|
13
|
+
"B": "8", "b": "8",
|
14
|
+
"C": "(", "c": "(",
|
15
|
+
"D": "[)", "d": "[)",
|
16
|
+
"E": "3", "e": "3", "É": "3", "é": "3", "&": "3",
|
17
|
+
"F": "#", "f": "#",
|
18
|
+
"G": "6", "g": "6",
|
19
|
+
"H": "#", "h": "#",
|
20
|
+
"I": "1", "i": "1", "Í": "1", "í": "1", "!": "1",
|
21
|
+
"J": "_|", "j": "_|",
|
22
|
+
"K": "|<", "k": "|<",
|
23
|
+
"L": "1", "l": "1",
|
24
|
+
"M": "/\\/\\", "m": "/\\/\\",
|
25
|
+
"N": "|\\|", "n": "|\\|",
|
26
|
+
"O": "0", "o": "0", "Ó": "0", "ó": "0",
|
27
|
+
"P": "|D", "p": "|D",
|
28
|
+
"Q": "0_", "q": "0_",
|
29
|
+
"R": "12", "r": "12",
|
30
|
+
"S": "$", "s": "$", "Š": "$", "š": "$",
|
31
|
+
"T": "7", "t": "7",
|
32
|
+
"U": "(_)", "u": "(_)",
|
33
|
+
"V": "\\/", "v": "\\/",
|
34
|
+
"W": "\\/\\/", "w": "\\/\\/",
|
35
|
+
"X": "%", "x": "%",
|
36
|
+
"Y": "`/", "y": "`/",
|
37
|
+
"Z": "2", "z": "2"
|
38
|
+
}
|
39
|
+
|
40
|
+
# -----------------------------------------------------------------------------
|
41
|
+
# Function: aplly_ciphers
|
42
|
+
# Description:
|
43
|
+
# Transforms input text by replacing each character according to the ciphers dict
|
44
|
+
# Parameters:
|
45
|
+
# text (str): The original text to be ciphered
|
46
|
+
# Returns:
|
47
|
+
# str: The transformed text with cipher substitutions
|
48
|
+
# -----------------------------------------------------------------------------
|
49
|
+
|
50
|
+
def aplly_ciphers(text: str) -> str:
|
51
|
+
return ''.join(ciphers.get(char, char) for char in text)
|
52
|
+
|
53
|
+
# -----------------------------------------------------------------------------
|
54
|
+
# Function: save_to_txt
|
55
|
+
# Description:
|
56
|
+
# Writes a list of passwords to a text file, showing progress in the console
|
57
|
+
# Parameters:
|
58
|
+
# passwords (list[str]): List of password strings to save
|
59
|
+
# file_name (str): Output filename (default: 'pass_generated.txt')
|
60
|
+
# Returns:
|
61
|
+
# None
|
62
|
+
# -----------------------------------------------------------------------------
|
63
|
+
|
64
|
+
def save_to_txt(passwords: list[str], file_name: str = "pass_generated.txt") -> None:
|
65
|
+
with open(file_name, "w", encoding="utf-8-sig") as file:
|
66
|
+
with Progress(
|
67
|
+
TextColumn("[progress.description]{task.description}"),
|
68
|
+
BarColumn(),
|
69
|
+
TimeElapsedColumn(),
|
70
|
+
) as progress:
|
71
|
+
tarefa = progress.add_task("[cyan]Saving passwords...", total=len(passwords))
|
72
|
+
for pwd in passwords:
|
73
|
+
file.write(pwd + "\n")
|
74
|
+
progress.update(tarefa, advance=1)
|
75
|
+
|
76
|
+
# -----------------------------------------------------------------------------
|
77
|
+
# Function: generator
|
78
|
+
# Description:
|
79
|
+
# Builds possible password permutations based on user info and ciphers,
|
80
|
+
# filters by length, and saves them using save_to_txt()
|
81
|
+
# Parameters:
|
82
|
+
# name (str): Full name input for generating bases
|
83
|
+
# age (str): Age string (e.g., '25')
|
84
|
+
# birth_date (str): Birth date in 'DD/MM/YYYY' format
|
85
|
+
# Returns:
|
86
|
+
# None (calls save_to_txt internally)
|
87
|
+
# -----------------------------------------------------------------------------
|
88
|
+
|
89
|
+
def generator(name: str, age: str, birth_date: str) -> None:
|
90
|
+
# Split birth_date into components
|
91
|
+
day, month, year = birth_date.split("/")
|
92
|
+
|
93
|
+
# Normalize variants of the name
|
94
|
+
name_tiny = name.lower().replace(" ", "")
|
95
|
+
name_capital = name.upper().replace(" ", "")
|
96
|
+
|
97
|
+
parts = name.split()
|
98
|
+
first = parts[0]
|
99
|
+
middle = "".join(parts[1:-1]) if len(parts) > 2 else ""
|
100
|
+
last = parts[-1] if len(parts) > 1 else ""
|
101
|
+
|
102
|
+
# Reverse age string for variation
|
103
|
+
age_reversed = age[::-1]
|
104
|
+
|
105
|
+
# Base building blocks for passwords
|
106
|
+
base_combinations = [
|
107
|
+
name_tiny, name_capital, first, middle, last,
|
108
|
+
day, month, year,
|
109
|
+
age, age_reversed,
|
110
|
+
aplly_ciphers(name_tiny), aplly_ciphers(first), aplly_ciphers(last)
|
111
|
+
]
|
112
|
+
|
113
|
+
# Remove duplicates and empty strings
|
114
|
+
base_combinations = list({item for item in base_combinations if item.strip()})
|
115
|
+
|
116
|
+
possible_passwords = set()
|
117
|
+
|
118
|
+
# Calculate total permutations for progress bar
|
119
|
+
total = sum(len(list(itertools.permutations(base_combinations, i))) for i in range(2, 5))
|
120
|
+
|
121
|
+
with Progress(
|
122
|
+
TextColumn("[cyan]Generating passwords..."),
|
123
|
+
BarColumn(),
|
124
|
+
TimeElapsedColumn(),
|
125
|
+
) as progress:
|
126
|
+
task = progress.add_task("passwords", total=total)
|
127
|
+
for length in range(2, 5):
|
128
|
+
for combo in itertools.permutations(base_combinations, length):
|
129
|
+
pwd = "".join(combo)
|
130
|
+
if 6 <= len(pwd) <= 18:
|
131
|
+
possible_passwords.add(pwd)
|
132
|
+
progress.update(task, advance=1)
|
133
|
+
|
134
|
+
# Save results to file
|
135
|
+
save_to_txt(list(possible_passwords))
|
136
|
+
|
137
|
+
# -----------------------------------------------------------------------------
|
138
|
+
# Function: check_sequences
|
139
|
+
# Description:
|
140
|
+
# Detects ascending or descending numeric sequences of length 3 in password
|
141
|
+
# Parameters:
|
142
|
+
# password (str): The password string to check
|
143
|
+
# Returns:
|
144
|
+
# bool: True if a sequence is found, False otherwise
|
145
|
+
# -----------------------------------------------------------------------------
|
146
|
+
|
147
|
+
def check_sequences(password: str) -> bool:
|
148
|
+
digits = [int(c) for c in password if c.isdigit()]
|
149
|
+
for i in range(len(digits) - 2):
|
150
|
+
if digits[i] + 1 == digits[i+1] == digits[i+2] - 1:
|
151
|
+
return True
|
152
|
+
if digits[i] - 1 == digits[i+1] == digits[i+2] + 1:
|
153
|
+
return True
|
154
|
+
return False
|
155
|
+
|
156
|
+
# -----------------------------------------------------------------------------
|
157
|
+
# Function: veredict
|
158
|
+
# Description:
|
159
|
+
# Maps numeric strength score to a hashtag-based verdict string
|
160
|
+
# Parameters:
|
161
|
+
# score (int): Numeric strength score (0-6)\# Returns:
|
162
|
+
# str: Verdict hashtag
|
163
|
+
# -----------------------------------------------------------------------------
|
164
|
+
|
165
|
+
def veredict(score: int) -> str:
|
166
|
+
levels = [
|
167
|
+
"#very_weak", # 0
|
168
|
+
"#weak", # 1
|
169
|
+
"#weak", # 2
|
170
|
+
"#mean", # 3
|
171
|
+
"#good", # 4
|
172
|
+
"#strong", # 5
|
173
|
+
"#very_strong" # 6
|
174
|
+
]
|
175
|
+
# Safeguard for out-of-range scores
|
176
|
+
return levels[score] if 0 <= score < len(levels) else "#unknown"
|
177
|
+
|
178
|
+
# -----------------------------------------------------------------------------
|
179
|
+
# Function: verify
|
180
|
+
# Description:
|
181
|
+
# Evaluates password strength by checking length, digits, punctuation,
|
182
|
+
# case variety, and absence of predictable sequences
|
183
|
+
# Parameters:
|
184
|
+
# password (str): Password string to evaluate
|
185
|
+
# want_verdict (bool): If True, return textual verdict; else, return numeric score
|
186
|
+
# Returns:
|
187
|
+
# int | str: Numerical strength score or verdict string for you to treat the values as you wish, the values (int) range from 0 - 6
|
188
|
+
# -----------------------------------------------------------------------------
|
189
|
+
|
190
|
+
def verify(
|
191
|
+
password: str,
|
192
|
+
want_verdict: bool = True,
|
193
|
+
) -> int | str:
|
194
|
+
strength = 0
|
195
|
+
|
196
|
+
# Length check (>=8 chars)
|
197
|
+
if len(password) >= 8:
|
198
|
+
strength += 1
|
199
|
+
|
200
|
+
# Digit presence
|
201
|
+
if re.search(r'\d', password):
|
202
|
+
strength += 1
|
203
|
+
|
204
|
+
# Special character presence
|
205
|
+
if any(c in string.punctuation for c in password):
|
206
|
+
strength += 1
|
207
|
+
|
208
|
+
# Uppercase letter presence
|
209
|
+
if any(c.isupper() for c in password):
|
210
|
+
strength += 1
|
211
|
+
|
212
|
+
# Lowercase letter presence
|
213
|
+
if any(c.islower() for c in password):
|
214
|
+
strength += 1
|
215
|
+
|
216
|
+
# Sequence check (deduct if predictable)
|
217
|
+
if not check_sequences(password):
|
218
|
+
strength += 1
|
219
|
+
|
220
|
+
# Return verdict or raw score
|
221
|
+
return veredict(strength) if want_verdict else strength
|
@@ -0,0 +1,175 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: kpass-gen
|
3
|
+
Version: 0.2.0
|
4
|
+
Summary: kpass is a simple password generator based on full name, age, and birthdate.
|
5
|
+
Author-email: "Lucas Paulino Da Silva (KsxDynamic)" <lucas.workps@gmail.com>
|
6
|
+
License: MIT License
|
7
|
+
|
8
|
+
Copyright (c) [year] [fullname]
|
9
|
+
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
11
|
+
of this software and associated documentation files (the "Software"), to deal
|
12
|
+
in the Software without restriction, including without limitation the rights
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
15
|
+
furnished to do so, subject to the following conditions:
|
16
|
+
|
17
|
+
The above copyright notice and this permission notice shall be included in all
|
18
|
+
copies or substantial portions of the Software.
|
19
|
+
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
23
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
24
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
25
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
26
|
+
SOFTWARE.
|
27
|
+
Project-URL: Homepage, https://github.com/lucaspy-stack/kpass
|
28
|
+
Project-URL: Repository, https://github.com/lucaspy-stack/kpass
|
29
|
+
Classifier: Programming Language :: Python :: 3
|
30
|
+
Classifier: License :: OSI Approved :: MIT License
|
31
|
+
Classifier: Operating System :: OS Independent
|
32
|
+
Requires-Python: >=3.6
|
33
|
+
Description-Content-Type: text/markdown
|
34
|
+
License-File: LICENSE.txt
|
35
|
+
Requires-Dist: rich
|
36
|
+
Dynamic: license-file
|
37
|
+
|
38
|
+
# kpass
|
39
|
+
|
40
|
+
**kpass** is a Python library that:
|
41
|
+
|
42
|
+
1. Generates hundreds (or thousands) of password combinations based on a person’s full name, age, and date of birth.
|
43
|
+
2. Applies “leet”-style substitutions (e.g., A → 4, S → $, E → 3).
|
44
|
+
3. Calculates **password strength** according to length, digit presence, special characters, mixed case, and absence of simple numeric sequences.
|
45
|
+
4. Automatically saves generated passwords to a `.txt` file with progress bars powered by the `rich` library.
|
46
|
+
|
47
|
+
---
|
48
|
+
|
49
|
+
## 📦 Installation
|
50
|
+
|
51
|
+
```bash
|
52
|
+
pip install kpass-gen
|
53
|
+
````
|
54
|
+
|
55
|
+
---
|
56
|
+
|
57
|
+
## 🚀 Example Usage
|
58
|
+
|
59
|
+
### 1. Generating Passwords
|
60
|
+
|
61
|
+
```python
|
62
|
+
from kpass import generator
|
63
|
+
|
64
|
+
# Generate hundreds of password combinations based on personal data
|
65
|
+
generator(
|
66
|
+
name="Johnny Silverhand",
|
67
|
+
age="34",
|
68
|
+
birth_date="16/11/1988"
|
69
|
+
)
|
70
|
+
```
|
71
|
+
|
72
|
+
> This will create a file named `pass_generated.txt` (in the default or specified folder) containing all valid passwords between 6 and 18 characters, with a progress bar shown during generation.
|
73
|
+
|
74
|
+
---
|
75
|
+
|
76
|
+
### 2. Applying Leet-Style Substitutions
|
77
|
+
|
78
|
+
```python
|
79
|
+
from kpass import aplly_ciphers
|
80
|
+
|
81
|
+
original = "SecurePass"
|
82
|
+
leet = aplly_ciphers(original)
|
83
|
+
print(leet) # → "$3cur3P4$$" (example)
|
84
|
+
```
|
85
|
+
|
86
|
+
---
|
87
|
+
|
88
|
+
### 3. Saving Passwords Manually
|
89
|
+
|
90
|
+
If you already have a list of passwords and only want to save them:
|
91
|
+
|
92
|
+
```python
|
93
|
+
from kpass import save_to_txt
|
94
|
+
|
95
|
+
passwords = ["abc123!", "Johnny34@", "4bcc!23"]
|
96
|
+
save_to_txt(passwords, file_name="my_passwords.txt")
|
97
|
+
```
|
98
|
+
|
99
|
+
---
|
100
|
+
|
101
|
+
### 4. Checking Password Strength
|
102
|
+
|
103
|
+
```python
|
104
|
+
from kpass import verify
|
105
|
+
|
106
|
+
# Returns a numeric score (0–6)
|
107
|
+
score = verify(password="Luc@s683", want_verdict=False)
|
108
|
+
print(score) # → 6
|
109
|
+
|
110
|
+
# Returns a hashtag verdict
|
111
|
+
label = verify(password="Luc@s683", want_verdict=True)
|
112
|
+
print(label) # → "#very_strong"
|
113
|
+
```
|
114
|
+
|
115
|
+
| Score | Verdict | Description |
|
116
|
+
| :---: | :------------ | :---------- |
|
117
|
+
| 0 | #very\_weak | Very weak |
|
118
|
+
| 1–2 | #weak | Weak |
|
119
|
+
| 3 | #mean | Average |
|
120
|
+
| 4 | #good | Good |
|
121
|
+
| 5 | #strong | Strong |
|
122
|
+
| 6 | #very\_strong | Very strong |
|
123
|
+
|
124
|
+
---
|
125
|
+
|
126
|
+
## 🔧 API Reference
|
127
|
+
|
128
|
+
```python
|
129
|
+
generator(
|
130
|
+
name: str,
|
131
|
+
age: str,
|
132
|
+
birth_date: str
|
133
|
+
) -> None
|
134
|
+
```
|
135
|
+
|
136
|
+
* **Generates** and **saves** password combinations automatically to `pass_generated.txt`.
|
137
|
+
|
138
|
+
```python
|
139
|
+
aplly_ciphers(
|
140
|
+
text: str
|
141
|
+
) -> str
|
142
|
+
```
|
143
|
+
|
144
|
+
* **Transforms** the input text using leet-style substitutions defined in the internal dictionary.
|
145
|
+
|
146
|
+
```python
|
147
|
+
save_to_txt(
|
148
|
+
passwords: list[str],
|
149
|
+
file_name: str = "pass_generated.txt"
|
150
|
+
) -> None
|
151
|
+
```
|
152
|
+
|
153
|
+
* **Saves** the list of passwords to a text file, displaying a progress bar in the terminal.
|
154
|
+
|
155
|
+
```python
|
156
|
+
verify(
|
157
|
+
password: str,
|
158
|
+
want_verdict: bool = True
|
159
|
+
) -> int | str
|
160
|
+
```
|
161
|
+
|
162
|
+
* **Evaluates** the strength of a password: returns a numeric score (0–6) or, if `want_verdict=True`, the corresponding hashtag verdict.
|
163
|
+
|
164
|
+
---
|
165
|
+
|
166
|
+
## ✅ Requirements
|
167
|
+
|
168
|
+
* Python 3.6 or higher
|
169
|
+
* `rich`
|
170
|
+
|
171
|
+
---
|
172
|
+
|
173
|
+
## 📄 License
|
174
|
+
|
175
|
+
This project is licensed under the MIT License.
|
kpass_gen-0.1.4/PKG-INFO
DELETED
@@ -1,103 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.4
|
2
|
-
Name: kpass-gen
|
3
|
-
Version: 0.1.4
|
4
|
-
Summary: kpass is a simple password generator based on full name, age, and birthdate.
|
5
|
-
Author-email: "Lucas Paulino Da Silva (KsxDynamic)" <lucas.workps@gmail.com>
|
6
|
-
License: MIT License
|
7
|
-
|
8
|
-
Copyright (c) [year] [fullname]
|
9
|
-
|
10
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
11
|
-
of this software and associated documentation files (the "Software"), to deal
|
12
|
-
in the Software without restriction, including without limitation the rights
|
13
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
14
|
-
copies of the Software, and to permit persons to whom the Software is
|
15
|
-
furnished to do so, subject to the following conditions:
|
16
|
-
|
17
|
-
The above copyright notice and this permission notice shall be included in all
|
18
|
-
copies or substantial portions of the Software.
|
19
|
-
|
20
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
21
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
22
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
23
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
24
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
25
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
26
|
-
SOFTWARE.
|
27
|
-
Project-URL: Homepage, https://github.com/lucaspy-stack/kpass
|
28
|
-
Project-URL: Repository, https://github.com/lucaspy-stack/kpass
|
29
|
-
Classifier: Programming Language :: Python :: 3
|
30
|
-
Classifier: License :: OSI Approved :: MIT License
|
31
|
-
Classifier: Operating System :: OS Independent
|
32
|
-
Requires-Python: >=3.6
|
33
|
-
Description-Content-Type: text/markdown
|
34
|
-
License-File: LICENSE.txt
|
35
|
-
Requires-Dist: rich
|
36
|
-
Dynamic: license-file
|
37
|
-
|
38
|
-
# kpass
|
39
|
-
|
40
|
-
**kpass** is a Python library that generates hundreds (or thousands) of password combinations based on a person's full name, age, and date of birth.
|
41
|
-
|
42
|
-
It also includes `leet`-style substitutions (e.g., A → 4, S → $, E → 3), and automatically saves the generated passwords to a `.txt` file with progress bars using the `rich` library.
|
43
|
-
|
44
|
-
---
|
45
|
-
|
46
|
-
## 📦 Installation
|
47
|
-
|
48
|
-
```bash
|
49
|
-
pip install kpass-gen
|
50
|
-
```
|
51
|
-
---
|
52
|
-
|
53
|
-
🚀 Example usage
|
54
|
-
|
55
|
-
|
56
|
-
```python
|
57
|
-
from kpass import generator
|
58
|
-
|
59
|
-
# Generate passwords based on personal data
|
60
|
-
generator(
|
61
|
-
name="Jhonny Silverhand",
|
62
|
-
age="34",
|
63
|
-
birth_date="16/11/1988"
|
64
|
-
)
|
65
|
-
```
|
66
|
-
|
67
|
-
This will create a folder called passwords_generator containing a file named pass_generated.txt with valid password combinations between 6 and 18 characters.
|
68
|
-
|
69
|
-
|
70
|
-
---
|
71
|
-
|
72
|
-
🔧 Available functions
|
73
|
-
|
74
|
-
generator(name: str, age: str, birth_date: str) -> bool
|
75
|
-
|
76
|
-
Generates and saves passwords automatically.
|
77
|
-
|
78
|
-
aplly_ciphers(text: str) -> str
|
79
|
-
|
80
|
-
Applies leet-style substitutions to the given text (e.g., A → 4, S → $, etc.).
|
81
|
-
|
82
|
-
save_to_txt(passwords: list[str], file_name: str = "pass_generated.txt")
|
83
|
-
|
84
|
-
Saves a list of passwords to a .txt file with a progress bar.
|
85
|
-
|
86
|
-
|
87
|
-
---
|
88
|
-
|
89
|
-
✅ Requirements
|
90
|
-
|
91
|
-
Python 3.6 or higher
|
92
|
-
|
93
|
-
rich
|
94
|
-
|
95
|
-
|
96
|
-
---
|
97
|
-
|
98
|
-
📄 License
|
99
|
-
|
100
|
-
This project is licensed under the MIT License.
|
101
|
-
|
102
|
-
|
103
|
-
|
kpass_gen-0.1.4/README.md
DELETED
@@ -1,66 +0,0 @@
|
|
1
|
-
# kpass
|
2
|
-
|
3
|
-
**kpass** is a Python library that generates hundreds (or thousands) of password combinations based on a person's full name, age, and date of birth.
|
4
|
-
|
5
|
-
It also includes `leet`-style substitutions (e.g., A → 4, S → $, E → 3), and automatically saves the generated passwords to a `.txt` file with progress bars using the `rich` library.
|
6
|
-
|
7
|
-
---
|
8
|
-
|
9
|
-
## 📦 Installation
|
10
|
-
|
11
|
-
```bash
|
12
|
-
pip install kpass-gen
|
13
|
-
```
|
14
|
-
---
|
15
|
-
|
16
|
-
🚀 Example usage
|
17
|
-
|
18
|
-
|
19
|
-
```python
|
20
|
-
from kpass import generator
|
21
|
-
|
22
|
-
# Generate passwords based on personal data
|
23
|
-
generator(
|
24
|
-
name="Jhonny Silverhand",
|
25
|
-
age="34",
|
26
|
-
birth_date="16/11/1988"
|
27
|
-
)
|
28
|
-
```
|
29
|
-
|
30
|
-
This will create a folder called passwords_generator containing a file named pass_generated.txt with valid password combinations between 6 and 18 characters.
|
31
|
-
|
32
|
-
|
33
|
-
---
|
34
|
-
|
35
|
-
🔧 Available functions
|
36
|
-
|
37
|
-
generator(name: str, age: str, birth_date: str) -> bool
|
38
|
-
|
39
|
-
Generates and saves passwords automatically.
|
40
|
-
|
41
|
-
aplly_ciphers(text: str) -> str
|
42
|
-
|
43
|
-
Applies leet-style substitutions to the given text (e.g., A → 4, S → $, etc.).
|
44
|
-
|
45
|
-
save_to_txt(passwords: list[str], file_name: str = "pass_generated.txt")
|
46
|
-
|
47
|
-
Saves a list of passwords to a .txt file with a progress bar.
|
48
|
-
|
49
|
-
|
50
|
-
---
|
51
|
-
|
52
|
-
✅ Requirements
|
53
|
-
|
54
|
-
Python 3.6 or higher
|
55
|
-
|
56
|
-
rich
|
57
|
-
|
58
|
-
|
59
|
-
---
|
60
|
-
|
61
|
-
📄 License
|
62
|
-
|
63
|
-
This project is licensed under the MIT License.
|
64
|
-
|
65
|
-
|
66
|
-
|
@@ -1,106 +0,0 @@
|
|
1
|
-
# Password generator itself
|
2
|
-
|
3
|
-
import itertools
|
4
|
-
from rich.progress import Progress, BarColumn, TextColumn, TimeElapsedColumn
|
5
|
-
import os
|
6
|
-
|
7
|
-
# Ciphers dictionary to replace letters
|
8
|
-
ciphers = {
|
9
|
-
"A": "4", "a": "4", "Á": "4", "á": "4", "@": "4",
|
10
|
-
"B": "8", "b": "8",
|
11
|
-
"C": "(", "c": "(",
|
12
|
-
"D": "[)", "d": "[)",
|
13
|
-
"E": "3", "e": "3", "É": "3", "é": "3", "&": "3",
|
14
|
-
"F": "#", "f": "#",
|
15
|
-
"G": "6", "g": "6",
|
16
|
-
"H": "#", "h": "#",
|
17
|
-
"I": "1", "i": "1", "Í": "1", "í": "1", "!": "1",
|
18
|
-
"J": "_|", "j": "_|",
|
19
|
-
"K": "|<", "k": "|<",
|
20
|
-
"L": "1", "l": "1",
|
21
|
-
"M": "/\\/\\", "m": "/\\/\\",
|
22
|
-
"N": "|\\|", "n": "|\\|",
|
23
|
-
"O": "0", "o": "0", "Ó": "0", "ó": "0",
|
24
|
-
"P": "|D", "p": "|D",
|
25
|
-
"Q": "0_", "q": "0_",
|
26
|
-
"R": "12", "r": "12",
|
27
|
-
"S": "$", "s": "$", "Š": "$", "š": "$",
|
28
|
-
"T": "7", "t": "7",
|
29
|
-
"U": "(_)", "u": "(_)",
|
30
|
-
"V": "\\/", "v": "\\/",
|
31
|
-
"W": "\\/\\/", "w": "\\/\\/",
|
32
|
-
"X": "%", "x": "%",
|
33
|
-
"Y": "`/", "y": "`/",
|
34
|
-
"Z": "2", "z": "2"
|
35
|
-
}
|
36
|
-
|
37
|
-
|
38
|
-
# Function to apply ciphers to text
|
39
|
-
def aplly_ciphers(text):
|
40
|
-
return ''.join(ciphers.get(char, char) for char in text)
|
41
|
-
|
42
|
-
# Function to generate passwords
|
43
|
-
|
44
|
-
def generator(name, age, birth_date):
|
45
|
-
day, month, yaer = birth_date.split("/")
|
46
|
-
|
47
|
-
name_tiny = name.lower().replace(" ", "")
|
48
|
-
name_capital = name.upper().replace(" ", "")
|
49
|
-
|
50
|
-
parts_name = name.split()
|
51
|
-
first = parts_name[0]
|
52
|
-
middle = "".join(parts_name[1:-1]) if len(parts_name) > 2 else ""
|
53
|
-
last = parts_name[-1] if len(parts_name) > 1 else ""
|
54
|
-
|
55
|
-
age_reversed = age[::-1]
|
56
|
-
|
57
|
-
base_combinations = [
|
58
|
-
name_tiny, name_capital, first, middle, last,
|
59
|
-
day, month, yaer,
|
60
|
-
age, age_reversed,
|
61
|
-
aplly_ciphers(name_tiny), aplly_ciphers(first), aplly_ciphers(last)
|
62
|
-
]
|
63
|
-
|
64
|
-
base_combinations = list(set(filter(lambda x: x.strip() != "", base_combinations)))
|
65
|
-
|
66
|
-
possible_passwords = set()
|
67
|
-
|
68
|
-
# Calcula o total de combinações pra progress bar
|
69
|
-
total = sum(len(list(itertools.permutations(base_combinations, i))) for i in range(2, 5))
|
70
|
-
|
71
|
-
with Progress(
|
72
|
-
TextColumn("[cyan]Generating passwords..."),
|
73
|
-
BarColumn(),
|
74
|
-
TimeElapsedColumn(),
|
75
|
-
) as progress:
|
76
|
-
task = progress.add_task("passwords", total=total)
|
77
|
-
|
78
|
-
for i in range(2, 5):
|
79
|
-
for combo in itertools.permutations(base_combinations, i):
|
80
|
-
password = "".join(combo)
|
81
|
-
if 6 <= len(password) <= 18:
|
82
|
-
possible_passwords.add(password)
|
83
|
-
progress.update(task, advance=1)
|
84
|
-
|
85
|
-
return save_to_txt(list(possible_passwords))
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
# Function to save passwords to file
|
90
|
-
|
91
|
-
def save_to_txt(passwords, file_name="pass_generated.txt"):
|
92
|
-
path = "passwords_generator"
|
93
|
-
os.makedirs(path, exist_ok=True)
|
94
|
-
|
95
|
-
with open(os.path.join(path, file_name), "w", encoding="utf-8-sig") as file:
|
96
|
-
with Progress(
|
97
|
-
TextColumn("[progress.description]{task.description}"),
|
98
|
-
BarColumn(),
|
99
|
-
TimeElapsedColumn(),
|
100
|
-
) as progress:
|
101
|
-
|
102
|
-
tarefa = progress.add_task("[cyan]Saving passwords...", total=len(passwords))
|
103
|
-
|
104
|
-
for password in passwords:
|
105
|
-
file.write(password + "\n")
|
106
|
-
progress.update(tarefa, advance=1)
|
@@ -1,103 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.4
|
2
|
-
Name: kpass-gen
|
3
|
-
Version: 0.1.4
|
4
|
-
Summary: kpass is a simple password generator based on full name, age, and birthdate.
|
5
|
-
Author-email: "Lucas Paulino Da Silva (KsxDynamic)" <lucas.workps@gmail.com>
|
6
|
-
License: MIT License
|
7
|
-
|
8
|
-
Copyright (c) [year] [fullname]
|
9
|
-
|
10
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
11
|
-
of this software and associated documentation files (the "Software"), to deal
|
12
|
-
in the Software without restriction, including without limitation the rights
|
13
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
14
|
-
copies of the Software, and to permit persons to whom the Software is
|
15
|
-
furnished to do so, subject to the following conditions:
|
16
|
-
|
17
|
-
The above copyright notice and this permission notice shall be included in all
|
18
|
-
copies or substantial portions of the Software.
|
19
|
-
|
20
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
21
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
22
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
23
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
24
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
25
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
26
|
-
SOFTWARE.
|
27
|
-
Project-URL: Homepage, https://github.com/lucaspy-stack/kpass
|
28
|
-
Project-URL: Repository, https://github.com/lucaspy-stack/kpass
|
29
|
-
Classifier: Programming Language :: Python :: 3
|
30
|
-
Classifier: License :: OSI Approved :: MIT License
|
31
|
-
Classifier: Operating System :: OS Independent
|
32
|
-
Requires-Python: >=3.6
|
33
|
-
Description-Content-Type: text/markdown
|
34
|
-
License-File: LICENSE.txt
|
35
|
-
Requires-Dist: rich
|
36
|
-
Dynamic: license-file
|
37
|
-
|
38
|
-
# kpass
|
39
|
-
|
40
|
-
**kpass** is a Python library that generates hundreds (or thousands) of password combinations based on a person's full name, age, and date of birth.
|
41
|
-
|
42
|
-
It also includes `leet`-style substitutions (e.g., A → 4, S → $, E → 3), and automatically saves the generated passwords to a `.txt` file with progress bars using the `rich` library.
|
43
|
-
|
44
|
-
---
|
45
|
-
|
46
|
-
## 📦 Installation
|
47
|
-
|
48
|
-
```bash
|
49
|
-
pip install kpass-gen
|
50
|
-
```
|
51
|
-
---
|
52
|
-
|
53
|
-
🚀 Example usage
|
54
|
-
|
55
|
-
|
56
|
-
```python
|
57
|
-
from kpass import generator
|
58
|
-
|
59
|
-
# Generate passwords based on personal data
|
60
|
-
generator(
|
61
|
-
name="Jhonny Silverhand",
|
62
|
-
age="34",
|
63
|
-
birth_date="16/11/1988"
|
64
|
-
)
|
65
|
-
```
|
66
|
-
|
67
|
-
This will create a folder called passwords_generator containing a file named pass_generated.txt with valid password combinations between 6 and 18 characters.
|
68
|
-
|
69
|
-
|
70
|
-
---
|
71
|
-
|
72
|
-
🔧 Available functions
|
73
|
-
|
74
|
-
generator(name: str, age: str, birth_date: str) -> bool
|
75
|
-
|
76
|
-
Generates and saves passwords automatically.
|
77
|
-
|
78
|
-
aplly_ciphers(text: str) -> str
|
79
|
-
|
80
|
-
Applies leet-style substitutions to the given text (e.g., A → 4, S → $, etc.).
|
81
|
-
|
82
|
-
save_to_txt(passwords: list[str], file_name: str = "pass_generated.txt")
|
83
|
-
|
84
|
-
Saves a list of passwords to a .txt file with a progress bar.
|
85
|
-
|
86
|
-
|
87
|
-
---
|
88
|
-
|
89
|
-
✅ Requirements
|
90
|
-
|
91
|
-
Python 3.6 or higher
|
92
|
-
|
93
|
-
rich
|
94
|
-
|
95
|
-
|
96
|
-
---
|
97
|
-
|
98
|
-
📄 License
|
99
|
-
|
100
|
-
This project is licensed under the MIT License.
|
101
|
-
|
102
|
-
|
103
|
-
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|