Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions fact_extractor/plugins/unpacking/patool/code/patool.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,12 @@
'application/x-rzip',
'application/x-shar',
'application/x-tar',
'application/x-xz',
'application/x-zoo',
'application/zpaq',
'application/zstd',
'audio/flac',
]
VERSION = '0.7.0'
VERSION = '0.8.0'

TOOL_PATH = execute_shell_command('which patool').strip()

Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ def test_unpacker_selection_generic(self):
('test.tar.bz2', None),
('test.tar', None),
('test.tar.lz', None),
('test.tar.xz', None),
('test.zoo', None),
('test.zpaq', None),
],
Expand All @@ -49,7 +48,6 @@ def test_archive_extraction(self, in_file, ignore):
'test.lz4',
'test.lzo',
'test.rz',
'test.xz',
'test.zst',
],
)
Expand Down
3 changes: 2 additions & 1 deletion fact_extractor/plugins/unpacking/sevenz/code/sevenz.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
'application/x-vhd',
'application/x-vhdx',
'application/x-xar',
'application/x-xz',
'application/x-zip-compressed',
'application/zip',
# file systems
Expand All @@ -43,7 +44,7 @@
'filesystem/hfs',
'filesystem/ntfs',
]
VERSION = '0.11.0'
VERSION = '0.12.0'

UNPACKER_EXECUTABLE = '7zzs'
ZISOFS_MAGIC = bytes.fromhex('37 E4 53 96 C9 DB D6 07')
Expand Down
14 changes: 10 additions & 4 deletions fact_extractor/plugins/unpacking/sevenz/test/test_plugin_sevenz.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,19 @@ def test_extraction_password(self, test_file):
)
assert meta['password'] == 'test', 'password info not set'

def test_gzip_extraction(self):
input_file = TEST_DATA_DIR / 'test.gz'
@pytest.mark.parametrize(
('test_file', 'stream_type'),
[
('test.gz', 'gzip'),
('test.xz', 'xz'),
],
)
def test_stream_extraction(self, test_file, stream_type):
input_file = TEST_DATA_DIR / test_file
files, meta_data = self.unpacker.extract_files_from_file(str(input_file), self.tmp_dir.name)
assert meta_data['plugin_used'] == '7z'
assert len(files) == 1
assert Path(files[0]).name == 'test.data'
assert 'Type = gzip' in meta_data['output']
assert f'Type = {stream_type}' in meta_data['output']
assert 'Everything is Ok' in meta_data['output']

@pytest.mark.parametrize('file_format', ['zip', 'lzma'])
Expand Down
Loading