kpass-gen 0.1.2__tar.gz → 0.1.4__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.1.2 → kpass_gen-0.1.4}/LICENSE.txt +20 -20
- {kpass_gen-0.1.2 → kpass_gen-0.1.4}/PKG-INFO +103 -82
- {kpass_gen-0.1.2 → kpass_gen-0.1.4}/README.md +66 -66
- kpass_gen-0.1.4/kpass/__init__.py +3 -0
- {kpass_gen-0.1.2 → kpass_gen-0.1.4}/kpass/generator.py +106 -106
- {kpass_gen-0.1.2 → kpass_gen-0.1.4}/kpass_gen.egg-info/PKG-INFO +103 -82
- {kpass_gen-0.1.2 → kpass_gen-0.1.4}/pyproject.toml +30 -33
- {kpass_gen-0.1.2 → kpass_gen-0.1.4}/setup.cfg +4 -4
- kpass_gen-0.1.2/kpass/__init__.py +0 -3
- {kpass_gen-0.1.2 → kpass_gen-0.1.4}/kpass_gen.egg-info/SOURCES.txt +0 -0
- {kpass_gen-0.1.2 → kpass_gen-0.1.4}/kpass_gen.egg-info/dependency_links.txt +0 -0
- {kpass_gen-0.1.2 → kpass_gen-0.1.4}/kpass_gen.egg-info/requires.txt +0 -0
- {kpass_gen-0.1.2 → kpass_gen-0.1.4}/kpass_gen.egg-info/top_level.txt +0 -0
@@ -1,21 +1,21 @@
|
|
1
|
-
MIT License
|
2
|
-
|
3
|
-
Copyright (c) [year] [fullname]
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
13
|
-
copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) [year] [fullname]
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
21
|
SOFTWARE.
|
@@ -1,82 +1,103 @@
|
|
1
|
-
Metadata-Version: 2.4
|
2
|
-
Name: kpass-gen
|
3
|
-
Version: 0.1.
|
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
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
#
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
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
|
+
|
@@ -1,66 +1,66 @@
|
|
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
|
+
# 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 +1,106 @@
|
|
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
|
-
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
|
+
# 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,82 +1,103 @@
|
|
1
|
-
Metadata-Version: 2.4
|
2
|
-
Name: kpass-gen
|
3
|
-
Version: 0.1.
|
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
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
#
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
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
|
+
|
@@ -1,33 +1,30 @@
|
|
1
|
-
[build-system]
|
2
|
-
requires = ["setuptools>=67", "wheel"]
|
3
|
-
build-backend = "setuptools.build_meta"
|
4
|
-
|
5
|
-
[project]
|
6
|
-
name = "kpass-gen"
|
7
|
-
version = "0.1.
|
8
|
-
description = "kpass is a simple password generator based on full name, age, and birthdate."
|
9
|
-
readme = "README.md"
|
10
|
-
requires-python = ">=3.6"
|
11
|
-
|
12
|
-
authors = [
|
13
|
-
{ name = "Lucas Paulino Da Silva (KsxDynamic)", email = "lucas.workps@gmail.com" }
|
14
|
-
]
|
15
|
-
|
16
|
-
license = "
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
"
|
25
|
-
"Operating System :: OS Independent"
|
26
|
-
]
|
27
|
-
|
28
|
-
[project.urls]
|
29
|
-
Homepage = "https://github.com/lucaspy-stack/kpass"
|
30
|
-
Repository = "https://github.com/lucaspy-stack/kpass"
|
31
|
-
|
32
|
-
[tool.setuptools]
|
33
|
-
packages = ["kpass"]
|
1
|
+
[build-system]
|
2
|
+
requires = ["setuptools>=67", "wheel"]
|
3
|
+
build-backend = "setuptools.build_meta"
|
4
|
+
|
5
|
+
[project]
|
6
|
+
name = "kpass-gen"
|
7
|
+
version = "0.1.4"
|
8
|
+
description = "kpass is a simple password generator based on full name, age, and birthdate."
|
9
|
+
readme = "README.md"
|
10
|
+
requires-python = ">=3.6"
|
11
|
+
|
12
|
+
authors = [
|
13
|
+
{ name = "Lucas Paulino Da Silva (KsxDynamic)", email = "lucas.workps@gmail.com" }
|
14
|
+
]
|
15
|
+
|
16
|
+
license = { file = "LICENSE.txt" }
|
17
|
+
|
18
|
+
dependencies = [
|
19
|
+
"rich"
|
20
|
+
]
|
21
|
+
|
22
|
+
classifiers = [
|
23
|
+
"Programming Language :: Python :: 3",
|
24
|
+
"License :: OSI Approved :: MIT License",
|
25
|
+
"Operating System :: OS Independent"
|
26
|
+
]
|
27
|
+
|
28
|
+
[project.urls]
|
29
|
+
Homepage = "https://github.com/lucaspy-stack/kpass"
|
30
|
+
Repository = "https://github.com/lucaspy-stack/kpass"
|
@@ -1,4 +1,4 @@
|
|
1
|
-
[egg_info]
|
2
|
-
tag_build =
|
3
|
-
tag_date = 0
|
4
|
-
|
1
|
+
[egg_info]
|
2
|
+
tag_build =
|
3
|
+
tag_date = 0
|
4
|
+
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|