Skip to content

Commit 8f0f4f5

Browse files
committed
feat: added xar support to sevenz unpacker
1 parent 03050d8 commit 8f0f4f5

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

fact_extractor/plugins/unpacking/sevenz/code/sevenz.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
'application/x-rpm',
3030
'application/x-vhd',
3131
'application/x-vhdx',
32+
'application/x-xar',
3233
'application/x-zip-compressed',
3334
'application/zip',
3435
# file systems
897 Bytes
Binary file not shown.

fact_extractor/plugins/unpacking/sevenz/test/test_plugin_sevenz.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,19 @@ def test_unpacker_selection_generic(self):
1515
self.check_unpacker_selection(item, '7z')
1616

1717
@pytest.mark.parametrize(
18-
('test_file', 'prefix'),
18+
('test_file', 'prefix', 'ignore'),
1919
[
20-
('test.7z', 'get_files_test'),
21-
('test.rar', 'get_files_test'),
22-
('test.arj', 'get_files_test'),
23-
('cramfs.img', ''),
24-
('test.iso', ''),
20+
('test.7z', 'get_files_test', set()),
21+
('test.rar', 'get_files_test', set()),
22+
('test.arj', 'get_files_test', set()),
23+
('test.xar', 'get_files_test', {'[TOC].xml'}),
24+
('cramfs.img', '', set()),
25+
('test.iso', '', set()),
2526
],
2627
)
27-
def test_extraction(self, test_file, prefix):
28+
def test_extraction(self, test_file, prefix, ignore):
2829
meta = self.check_unpacking_of_standard_unpack_set(
29-
TEST_DATA_DIR / test_file,
30-
additional_prefix_folder=prefix,
31-
output=True,
30+
TEST_DATA_DIR / test_file, additional_prefix_folder=prefix, output=True, ignore=ignore
3231
)
3332
assert 'password' not in meta, 'password incorrectly set'
3433

0 commit comments

Comments
 (0)