zora-cli 0.2__tar.gz → 0.2.1__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.
- {zora_cli-0.2 → zora_cli-0.2.1}/PKG-INFO +6 -4
- {zora_cli-0.2 → zora_cli-0.2.1}/README.md +5 -3
- {zora_cli-0.2 → zora_cli-0.2.1}/pyproject.toml +1 -1
- {zora_cli-0.2 → zora_cli-0.2.1}/tests/test_charset.py +22 -1
- {zora_cli-0.2 → zora_cli-0.2.1}/tests/test_timer.py +0 -11
- zora_cli-0.2.1/zora/__init__.py +1 -0
- {zora_cli-0.2 → zora_cli-0.2.1}/zora/cli.py +4 -6
- {zora_cli-0.2 → zora_cli-0.2.1}/zora_cli.egg-info/PKG-INFO +6 -4
- zora_cli-0.2/zora/__init__.py +0 -1
- {zora_cli-0.2 → zora_cli-0.2.1}/LICENSE +0 -0
- {zora_cli-0.2 → zora_cli-0.2.1}/setup.cfg +0 -0
- {zora_cli-0.2 → zora_cli-0.2.1}/tests/test_args.py +0 -0
- {zora_cli-0.2 → zora_cli-0.2.1}/tests/test_benchmark.py +0 -0
- {zora_cli-0.2 → zora_cli-0.2.1}/tests/test_formatting.py +0 -0
- {zora_cli-0.2 → zora_cli-0.2.1}/tests/test_generation.py +0 -0
- {zora_cli-0.2 → zora_cli-0.2.1}/tests/test_output.py +0 -0
- {zora_cli-0.2 → zora_cli-0.2.1}/zora/update.py +0 -0
- {zora_cli-0.2 → zora_cli-0.2.1}/zora_cli.egg-info/SOURCES.txt +0 -0
- {zora_cli-0.2 → zora_cli-0.2.1}/zora_cli.egg-info/dependency_links.txt +0 -0
- {zora_cli-0.2 → zora_cli-0.2.1}/zora_cli.egg-info/entry_points.txt +0 -0
- {zora_cli-0.2 → zora_cli-0.2.1}/zora_cli.egg-info/requires.txt +0 -0
- {zora_cli-0.2 → zora_cli-0.2.1}/zora_cli.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: zora-cli
|
|
3
|
-
Version: 0.2
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: Cryptographically secure generator of random keys with tons of options and customizations.
|
|
5
5
|
Author: zscopuv
|
|
6
6
|
License: ZORA SOURCE-AVAILABLE LICENSE
|
|
@@ -229,7 +229,7 @@ Dynamic: license-file
|
|
|
229
229
|
|
|
230
230
|
# 
|
|
231
231
|
|
|
232
|
-
> **Early release (`v0.2`)**
|
|
232
|
+
> **Early release (`v0.2.1`)**
|
|
233
233
|
|
|
234
234
|
Zora is a command-line tool for generating random keys using Python's
|
|
235
235
|
cryptographically secure `secrets` module by default.
|
|
@@ -349,7 +349,7 @@ zora --version
|
|
|
349
349
|
Example:
|
|
350
350
|
|
|
351
351
|
```text
|
|
352
|
-
zora 0.2
|
|
352
|
+
zora 0.1.2
|
|
353
353
|
```
|
|
354
354
|
|
|
355
355
|
---
|
|
@@ -394,6 +394,8 @@ to display all available presets.
|
|
|
394
394
|
|
|
395
395
|
## Basic
|
|
396
396
|
|
|
397
|
+
> `@@` → literal `@`
|
|
398
|
+
|
|
397
399
|
| Preset | Characters |
|
|
398
400
|
| ---------- | ----------------------- |
|
|
399
401
|
| `@digits` | `0-9` |
|
|
@@ -1260,7 +1262,7 @@ MAJOR.MINOR.PATCH
|
|
|
1260
1262
|
For example:
|
|
1261
1263
|
|
|
1262
1264
|
```text
|
|
1263
|
-
v0.
|
|
1265
|
+
v0.1.3
|
|
1264
1266
|
```
|
|
1265
1267
|
|
|
1266
1268
|
The `0.x` versions indicate that the CLI and features may still change
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 
|
|
2
2
|
|
|
3
|
-
> **Early release (`v0.2`)**
|
|
3
|
+
> **Early release (`v0.2.1`)**
|
|
4
4
|
|
|
5
5
|
Zora is a command-line tool for generating random keys using Python's
|
|
6
6
|
cryptographically secure `secrets` module by default.
|
|
@@ -120,7 +120,7 @@ zora --version
|
|
|
120
120
|
Example:
|
|
121
121
|
|
|
122
122
|
```text
|
|
123
|
-
zora 0.2
|
|
123
|
+
zora 0.1.2
|
|
124
124
|
```
|
|
125
125
|
|
|
126
126
|
---
|
|
@@ -165,6 +165,8 @@ to display all available presets.
|
|
|
165
165
|
|
|
166
166
|
## Basic
|
|
167
167
|
|
|
168
|
+
> `@@` → literal `@`
|
|
169
|
+
|
|
168
170
|
| Preset | Characters |
|
|
169
171
|
| ---------- | ----------------------- |
|
|
170
172
|
| `@digits` | `0-9` |
|
|
@@ -1031,7 +1033,7 @@ MAJOR.MINOR.PATCH
|
|
|
1031
1033
|
For example:
|
|
1032
1034
|
|
|
1033
1035
|
```text
|
|
1034
|
-
v0.
|
|
1036
|
+
v0.1.3
|
|
1035
1037
|
```
|
|
1036
1038
|
|
|
1037
1039
|
The `0.x` versions indicate that the CLI and features may still change
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "zora-cli"
|
|
7
|
-
version = "0.2"
|
|
7
|
+
version = "0.2.1"
|
|
8
8
|
description = "Cryptographically secure generator of random keys with tons of options and customizations."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|
|
@@ -86,6 +86,27 @@ def test_build_mixed_preset_and_literals():
|
|
|
86
86
|
|
|
87
87
|
assert zora.charset == "0123456789XYZ"
|
|
88
88
|
|
|
89
|
+
def test_build_literal_at_character():
|
|
90
|
+
zora = make_zora("@@")
|
|
91
|
+
|
|
92
|
+
zora.build_charset()
|
|
93
|
+
|
|
94
|
+
assert zora.charset == "@"
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
def test_build_escaped_at_adjacent_to_preset():
|
|
98
|
+
zora = make_zora("@@@digits")
|
|
99
|
+
|
|
100
|
+
zora.build_charset()
|
|
101
|
+
|
|
102
|
+
assert zora.charset == "@0123456789"
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
def test_build_invalid_unescaped_preset_name():
|
|
106
|
+
zora = make_zora("@doesnotexist")
|
|
107
|
+
|
|
108
|
+
with pytest.raises(SystemExit):
|
|
109
|
+
zora.build_charset()
|
|
89
110
|
|
|
90
111
|
def test_build_preset_and_literals_with_duplicates():
|
|
91
112
|
zora = make_zora("@digits123")
|
|
@@ -151,7 +172,7 @@ def test_build_multiple_same_presets():
|
|
|
151
172
|
assert zora.charset == "0123456789"
|
|
152
173
|
|
|
153
174
|
|
|
154
|
-
def
|
|
175
|
+
def test_invalid_unescaped_preset_name():
|
|
155
176
|
zora = make_zora("@doesnotexist")
|
|
156
177
|
|
|
157
178
|
with pytest.raises(SystemExit):
|
|
@@ -97,17 +97,6 @@ def test_show_timer_displays_hours(monkeypatch, capsys):
|
|
|
97
97
|
|
|
98
98
|
assert "1h 1m 5s elapsed" in output
|
|
99
99
|
|
|
100
|
-
def test_show_timer_quiet_suppresses_output(capsys):
|
|
101
|
-
zora = make_zora(quiet=True)
|
|
102
|
-
|
|
103
|
-
zora.start_timer()
|
|
104
|
-
zora.show_timer()
|
|
105
|
-
|
|
106
|
-
output = capsys.readouterr().out
|
|
107
|
-
|
|
108
|
-
assert output == ""
|
|
109
|
-
assert not hasattr(zora, "elapsed")
|
|
110
|
-
|
|
111
100
|
|
|
112
101
|
def test_show_timer_without_start_does_not_crash(capsys):
|
|
113
102
|
zora = make_zora()
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.2.1"
|
|
@@ -103,21 +103,21 @@ class Zora:
|
|
|
103
103
|
charset = ""
|
|
104
104
|
|
|
105
105
|
while value:
|
|
106
|
-
if value.startswith("
|
|
106
|
+
if value.startswith("@@"):
|
|
107
|
+
charset += "@"
|
|
108
|
+
value = value[2:]
|
|
109
|
+
elif value.startswith("@"):
|
|
107
110
|
value = value[1:]
|
|
108
|
-
|
|
109
111
|
matches = [
|
|
110
112
|
name for name in CHARSETS
|
|
111
113
|
if value.startswith(name)
|
|
112
114
|
]
|
|
113
|
-
|
|
114
115
|
if not matches:
|
|
115
116
|
self.parser.error(f"unknown charset preset near: @{value}")
|
|
116
117
|
|
|
117
118
|
name = max(matches, key=len)
|
|
118
119
|
charset += CHARSETS[name]
|
|
119
120
|
value = value[len(name):]
|
|
120
|
-
|
|
121
121
|
else:
|
|
122
122
|
charset += value[0]
|
|
123
123
|
value = value[1:]
|
|
@@ -301,8 +301,6 @@ class Zora:
|
|
|
301
301
|
"""
|
|
302
302
|
Stops the timer and prints elapsed time
|
|
303
303
|
"""
|
|
304
|
-
if self.args.quiet:
|
|
305
|
-
return
|
|
306
304
|
|
|
307
305
|
if not hasattr(self, "time_start"):
|
|
308
306
|
print("Timer has not been started properly.")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: zora-cli
|
|
3
|
-
Version: 0.2
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: Cryptographically secure generator of random keys with tons of options and customizations.
|
|
5
5
|
Author: zscopuv
|
|
6
6
|
License: ZORA SOURCE-AVAILABLE LICENSE
|
|
@@ -229,7 +229,7 @@ Dynamic: license-file
|
|
|
229
229
|
|
|
230
230
|
# 
|
|
231
231
|
|
|
232
|
-
> **Early release (`v0.2`)**
|
|
232
|
+
> **Early release (`v0.2.1`)**
|
|
233
233
|
|
|
234
234
|
Zora is a command-line tool for generating random keys using Python's
|
|
235
235
|
cryptographically secure `secrets` module by default.
|
|
@@ -349,7 +349,7 @@ zora --version
|
|
|
349
349
|
Example:
|
|
350
350
|
|
|
351
351
|
```text
|
|
352
|
-
zora 0.2
|
|
352
|
+
zora 0.1.2
|
|
353
353
|
```
|
|
354
354
|
|
|
355
355
|
---
|
|
@@ -394,6 +394,8 @@ to display all available presets.
|
|
|
394
394
|
|
|
395
395
|
## Basic
|
|
396
396
|
|
|
397
|
+
> `@@` → literal `@`
|
|
398
|
+
|
|
397
399
|
| Preset | Characters |
|
|
398
400
|
| ---------- | ----------------------- |
|
|
399
401
|
| `@digits` | `0-9` |
|
|
@@ -1260,7 +1262,7 @@ MAJOR.MINOR.PATCH
|
|
|
1260
1262
|
For example:
|
|
1261
1263
|
|
|
1262
1264
|
```text
|
|
1263
|
-
v0.
|
|
1265
|
+
v0.1.3
|
|
1264
1266
|
```
|
|
1265
1267
|
|
|
1266
1268
|
The `0.x` versions indicate that the CLI and features may still change
|
zora_cli-0.2/zora/__init__.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.2"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|