fiddlesticks 0.2.0__tar.gz → 0.3.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.
@@ -0,0 +1,2 @@
1
+ * text eol=lf
2
+ *.kdbx,*.7z binary
@@ -0,0 +1,25 @@
1
+ name: Run pre-commit hooks
2
+
3
+ on:
4
+ push:
5
+ pull_request:
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ pre-commit:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v7
13
+
14
+ - name: Install uv and set the python version
15
+ uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
16
+ with:
17
+ version: 0.12.7
18
+ python-version: "3.14"
19
+
20
+ - name: uv Sync project with all dependency groups (for type checker)
21
+ run: uv sync --group dev
22
+
23
+ - name: Run pre-commit
24
+ run: uv run pre-commit run --all-files --show-diff-on-failure --color=always
25
+ shell: bash
@@ -0,0 +1,27 @@
1
+ name: Tests
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ push:
6
+ pull_request:
7
+
8
+ jobs:
9
+ test:
10
+ runs-on: ubuntu-latest
11
+
12
+ steps:
13
+ - name: Check out repo
14
+ uses: actions/checkout@v7
15
+
16
+ - name: Set up Python
17
+ uses: actions/setup-python@v7
18
+ with:
19
+ python-version: "3.14"
20
+
21
+ - name: Install dependencies
22
+ run: |
23
+ pip install -e . --group=test
24
+
25
+ - name: Run PyTest (via Coverage)
26
+ run: |
27
+ coverage run -m pytest -rA --tb=short tests && coverage combine && coverage report
@@ -11,3 +11,7 @@ wheels/
11
11
 
12
12
  # Virtual environments
13
13
  .venv
14
+
15
+ # Dev environment lock file
16
+ # (to avoid confusion with possible application lock files)
17
+ uv.lock
@@ -0,0 +1,23 @@
1
+ repos:
2
+ - repo: local
3
+ hooks:
4
+ - id: ruff-check
5
+ name: ruff check
6
+ entry: uv run ruff check
7
+ language: system
8
+ pass_filenames: false
9
+ - id: ruff-format
10
+ name: ruff format
11
+ entry: uv run ruff format
12
+ language: system
13
+ pass_filenames: false
14
+ - id: ty
15
+ name: ty
16
+ entry: uv run ty check .
17
+ language: system
18
+ pass_filenames: false
19
+
20
+ - repo: https://github.com/pre-commit/pre-commit-hooks
21
+ rev: v6.0.0
22
+ hooks:
23
+ - id: check-yaml
@@ -0,0 +1,180 @@
1
+ Metadata-Version: 2.5
2
+ Name: fiddlesticks
3
+ Version: 0.3.0
4
+ Summary: Password recovery tool for encrypted files (.7z archives .kdbx files, and Aegis archives).
5
+ Project-URL: GitHub, https://github.com/Hazardous-Area/fiddlesticks
6
+ Author-email: James Parrott <james@jamesparrott.dev>
7
+ License-Expression: MIT
8
+ License-File: LICENSE
9
+ Requires-Python: >=3.12
10
+ Provides-Extra: aegis
11
+ Requires-Dist: py-avdu; extra == 'aegis'
12
+ Provides-Extra: keepassxc
13
+ Requires-Dist: pykeepass; extra == 'keepassxc'
14
+ Provides-Extra: py7zr
15
+ Requires-Dist: py7zr; extra == 'py7zr'
16
+ Description-Content-Type: text/markdown
17
+
18
+ # Fiddlesticks!
19
+ *"Aaaagh! I forgot my 7zip password"* - James (more times than he cares to remember).
20
+ ![Tests passing](https://github.com/Hazardous-Area/fiddlesticks/actions/workflows/tests.yml/badge.svg)
21
+ ![Code qual](https://github.com/Hazardous-Area/fiddlesticks/actions/workflows/lint.yml/badge.svg)
22
+
23
+ Version 0.3.0
24
+
25
+ ## Description
26
+ Password recovery tool, for password-encrypted files, using simple off-line brute
27
+ force attacks. Password candidates are generated, using common variations
28
+ of a guessed password (e.g. typos and substitutions). .7z, .kdbx and Aegis archives
29
+ are directly supported, but Fiddlesticks can also call any shell command, that accepts
30
+ a candidate password.
31
+
32
+ ### Raison d'etre
33
+ - Password-protected file owners recovering their own password themselves, as long as
34
+ they can still recall a rough guess for their password, might only need to test
35
+ every candidate password that's similar enough to the guess.
36
+ - This may be a much faster and cheaper computation
37
+ than the one an adversary must do, without such a guess, but in possession
38
+ of a stolen password protected file[^0].
39
+
40
+ ### Warning
41
+ Strictly speaking, Fiddlesticks is a password-protected file recovery tool. Use it to
42
+ get your files back. But once you've found a password that protected those files via Fiddlesticks
43
+ (or any third party tool) it should not be used again. Anywhere else it is also used, the
44
+ password should be reset (or the files re-encrypted with a different one). By default,
45
+ Fiddlesticks does not print the password it finds (or any candidates) unless `-P` is set
46
+ (or if using `--pipe` with no pipe).
47
+
48
+ ### "Back of envelope" sketch 'calculation'
49
+ - Attackers targetting a truly[^0] random password, must try up to `2**N`
50
+ candidate passwords (for each bit length `N` being considered).
51
+ - Specifically, password owners may only need to consider every candidate within some
52
+ maximum [Weighted-Levenshtein distance](https://en.wikipedia.org/wiki/Edit_distance#Types_of_edit_distance)
53
+ from their best guess of the forgotten password, lets say a total of `M`.
54
+ - Fiddlesticks is intended to assist recovering passwords from "close enough" guesses,
55
+ when `M` is much smaller than `2**N`.
56
+ - If Fiddlesticks can crack an archive's password with a starting guess of an empty string,
57
+ (if `2**N` is also small enough to be feasible, with no guess) then anyone with the
58
+ archive can also do so - the password wasn't strong enough.
59
+ - If Fiddlesticks fails to crack an archive's password given some starting guess, a lower
60
+ bound on how similar the actual password is to the starting guess can still be deduced
61
+ (e.g. this could indicate that the starting guess was wrong).
62
+
63
+ ### Design and security notes
64
+ *"FAQ: Why the heck should anyone in their right mind trust this with their password?"*
65
+ - Any similar 3rd party password cracking service based on 'best guess' passwords, requires
66
+ the user to share the guesses for their passwords with the service. Even if the password
67
+ was not used for anything else, sharing even guesses for secret credentials with 3rd parties,
68
+ is a critical security issue.
69
+ - Fiddlesticks is designed to minimise the need for this. It is designed to i) be as easy
70
+ to install as possible, and in particular ii) require as few dependencies as possible.
71
+ Firstly, the intention of i) is to assist users to run Fiddlesticks in their own secure
72
+ environment, locked down as much as they want (e.g. offline and disconnected from
73
+ all external network access), without requiring them to take their
74
+ password guesses outside of that. For example, for recovery of password encrypted .7z archives,
75
+ only a normal installation of 7zip is required on Linux (plus a close enough guess of the password!).
76
+ Fiddlesticks can even generate a file of candidate passwords, for external programs, and other
77
+ possible applications. Secondly, ii) helps users decide for themselves whether or not to trust Fiddlesticks
78
+ in the first place. In particular whether or not it will take their password guesses outside
79
+ of its running environment. When the project was concieved, the intention was also to
80
+ iii) require as little code as possible. But the code base has since become somewhat more
81
+ complex, mainly to have a nice CLI. Simplicity and brevity should both be much
82
+ more highly prized features of software in general. But you
83
+ be the judge of whether or not c) is still the case. The application code is all in a single file.
84
+
85
+ #### General security audit
86
+ If considering using any password recovery program at all, perhaps consider the following:
87
+ - does it contain code contained in string literals or obfuscated code?
88
+ - does it utilise arbitrary code execution functions (e.g. `eval`, `exec` and `compile`)?
89
+ - is all the source code visible?
90
+ - does it contain thousands of lines of code?
91
+ - does it require hundreds of third-party dependencies?
92
+ - does it contain compiled binary executables, that are not easily readable?
93
+ - is the code statically typed (so run-time features of dynamic languages are minimised)?
94
+ - is all the code tested?
95
+ - is it tested with high coverage (so all the code really is run, somewhere in the tests)?
96
+ - does it import or install any libraries that allow communication across a network, that
97
+ could be used for exfiltration purposes?
98
+ - does it require root privileges to run?
99
+ - can it be run on any operating system, and in any Docker container?
100
+
101
+ Full disclaimer: Fiddlesticks does actually contain 8 lines of Bash in a string
102
+ literal (to avoid the overhead of `subprocess.run` for every single candidate to be
103
+ tested, and to demonstrate how any command line program could read
104
+ password candidates from stdin). Otherwise we hope the answers to all the other questions
105
+ with regards to Fiddlesticks, are all reassuring.
106
+
107
+ ### Usage
108
+ ```
109
+ uvx fiddlesticks
110
+ ```
111
+
112
+ For 7z archives, it is possible to simply to automate attempts to open the file via a stock
113
+ 7zip installed in the system, e.g. from:
114
+ ```
115
+ sudo apt update && sudo apt-get install 7zip
116
+ ```
117
+
118
+ Fiddlesticks can also decrypt KeepassXC vaults and Aegis vault files (for TOTP authenticators) if
119
+ [pykeepass](https://pypi.org/project/pykeepass/) and [py-avdu](https://pypi.org/project/py-avdu/) respectively, are
120
+ also installed.
121
+
122
+ There are a couple of alternative modes too,
123
+
124
+ - firstly: automating any partial external Bash command that a candidate password can be appended to (that exits with return code 0
125
+ for the correct password, otherwise some non-zero exit code). Specify `--shell` or by default if the partial command is specified after `--`.
126
+
127
+ Secondly with `--pipe` candidate passwords can be sent to stdout, from where they can be piped to stdin of a user's own external program or code (all the normal output from fiddlesticks goes to stderr).
128
+
129
+ Thirdly, if py7zr is also installed, with `--py7zr` fiddlesticks can use it to test passwords for 7z archives,
130
+ entirely within Python.
131
+
132
+ ### Main options
133
+ #### Password guesses
134
+ If no password is specified, and if a password guess is requires for the selected command,
135
+ the user will be prompted to enter their password guesses securely (via Python's `getpass.getpass`).
136
+ For convenience passwords may also be supplied on separate lines of a text file specified
137
+ in `--input-file`, or directly on the command line, each after `--password-guess` or `-p`. If using
138
+ the latter in Bash and similar shells, please be aware the full command entered may be saved
139
+ in the Bash history. After using Fiddlesticks you should run `history -a` and
140
+ asome `history -d $(history 1 | awk '{print $1}')` command to clear this.
141
+
142
+ #### Number of substitutions
143
+ For candidate password generation strategies that use character substitutions (the only ones supported so far)
144
+ the number of substitutions required for each candidate can be capped by setting `--max-subs`
145
+
146
+ #### Output control & verbosity
147
+ If a file is specified in `--output-file` or `-o` Fiddlesticks will write a successfully found
148
+ password to it. Unless `-P` or `--print-passwords` is set, Fiddlesticks does not print any
149
+ candidate passwords by default (on successfully finding a password, the
150
+ candidate number is printed; candidate generation is deterministic).
151
+ The number of output messages (printed to stderr) can be increased by raising
152
+ the verbosity, by setting `-v` or `--verbosity`, once or twice (e.g. `-vv`).
153
+ "Two" is the maximum verbosity available.
154
+
155
+ ### Custom alternative character maps
156
+
157
+ Any custom JSON file supplied to `--char-map` containing a mapping of characters to alternatives can be used (instead of the default L33t substitutions and capitalisations ascii-based map). To assist creating this, the default map (or the relevant
158
+ sub-mapping applicable for a specified password guess) can be printed to stderr with `--print-char-map` (and `>>`ed
159
+ to a local file, where its JSON can be customised in any text editor). This provides a simple method for
160
+ limiting the substitutions to specific characters in a password guess.
161
+
162
+ ### Other Notes
163
+ - Successful attempts to extract a password-protected archive, result in the archive being
164
+ unencrypted (naturally) by some methods. Currently all such plaintext unencrypted archives
165
+ are not deleted from the file system afterwards. If the options `--extract-to` or `-x`
166
+ are given, archives are extracted there.
167
+ - Fiddlesticks cannot recover passwords for online accounts. Online password entry attempts
168
+ should be rate limited. Cracking is only possible locally if the website owner shares the
169
+ password hash with the user, in which case they can probably provide the rest of their
170
+ account data too.
171
+ - If Fiddlesticks fails to 'crack' or find a known password, this should not be taken as
172
+ proof of the password's strength. It won't ever be possible to think everything, and
173
+ we certainly don't wish users to draw a false sense of security from Fiddlesticks.
174
+
175
+ ## Alternatives
176
+ - https://github.com/philsmd/7z2hashcat
177
+ - https://en.wikipedia.org/wiki/Dictionary_attack#Dictionary_attack_software
178
+
179
+ [^0] Truly random passwords are difficult for humans to remember (without writing them down or saving them).
180
+ At the very least, real world adversaries (posessing a stolen file or password hash) are likely to first attempt a [dictionary attack](https://en.wikipedia.org/wiki/Dictionary_attack#Dictionary_attack_software)
@@ -0,0 +1,163 @@
1
+ # Fiddlesticks!
2
+ *"Aaaagh! I forgot my 7zip password"* - James (more times than he cares to remember).
3
+ ![Tests passing](https://github.com/Hazardous-Area/fiddlesticks/actions/workflows/tests.yml/badge.svg)
4
+ ![Code qual](https://github.com/Hazardous-Area/fiddlesticks/actions/workflows/lint.yml/badge.svg)
5
+
6
+ Version 0.3.0
7
+
8
+ ## Description
9
+ Password recovery tool, for password-encrypted files, using simple off-line brute
10
+ force attacks. Password candidates are generated, using common variations
11
+ of a guessed password (e.g. typos and substitutions). .7z, .kdbx and Aegis archives
12
+ are directly supported, but Fiddlesticks can also call any shell command, that accepts
13
+ a candidate password.
14
+
15
+ ### Raison d'etre
16
+ - Password-protected file owners recovering their own password themselves, as long as
17
+ they can still recall a rough guess for their password, might only need to test
18
+ every candidate password that's similar enough to the guess.
19
+ - This may be a much faster and cheaper computation
20
+ than the one an adversary must do, without such a guess, but in possession
21
+ of a stolen password protected file[^0].
22
+
23
+ ### Warning
24
+ Strictly speaking, Fiddlesticks is a password-protected file recovery tool. Use it to
25
+ get your files back. But once you've found a password that protected those files via Fiddlesticks
26
+ (or any third party tool) it should not be used again. Anywhere else it is also used, the
27
+ password should be reset (or the files re-encrypted with a different one). By default,
28
+ Fiddlesticks does not print the password it finds (or any candidates) unless `-P` is set
29
+ (or if using `--pipe` with no pipe).
30
+
31
+ ### "Back of envelope" sketch 'calculation'
32
+ - Attackers targetting a truly[^0] random password, must try up to `2**N`
33
+ candidate passwords (for each bit length `N` being considered).
34
+ - Specifically, password owners may only need to consider every candidate within some
35
+ maximum [Weighted-Levenshtein distance](https://en.wikipedia.org/wiki/Edit_distance#Types_of_edit_distance)
36
+ from their best guess of the forgotten password, lets say a total of `M`.
37
+ - Fiddlesticks is intended to assist recovering passwords from "close enough" guesses,
38
+ when `M` is much smaller than `2**N`.
39
+ - If Fiddlesticks can crack an archive's password with a starting guess of an empty string,
40
+ (if `2**N` is also small enough to be feasible, with no guess) then anyone with the
41
+ archive can also do so - the password wasn't strong enough.
42
+ - If Fiddlesticks fails to crack an archive's password given some starting guess, a lower
43
+ bound on how similar the actual password is to the starting guess can still be deduced
44
+ (e.g. this could indicate that the starting guess was wrong).
45
+
46
+ ### Design and security notes
47
+ *"FAQ: Why the heck should anyone in their right mind trust this with their password?"*
48
+ - Any similar 3rd party password cracking service based on 'best guess' passwords, requires
49
+ the user to share the guesses for their passwords with the service. Even if the password
50
+ was not used for anything else, sharing even guesses for secret credentials with 3rd parties,
51
+ is a critical security issue.
52
+ - Fiddlesticks is designed to minimise the need for this. It is designed to i) be as easy
53
+ to install as possible, and in particular ii) require as few dependencies as possible.
54
+ Firstly, the intention of i) is to assist users to run Fiddlesticks in their own secure
55
+ environment, locked down as much as they want (e.g. offline and disconnected from
56
+ all external network access), without requiring them to take their
57
+ password guesses outside of that. For example, for recovery of password encrypted .7z archives,
58
+ only a normal installation of 7zip is required on Linux (plus a close enough guess of the password!).
59
+ Fiddlesticks can even generate a file of candidate passwords, for external programs, and other
60
+ possible applications. Secondly, ii) helps users decide for themselves whether or not to trust Fiddlesticks
61
+ in the first place. In particular whether or not it will take their password guesses outside
62
+ of its running environment. When the project was concieved, the intention was also to
63
+ iii) require as little code as possible. But the code base has since become somewhat more
64
+ complex, mainly to have a nice CLI. Simplicity and brevity should both be much
65
+ more highly prized features of software in general. But you
66
+ be the judge of whether or not c) is still the case. The application code is all in a single file.
67
+
68
+ #### General security audit
69
+ If considering using any password recovery program at all, perhaps consider the following:
70
+ - does it contain code contained in string literals or obfuscated code?
71
+ - does it utilise arbitrary code execution functions (e.g. `eval`, `exec` and `compile`)?
72
+ - is all the source code visible?
73
+ - does it contain thousands of lines of code?
74
+ - does it require hundreds of third-party dependencies?
75
+ - does it contain compiled binary executables, that are not easily readable?
76
+ - is the code statically typed (so run-time features of dynamic languages are minimised)?
77
+ - is all the code tested?
78
+ - is it tested with high coverage (so all the code really is run, somewhere in the tests)?
79
+ - does it import or install any libraries that allow communication across a network, that
80
+ could be used for exfiltration purposes?
81
+ - does it require root privileges to run?
82
+ - can it be run on any operating system, and in any Docker container?
83
+
84
+ Full disclaimer: Fiddlesticks does actually contain 8 lines of Bash in a string
85
+ literal (to avoid the overhead of `subprocess.run` for every single candidate to be
86
+ tested, and to demonstrate how any command line program could read
87
+ password candidates from stdin). Otherwise we hope the answers to all the other questions
88
+ with regards to Fiddlesticks, are all reassuring.
89
+
90
+ ### Usage
91
+ ```
92
+ uvx fiddlesticks
93
+ ```
94
+
95
+ For 7z archives, it is possible to simply to automate attempts to open the file via a stock
96
+ 7zip installed in the system, e.g. from:
97
+ ```
98
+ sudo apt update && sudo apt-get install 7zip
99
+ ```
100
+
101
+ Fiddlesticks can also decrypt KeepassXC vaults and Aegis vault files (for TOTP authenticators) if
102
+ [pykeepass](https://pypi.org/project/pykeepass/) and [py-avdu](https://pypi.org/project/py-avdu/) respectively, are
103
+ also installed.
104
+
105
+ There are a couple of alternative modes too,
106
+
107
+ - firstly: automating any partial external Bash command that a candidate password can be appended to (that exits with return code 0
108
+ for the correct password, otherwise some non-zero exit code). Specify `--shell` or by default if the partial command is specified after `--`.
109
+
110
+ Secondly with `--pipe` candidate passwords can be sent to stdout, from where they can be piped to stdin of a user's own external program or code (all the normal output from fiddlesticks goes to stderr).
111
+
112
+ Thirdly, if py7zr is also installed, with `--py7zr` fiddlesticks can use it to test passwords for 7z archives,
113
+ entirely within Python.
114
+
115
+ ### Main options
116
+ #### Password guesses
117
+ If no password is specified, and if a password guess is requires for the selected command,
118
+ the user will be prompted to enter their password guesses securely (via Python's `getpass.getpass`).
119
+ For convenience passwords may also be supplied on separate lines of a text file specified
120
+ in `--input-file`, or directly on the command line, each after `--password-guess` or `-p`. If using
121
+ the latter in Bash and similar shells, please be aware the full command entered may be saved
122
+ in the Bash history. After using Fiddlesticks you should run `history -a` and
123
+ asome `history -d $(history 1 | awk '{print $1}')` command to clear this.
124
+
125
+ #### Number of substitutions
126
+ For candidate password generation strategies that use character substitutions (the only ones supported so far)
127
+ the number of substitutions required for each candidate can be capped by setting `--max-subs`
128
+
129
+ #### Output control & verbosity
130
+ If a file is specified in `--output-file` or `-o` Fiddlesticks will write a successfully found
131
+ password to it. Unless `-P` or `--print-passwords` is set, Fiddlesticks does not print any
132
+ candidate passwords by default (on successfully finding a password, the
133
+ candidate number is printed; candidate generation is deterministic).
134
+ The number of output messages (printed to stderr) can be increased by raising
135
+ the verbosity, by setting `-v` or `--verbosity`, once or twice (e.g. `-vv`).
136
+ "Two" is the maximum verbosity available.
137
+
138
+ ### Custom alternative character maps
139
+
140
+ Any custom JSON file supplied to `--char-map` containing a mapping of characters to alternatives can be used (instead of the default L33t substitutions and capitalisations ascii-based map). To assist creating this, the default map (or the relevant
141
+ sub-mapping applicable for a specified password guess) can be printed to stderr with `--print-char-map` (and `>>`ed
142
+ to a local file, where its JSON can be customised in any text editor). This provides a simple method for
143
+ limiting the substitutions to specific characters in a password guess.
144
+
145
+ ### Other Notes
146
+ - Successful attempts to extract a password-protected archive, result in the archive being
147
+ unencrypted (naturally) by some methods. Currently all such plaintext unencrypted archives
148
+ are not deleted from the file system afterwards. If the options `--extract-to` or `-x`
149
+ are given, archives are extracted there.
150
+ - Fiddlesticks cannot recover passwords for online accounts. Online password entry attempts
151
+ should be rate limited. Cracking is only possible locally if the website owner shares the
152
+ password hash with the user, in which case they can probably provide the rest of their
153
+ account data too.
154
+ - If Fiddlesticks fails to 'crack' or find a known password, this should not be taken as
155
+ proof of the password's strength. It won't ever be possible to think everything, and
156
+ we certainly don't wish users to draw a false sense of security from Fiddlesticks.
157
+
158
+ ## Alternatives
159
+ - https://github.com/philsmd/7z2hashcat
160
+ - https://en.wikipedia.org/wiki/Dictionary_attack#Dictionary_attack_software
161
+
162
+ [^0] Truly random passwords are difficult for humans to remember (without writing them down or saving them).
163
+ At the very least, real world adversaries (posessing a stolen file or password hash) are likely to first attempt a [dictionary attack](https://en.wikipedia.org/wiki/Dictionary_attack#Dictionary_attack_software)
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "fiddlesticks"
7
- description = "Password recovery tool for encrypted archives (currently only .7z files supported)."
7
+ description = "Password recovery tool for encrypted files (.7z archives .kdbx files, and Aegis archives)."
8
8
  readme = "README.md"
9
9
  license = "MIT"
10
10
  license-files = ["LICENSE"]
@@ -13,14 +13,8 @@ authors = [
13
13
  ]
14
14
  requires-python = ">=3.12"
15
15
  dynamic=["version"]
16
- dependencies = []
17
-
18
- [project.optional-dependencies]
19
- py7zr = ["py7zr"]
20
- aegis = ["py-avdu"]
21
- keepassxc = ["pykeepass"]
22
- tests = ["pytest", "hypothesis"]
23
16
 
17
+ dependencies = []
24
18
 
25
19
  [project.urls]
26
20
  GitHub = "https://github.com/Hazardous-Area/fiddlesticks"
@@ -28,6 +22,37 @@ GitHub = "https://github.com/Hazardous-Area/fiddlesticks"
28
22
  [project.scripts]
29
23
  fiddlesticks = "fiddlesticks:cli"
30
24
 
25
+ [project.optional-dependencies]
26
+ py7zr = [
27
+ "py7zr",
28
+ ]
29
+ aegis = [
30
+ "py-avdu",
31
+ ]
32
+ keepassxc = [
33
+ "pykeepass",
34
+ ]
35
+
36
+ [dependency-groups]
37
+ dev = [
38
+ {include-group = "lint"},
39
+ {include-group = "test"},
40
+ ]
41
+ test = [
42
+ "fiddlesticks[py7zr,aegis,keepassxc]",
43
+ "pytest",
44
+ "hypothesis",
45
+ "coverage>=7.13",
46
+ "covdefaults",
47
+ ]
48
+ lint = [
49
+ "ruff",
50
+ "ty",
51
+ "pre-commit",
52
+ ]
53
+
54
+
55
+
31
56
  [tool.hatch.build.targets.wheel]
32
57
  only-include = ["src"]
33
58
  sources = {"src" = ""} # move from "src" directory for wheel
@@ -35,7 +60,6 @@ sources = {"src" = ""} # move from "src" directory for wheel
35
60
  [tool.hatch.version]
36
61
  path = "src/fiddlesticks.py"
37
62
 
38
-
39
63
  [tool.pytest.ini_options]
40
64
  markers = [
41
65
  "slow: marks other tests that cause bottlenecks",
@@ -43,3 +67,10 @@ markers = [
43
67
  ]
44
68
  python_files = "test_*.py *_test.py *_tests.py"
45
69
 
70
+ [tool.coverage.run]
71
+ source = ["src"]
72
+ omit = ["tests/*"]
73
+ patch = ["subprocess"]
74
+ plugins = [
75
+ "covdefaults",
76
+ ]