Module keeps running in infinite loop when package is missing
When dissect.sql is unavailable the history module keeps running in an infinite loop
Expected behaviour After erroring out once I would expect that the module would complete with failed status instead of keep being called
In addition I suspect that there is a dependency from dissect.sql in acquire however when you do pip install acquire it looks like this isn't fetched as a dependency.
Can you provide a stacktrace? We're not quite sure where this could be originating from within acquire.
Currently fails on a fresh pipx installation using Python 3.12:
$ pipx install -f acquire
Installing to existing venv 'acquire'
installed package acquire 3.19, installed using Python 3.12.9
These apps are now globally available
- acquire
- acquire-decrypt
done! ✨ 🌟 ✨
$ sudo $(which acquire) -o "$outputdir" --children --fallback
Traceback (most recent call last):
File "/home/user/.local/bin/acquire", line 5, in <module>
from acquire.acquire import main
File "/home/user/.local/share/pipx/venvs/acquire/lib/python3.12/site-packages/acquire/acquire.py", line 28, in <module>
from dissect.target.plugins.os.windows.cam import CamPlugin
File "/home/user/.local/share/pipx/venvs/acquire/lib/python3.12/site-packages/dissect/target/plugins/os/windows/cam.py", line 6, in <module>
from dissect.sql import SQLite3
ModuleNotFoundError: No module named 'dissect.sql'
Current workaround:
$ pipx inject acquire dissect.sql
This is bothering me as well. I see 3 options to fix this.
- Make
dissect.sqla dependency inacquire. - Make
dissect.sqla dependency indissect.target - Wrap the
from dissect.target.plugins.os.windows.cam import CamPluginline in a try/except statement.
I'd pick option 2, but let me know which one is preferred and I'll create a PR.
Let's do 2. SQLite is used often enough to move it to the default dependencies.