fox-it / dissect.target

The Dissect module tying all other Dissect modules together. It provides a programming API and command line tools which allow easy access to various data sources inside disk images or file collections (a.k.a. targets).
GNU Affero General Public License v3.0
37 stars 41 forks source link

Added the 'sync' command which attempts to reload the current target #694

Open Paradoxis opened 2 months ago

Paradoxis commented 2 months ago

Added a sync command to target-shell which attempts to invalidate the current target by recursively looping over all dissect.* attributes and looks for @lru_cache entries to invalidate with a max-depth of 8. Should help in situations where the a live target (i.e.: a vm) has synced, but the target-shell hasn't, leading to an inconsistent state.

codecov-commenter commented 2 months ago

Codecov Report

Attention: Patch coverage is 3.12500% with 31 lines in your changes are missing coverage. Please review.

Project coverage is 75.10%. Comparing base (b1bcb0d) to head (c1f5548).

Files Patch % Lines
dissect/target/tools/shell.py 3.12% 31 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #694 +/- ## ========================================== - Coverage 75.19% 75.10% -0.10% ========================================== Files 292 292 Lines 24836 24868 +32 ========================================== + Hits 18676 18677 +1 - Misses 6160 6191 +31 ``` | [Flag](https://app.codecov.io/gh/fox-it/dissect.target/pull/694/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=fox-it) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/fox-it/dissect.target/pull/694/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=fox-it) | `75.10% <3.12%> (-0.10%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=fox-it#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.