acquire icon indicating copy to clipboard operation
acquire copied to clipboard

Module keeps running in infinite loop when package is missing

Open OlafHaalstra opened this issue 11 months ago • 2 comments

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

OlafHaalstra avatar Jan 29 '25 14:01 OlafHaalstra

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.

OlafHaalstra avatar Jan 29 '25 14:01 OlafHaalstra

Can you provide a stacktrace? We're not quite sure where this could be originating from within acquire.

Schamper avatar Jan 30 '25 09:01 Schamper

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

Paradoxis avatar Jun 04 '25 09:06 Paradoxis

This is bothering me as well. I see 3 options to fix this.

  1. Make dissect.sql a dependency in acquire.
  2. Make dissect.sql a dependency in dissect.target
  3. Wrap the from dissect.target.plugins.os.windows.cam import CamPlugin line in a try/except statement.

I'd pick option 2, but let me know which one is preferred and I'll create a PR.

qmadev avatar Aug 27 '25 00:08 qmadev

Let's do 2. SQLite is used often enough to move it to the default dependencies.

Schamper avatar Aug 27 '25 07:08 Schamper