diff --git a/fact_extractor/plugins/unpacking/generic_carver/code/generic_carver.py b/fact_extractor/plugins/unpacking/generic_carver/code/generic_carver.py index f2adc4ce..fdafaf94 100644 --- a/fact_extractor/plugins/unpacking/generic_carver/code/generic_carver.py +++ b/fact_extractor/plugins/unpacking/generic_carver/code/generic_carver.py @@ -13,7 +13,7 @@ VERSION = '0.8' TAR_MAGIC = b'ustar' - +TIMEOUT = 280 def unpack_function(file_path, tmp_dir): ''' @@ -22,7 +22,7 @@ def unpack_function(file_path, tmp_dir): ''' logging.debug('File Type unknown: execute binwalk on {}'.format(file_path)) - output = execute_shell_command(f'binwalk --extract --carve --signature --directory {tmp_dir} {file_path}') + output = execute_shell_command(f'timeout {TIMEOUT} binwalk --extract --carve --signature --directory {tmp_dir} {file_path}') drop_underscore_directory(tmp_dir) return {'output': output, 'filter_log': ArchivesFilter(tmp_dir).remove_false_positive_archives()}