fkie-cad / fact_extractor

Standalone Utility for FACT-like extraction
GNU General Public License v3.0
80 stars 31 forks source link

Update zlib.py #69

Closed Caesurus closed 3 years ago

Caesurus commented 3 years ago

according to https://tools.ietf.org/id/draft-levine-application-gzip-03.html#rfc.section.2 the mime-type application/zlib is also valid, and so should be handled by this plugin.

codecov[bot] commented 3 years ago

Codecov Report

Merging #69 into master will increase coverage by 1.31%. The diff coverage is 98.98%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #69      +/-   ##
==========================================
+ Coverage   88.07%   89.39%   +1.31%     
==========================================
  Files         119      124       +5     
  Lines        3556     3659     +103     
==========================================
+ Hits         3132     3271     +139     
+ Misses        424      388      -36     
Impacted Files Coverage Δ
...npacking/linuxkernel/test/test_pattern_searcher.py 96.29% <96.29%> (ø)
...ugins/unpacking/linuxkernel/test/test_extractor.py 97.05% <97.05%> (ø)
.../plugins/unpacking/linuxkernel/code/linuxkernel.py 100.00% <100.00%> (ø)
...lugins/unpacking/linuxkernel/internal/extractor.py 100.00% <100.00%> (ø)
...unpacking/linuxkernel/internal/pattern_searcher.py 100.00% <100.00%> (ø)
...acking/linuxkernel/test/test_plugin_linuxkernel.py 100.00% <100.00%> (ø)
fact_extractor/plugins/unpacking/zlib/code/zlib.py 100.00% <100.00%> (ø)
fact_extractor/unpacker/unpack.py 92.30% <100.00%> (ø)
fact_extractor/bin/uefi-firmware-parser
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 564343f...67934a2. Read the comment docs.

Caesurus commented 3 years ago

Shoot, I had meant to do two PRs, one for the zlib mime-type, and then another separate one for the linux kernel stuff, but silly me... I made the zlib change via the github web UI, and then when I cloned locally I forgot to branch off and kept working in master.

I have some changes i haven't pushed yet. and I'll incorporate your review comments as well. I'll As such, I'll convert this to draft for the time being. Sorry for the mixup :)

Caesurus commented 3 years ago

Ok, should be ok now. I went and compiled a kernel as small as i easily could (make tinyconfig) and made a bzImage for each compression supported in the kernel menuconfig. I checked those in as test data, so there is better coverage of the different compressions (and making sure the tools are actually installed correctly). I don't know how you feel about adding that many binary files to the repo. If it's frowned upon, I can remove a bunch.