randompass 1.0.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.
- randompass-1.0.0/.gitignore +9 -0
- randompass-1.0.0/.python-version +1 -0
- randompass-1.0.0/LICENSE +7 -0
- randompass-1.0.0/PKG-INFO +193 -0
- randompass-1.0.0/README.md +182 -0
- randompass-1.0.0/pyproject.toml +26 -0
- randompass-1.0.0/src/randompass/__init__.py +4 -0
- randompass-1.0.0/src/randompass/assets/wordlist.txt +7776 -0
- randompass-1.0.0/src/randompass/cli.py +173 -0
- randompass-1.0.0/src/randompass/modules/__init__.py +0 -0
- randompass-1.0.0/src/randompass/modules/file_module.py +24 -0
- randompass-1.0.0/src/randompass/modules/passphrase.py +46 -0
- randompass-1.0.0/src/randompass/modules/password.py +52 -0
- randompass-1.0.0/tests/test_randompass.py +16 -0
- randompass-1.0.0/uv.lock +108 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.13
|
randompass-1.0.0/LICENSE
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Copyright (c) 2026 pplayer7
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
|
+
|
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: randompass
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: A simple generator of passwords and passphrases.
|
|
5
|
+
License-Expression: MIT
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
Requires-Python: >=3.13
|
|
8
|
+
Requires-Dist: click>=8.4.2
|
|
9
|
+
Requires-Dist: pyperclip>=1.11.0
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
|
|
12
|
+
# randompass
|
|
13
|
+
## A simple generator of passwords and passphrases.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
## Features
|
|
17
|
+
|
|
18
|
+
- Secure password generation using Python's `secrets` module.
|
|
19
|
+
- Guaranteed inclusion of selected character categories.
|
|
20
|
+
- Passphrase generation using a wordlist.
|
|
21
|
+
- Clipboard support.
|
|
22
|
+
- Save generated passwords/passphrases to a file.
|
|
23
|
+
- Generate multiple passwords/passphrases at once.
|
|
24
|
+
- CLI aliases: `pw` and `pp`.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Installation
|
|
29
|
+
To install randompass, you need to have [uv](https://github.com/astral-sh/uv) installed.
|
|
30
|
+
### GitHub
|
|
31
|
+
```bash
|
|
32
|
+
git clone https://github.com/USERNAME/randompass.git
|
|
33
|
+
cd randompass
|
|
34
|
+
uv sync
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Usage: `uv run randompass`
|
|
38
|
+
|
|
39
|
+
### PyPI
|
|
40
|
+
`uv tool install randompass`
|
|
41
|
+
|
|
42
|
+
Usage: `randompass`
|
|
43
|
+
|
|
44
|
+
## Usage
|
|
45
|
+
|
|
46
|
+
Choose a mode to generate passwords or passphrases.
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
$ randompass
|
|
50
|
+
Usage: randompass [OPTIONS] COMMAND [ARGS]...
|
|
51
|
+
|
|
52
|
+
Options:
|
|
53
|
+
--version Show the version and exit.
|
|
54
|
+
--help Show this message and exit.
|
|
55
|
+
|
|
56
|
+
Commands:
|
|
57
|
+
passphrase
|
|
58
|
+
password
|
|
59
|
+
pw
|
|
60
|
+
pp
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
For example, `randompass password` generates an 8-character password containing uppercase letters, digits, and special symbols.
|
|
64
|
+
All selected character categories are guaranteed to be included (with default settings).
|
|
65
|
+
|
|
66
|
+
And `randompass passphrase` generates a 5-word passphrase using the
|
|
67
|
+
default wordlist.
|
|
68
|
+
|
|
69
|
+
> **Note:** `password` and `pw` are aliases.
|
|
70
|
+
>
|
|
71
|
+
> **Note:** `passphrase` and `pp` are aliases.
|
|
72
|
+
|
|
73
|
+
### Arguments:
|
|
74
|
+
#### Password mode
|
|
75
|
+
|
|
76
|
+
| Argument | Description|
|
|
77
|
+
|---|---|
|
|
78
|
+
| `-h, --help` | Shows help page. |
|
|
79
|
+
| `-l, --length LENGTH` | Length of the password (default is 8). |
|
|
80
|
+
| `-u, --uppercase/--no-uppercase` | Whether uppercase letters should be included (enabled by default). |
|
|
81
|
+
| `-d, --digits/--no-digits` | Whether digits should be included (enabled by default). |
|
|
82
|
+
| `-s, --symbols/--no-symbols` | Whether special symbols should be included (enabled by default). |
|
|
83
|
+
| `-n, --count` | Number of passwords to generate (default is 1). |
|
|
84
|
+
| `-c, --copy` | Copy the password to the clipboard (disabled by default). |
|
|
85
|
+
| `-o, --output FILE` | Save the result to a file. |
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
#### Passphrase mode
|
|
90
|
+
|
|
91
|
+
| Argument | Description|
|
|
92
|
+
|---|---|
|
|
93
|
+
| `-h, --help` | Shows help page. |
|
|
94
|
+
| `-l, --length LENGTH` | Number of words in the passphrase (default is 5). |
|
|
95
|
+
| `-s, --separator` | Symbol that separates the words (default is "-"). |
|
|
96
|
+
| `-n, --count` | Number of passphrases to generate (default is 1). |
|
|
97
|
+
| `-c, --copy` | Copy the passphrase to the clipboard (disabled by default). |
|
|
98
|
+
| `-o, --output FILE` | Save the result to a file. |
|
|
99
|
+
|
|
100
|
+
> **Note:** Clipboard copying is unavailable if no supported clipboard
|
|
101
|
+
> mechanism is detected.
|
|
102
|
+
>
|
|
103
|
+
> Multiple results cannot be copied at once, and `--copy` cannot be
|
|
104
|
+
> combined with `--output`.
|
|
105
|
+
|
|
106
|
+
### Examples:
|
|
107
|
+
#### Password mode
|
|
108
|
+
|
|
109
|
+
Generate a 12-character password:
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
$ randompass password -l 12
|
|
113
|
+
/Sy"KG6dtv#G
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Generate a 20-character password with no digits:
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
$ randompass password -l 20 --no-digits
|
|
120
|
+
bd,+?swxL.Y?d`{&'F:%
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Generate 5 10-character passwords with no uppercase letters or special symbols:
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
$ randompass password -l 10 --no-uppercase --no-symbols -n 5
|
|
127
|
+
345ra5peus
|
|
128
|
+
cfppy97hkv
|
|
129
|
+
jy24huia4i
|
|
130
|
+
0cvjqfy871
|
|
131
|
+
70ygxqrh4d
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Generate a password and copy it to the clipboard:
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
$ randompass password -c
|
|
138
|
+
4?[SOr9&
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Generate 100 passwords with no digits and write them to `output.txt` (No console output):
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
$ randompass password --no-digits -n 100 -o output.txt
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
#### Passphrase mode
|
|
149
|
+
|
|
150
|
+
Generate a passphrase with 10 words:
|
|
151
|
+
|
|
152
|
+
```
|
|
153
|
+
$ randompass passphrase -l 10
|
|
154
|
+
shady-stretch-sulfate-snub-gummy-earthly-tipoff-icon-deflected-punctual
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Generate a passphrase with 8 words and "_" separator:
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
$ randompass passphrase -l 8 -s _
|
|
161
|
+
corny_constrain_clunky_crispness_heaviness_strength_impending_saved
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
Generate a passphrase with 12 words, "=" separator and copy it to clipboard:
|
|
165
|
+
|
|
166
|
+
```
|
|
167
|
+
$ randompass passphrase -l 12 -s = -c
|
|
168
|
+
prelaw=oxidize=bonanza=uniquely=startling=happily=blurt=large=wok=corset=mustiness=arena
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Generate 5 passphrases with "+" separator and write them to `example.txt` (No console output):
|
|
172
|
+
|
|
173
|
+
```
|
|
174
|
+
$ randompass passphrase -n 5 -s + -o example.txt
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## Tests
|
|
178
|
+
|
|
179
|
+
Tests are located in [tests](tests/) folder.
|
|
180
|
+
|
|
181
|
+
Run them with pytest like:
|
|
182
|
+
```bash
|
|
183
|
+
uv run pytest
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## Wordlist
|
|
189
|
+
|
|
190
|
+
The default wordlist is [EFF Large Wordlist](https://www.eff.org/files/2016/07/18/eff_large_wordlist.txt).
|
|
191
|
+
|
|
192
|
+
## License
|
|
193
|
+
randompass distributes under [MIT License](LICENSE).
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
# randompass
|
|
2
|
+
## A simple generator of passwords and passphrases.
|
|
3
|
+
|
|
4
|
+
---
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- Secure password generation using Python's `secrets` module.
|
|
8
|
+
- Guaranteed inclusion of selected character categories.
|
|
9
|
+
- Passphrase generation using a wordlist.
|
|
10
|
+
- Clipboard support.
|
|
11
|
+
- Save generated passwords/passphrases to a file.
|
|
12
|
+
- Generate multiple passwords/passphrases at once.
|
|
13
|
+
- CLI aliases: `pw` and `pp`.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
To install randompass, you need to have [uv](https://github.com/astral-sh/uv) installed.
|
|
19
|
+
### GitHub
|
|
20
|
+
```bash
|
|
21
|
+
git clone https://github.com/USERNAME/randompass.git
|
|
22
|
+
cd randompass
|
|
23
|
+
uv sync
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Usage: `uv run randompass`
|
|
27
|
+
|
|
28
|
+
### PyPI
|
|
29
|
+
`uv tool install randompass`
|
|
30
|
+
|
|
31
|
+
Usage: `randompass`
|
|
32
|
+
|
|
33
|
+
## Usage
|
|
34
|
+
|
|
35
|
+
Choose a mode to generate passwords or passphrases.
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
$ randompass
|
|
39
|
+
Usage: randompass [OPTIONS] COMMAND [ARGS]...
|
|
40
|
+
|
|
41
|
+
Options:
|
|
42
|
+
--version Show the version and exit.
|
|
43
|
+
--help Show this message and exit.
|
|
44
|
+
|
|
45
|
+
Commands:
|
|
46
|
+
passphrase
|
|
47
|
+
password
|
|
48
|
+
pw
|
|
49
|
+
pp
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
For example, `randompass password` generates an 8-character password containing uppercase letters, digits, and special symbols.
|
|
53
|
+
All selected character categories are guaranteed to be included (with default settings).
|
|
54
|
+
|
|
55
|
+
And `randompass passphrase` generates a 5-word passphrase using the
|
|
56
|
+
default wordlist.
|
|
57
|
+
|
|
58
|
+
> **Note:** `password` and `pw` are aliases.
|
|
59
|
+
>
|
|
60
|
+
> **Note:** `passphrase` and `pp` are aliases.
|
|
61
|
+
|
|
62
|
+
### Arguments:
|
|
63
|
+
#### Password mode
|
|
64
|
+
|
|
65
|
+
| Argument | Description|
|
|
66
|
+
|---|---|
|
|
67
|
+
| `-h, --help` | Shows help page. |
|
|
68
|
+
| `-l, --length LENGTH` | Length of the password (default is 8). |
|
|
69
|
+
| `-u, --uppercase/--no-uppercase` | Whether uppercase letters should be included (enabled by default). |
|
|
70
|
+
| `-d, --digits/--no-digits` | Whether digits should be included (enabled by default). |
|
|
71
|
+
| `-s, --symbols/--no-symbols` | Whether special symbols should be included (enabled by default). |
|
|
72
|
+
| `-n, --count` | Number of passwords to generate (default is 1). |
|
|
73
|
+
| `-c, --copy` | Copy the password to the clipboard (disabled by default). |
|
|
74
|
+
| `-o, --output FILE` | Save the result to a file. |
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
#### Passphrase mode
|
|
79
|
+
|
|
80
|
+
| Argument | Description|
|
|
81
|
+
|---|---|
|
|
82
|
+
| `-h, --help` | Shows help page. |
|
|
83
|
+
| `-l, --length LENGTH` | Number of words in the passphrase (default is 5). |
|
|
84
|
+
| `-s, --separator` | Symbol that separates the words (default is "-"). |
|
|
85
|
+
| `-n, --count` | Number of passphrases to generate (default is 1). |
|
|
86
|
+
| `-c, --copy` | Copy the passphrase to the clipboard (disabled by default). |
|
|
87
|
+
| `-o, --output FILE` | Save the result to a file. |
|
|
88
|
+
|
|
89
|
+
> **Note:** Clipboard copying is unavailable if no supported clipboard
|
|
90
|
+
> mechanism is detected.
|
|
91
|
+
>
|
|
92
|
+
> Multiple results cannot be copied at once, and `--copy` cannot be
|
|
93
|
+
> combined with `--output`.
|
|
94
|
+
|
|
95
|
+
### Examples:
|
|
96
|
+
#### Password mode
|
|
97
|
+
|
|
98
|
+
Generate a 12-character password:
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
$ randompass password -l 12
|
|
102
|
+
/Sy"KG6dtv#G
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Generate a 20-character password with no digits:
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
$ randompass password -l 20 --no-digits
|
|
109
|
+
bd,+?swxL.Y?d`{&'F:%
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Generate 5 10-character passwords with no uppercase letters or special symbols:
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
$ randompass password -l 10 --no-uppercase --no-symbols -n 5
|
|
116
|
+
345ra5peus
|
|
117
|
+
cfppy97hkv
|
|
118
|
+
jy24huia4i
|
|
119
|
+
0cvjqfy871
|
|
120
|
+
70ygxqrh4d
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Generate a password and copy it to the clipboard:
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
$ randompass password -c
|
|
127
|
+
4?[SOr9&
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Generate 100 passwords with no digits and write them to `output.txt` (No console output):
|
|
131
|
+
|
|
132
|
+
```
|
|
133
|
+
$ randompass password --no-digits -n 100 -o output.txt
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
#### Passphrase mode
|
|
138
|
+
|
|
139
|
+
Generate a passphrase with 10 words:
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
$ randompass passphrase -l 10
|
|
143
|
+
shady-stretch-sulfate-snub-gummy-earthly-tipoff-icon-deflected-punctual
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Generate a passphrase with 8 words and "_" separator:
|
|
147
|
+
|
|
148
|
+
```
|
|
149
|
+
$ randompass passphrase -l 8 -s _
|
|
150
|
+
corny_constrain_clunky_crispness_heaviness_strength_impending_saved
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Generate a passphrase with 12 words, "=" separator and copy it to clipboard:
|
|
154
|
+
|
|
155
|
+
```
|
|
156
|
+
$ randompass passphrase -l 12 -s = -c
|
|
157
|
+
prelaw=oxidize=bonanza=uniquely=startling=happily=blurt=large=wok=corset=mustiness=arena
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Generate 5 passphrases with "+" separator and write them to `example.txt` (No console output):
|
|
161
|
+
|
|
162
|
+
```
|
|
163
|
+
$ randompass passphrase -n 5 -s + -o example.txt
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
## Tests
|
|
167
|
+
|
|
168
|
+
Tests are located in [tests](tests/) folder.
|
|
169
|
+
|
|
170
|
+
Run them with pytest like:
|
|
171
|
+
```bash
|
|
172
|
+
uv run pytest
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## Wordlist
|
|
178
|
+
|
|
179
|
+
The default wordlist is [EFF Large Wordlist](https://www.eff.org/files/2016/07/18/eff_large_wordlist.txt).
|
|
180
|
+
|
|
181
|
+
## License
|
|
182
|
+
randompass distributes under [MIT License](LICENSE).
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "randompass"
|
|
3
|
+
version = "1.0.0"
|
|
4
|
+
description = "A simple generator of passwords and passphrases."
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.13"
|
|
7
|
+
dependencies = [
|
|
8
|
+
"click>=8.4.2",
|
|
9
|
+
"pyperclip>=1.11.0",
|
|
10
|
+
]
|
|
11
|
+
license = "MIT"
|
|
12
|
+
|
|
13
|
+
[project.scripts]
|
|
14
|
+
randompass = "randompass.cli:cli"
|
|
15
|
+
|
|
16
|
+
[build-system]
|
|
17
|
+
requires = ["hatchling"]
|
|
18
|
+
build-backend = "hatchling.build"
|
|
19
|
+
|
|
20
|
+
[tool.hatch.build.targets.wheel]
|
|
21
|
+
packages = ["src/randompass"]
|
|
22
|
+
|
|
23
|
+
[dependency-groups]
|
|
24
|
+
dev = [
|
|
25
|
+
"pytest>=9.1.1",
|
|
26
|
+
]
|