Unverified Commit 7f46ef1f by Johannes vom Dorp Committed by GitHub

Merge pull request #11 from fkie-cad/avm_kernel_image

avm kernel signatures added and pylint issues corrected
parents 0ad2408d 8a60d7e5
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
......@@ -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
#!/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',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment