-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix compression in zip outputs when compress option is supplied #182
Conversation
@ruzzle thank you for your contribution! As this is your first code contribution, please read the following Contributor License Agreement (CLA). If you agree with the CLA, please reply with the following information:
Contributor License Agreement
Contribution License AgreementThis Contribution License Agreement ("Agreement") governs your Contribution(s) (as defined below) and conveys certain license rights to Fox-IT B.V. ("Fox-IT") for your Contribution(s) to Fox-IT"s open source Dissect project. This Agreement covers any and all Contributions that you ("You" or "Your"), now or in the future, Submit (as defined below) to this project. This Agreement is between Fox-IT B.V. and You and takes effect when you click an “I Accept� button, check box presented with these terms, otherwise accept these terms or, if earlier, when You Submit a Contribution.
|
@DissectBot agree [company="Northwave"] |
Nice catch @ruzzle! Ideally this should be something configurable, though that is out of the scope for this PR. Would you be able to say which tools currently have trouble reading LZMA compressed ZIP files? |
Specifically, we are using velociraptor to process dissect acquire collects via its deaddisk remapping functionality. See https://docs.velociraptor.app/blog/2022/2022-03-22-deaddisk/ We try to tune acquire to output compatible output (zip / deflate), velociraptor doesn't like lzma apparently |
Is there already a bug report for Velo to support LZMA? Besides us supporting one or the other, I think Velo could also benefit. |
Now there is 😉: Velocidex/velociraptor#3608 |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #182 +/- ##
==========================================
- Coverage 43.39% 43.37% -0.02%
==========================================
Files 26 26
Lines 3374 3375 +1
==========================================
Hits 1464 1464
- Misses 1910 1911 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
The zip outputs of acquire ignored the compression type given, due to the use of zipfile.ZipInfo without supplying a compression type to these objects. This PR fixes that.
I also changed the compression type to deflate, as this is better supported throughout other forensic tools (read: tools we use ourselves to process acquire collects)