Skip to content

Commit

Permalink
Merge pull request #11 from fkie-cad/avm_kernel_image
Browse files Browse the repository at this point in the history
avm kernel signatures added and pylint issues corrected
  • Loading branch information
dorpvom authored Apr 15, 2020
2 parents 0ad2408 + 8a60d7e commit 7f46ef1
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
Empty file modified fact_helper_file/mime/custom_mime_encoding
100755 → 100644
Empty file.
Empty file modified fact_helper_file/mime/custom_mime_firmware_containers
100755 → 100644
Empty file.
8 changes: 8 additions & 0 deletions fact_helper_file/mime/custom_mime_linux
Original file line number Diff line number Diff line change
Expand Up @@ -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
9 changes: 5 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env python

import os
import sys
from pathlib import Path
from subprocess import Popen, PIPE

Expand Down Expand Up @@ -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',
Expand Down

0 comments on commit 7f46ef1

Please sign in to comment.