From 8a60d7e506a26966155380342360d755d9e6b42e Mon Sep 17 00:00:00 2001 From: Peter Weidenbach Date: Wed, 15 Apr 2020 09:05:36 +0200 Subject: [PATCH] avm kernel signatures added and pylint issues corrected --- fact_helper_file/mime/custom_mime_encoding | 0 fact_helper_file/mime/custom_mime_firmware_containers | 0 fact_helper_file/mime/custom_mime_linux | 8 ++++++++ setup.py | 9 +++++---- 4 files changed, 13 insertions(+), 4 deletions(-) mode change 100755 => 100644 fact_helper_file/mime/custom_mime_encoding mode change 100755 => 100644 fact_helper_file/mime/custom_mime_firmware_containers diff --git a/fact_helper_file/mime/custom_mime_encoding b/fact_helper_file/mime/custom_mime_encoding old mode 100755 new mode 100644 diff --git a/fact_helper_file/mime/custom_mime_firmware_containers b/fact_helper_file/mime/custom_mime_firmware_containers old mode 100755 new mode 100644 diff --git a/fact_helper_file/mime/custom_mime_linux b/fact_helper_file/mime/custom_mime_linux index 20cb7b3d..18e42382 100644 --- a/fact_helper_file/mime/custom_mime_linux +++ b/fact_helper_file/mime/custom_mime_linux @@ -501,3 +501,11 @@ >207 string >\0 \b, version %s >272 string >\0 \b, machine %s >337 string >\0 \b, domain %s + +# AVM Linux Kernel Container + +0 string \x81\x12\xed\xfe AVM Kernel Image V1 +!:mime linux/avm-kernel-image-v1 + +0 string \x12\x91\xed\xfe AVM Kernel Image V2 +!:mime linux/avm-kernel-image-v2 diff --git a/setup.py b/setup.py index 931d7db6..6fa35d64 100755 --- a/setup.py +++ b/setup.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import sys from pathlib import Path from subprocess import Popen, PIPE @@ -31,19 +32,19 @@ def execute_shell_command(shell_command): os.makedirs(str(MIME_DIR.parent / 'bin'), exist_ok=True) with OperateInDirectory(str(MIME_DIR)): - file_output, file_code = execute_shell_command( + FILE_OUTPUT, FILE_CODE = execute_shell_command( '(cat custom_* > custommime)' ' && file -C -m custommime' ' && mv -f custommime.mgc ../bin/' ' && rm custommime' ) - if file_code != 0: - exit('Failed to properly compile magic file\n{}'.format(file_output)) + if FILE_CODE != 0: + sys.exit('Failed to properly compile magic file\n{}'.format(FILE_OUTPUT)) setup( name=MODULE_NAME, - version='0.2.6', + version='0.2.7', description='Helper functions for file type generation', author='Johannes vom Dorp', url='https://github.com/fkie-cad/fact_helper_file',