From b818a478340723141dc6c53a73d5bf36d8f15196 Mon Sep 17 00:00:00 2001 From: Joachim Metz Date: Tue, 11 Aug 2020 08:39:41 +0200 Subject: [PATCH] Added fsext back-end #464 --- dfvfs/analyzer/ext_analyzer_helper.py | 10 +++++++++- dfvfs/analyzer/tsk_analyzer_helper.py | 5 +++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/dfvfs/analyzer/ext_analyzer_helper.py b/dfvfs/analyzer/ext_analyzer_helper.py index 6f498e7b..2ffddda0 100644 --- a/dfvfs/analyzer/ext_analyzer_helper.py +++ b/dfvfs/analyzer/ext_analyzer_helper.py @@ -28,9 +28,17 @@ def GetFormatSpecification(self): self.type_indicator) # EXT file system signature. - format_specification.AddNewSignature(b'\x53\xef', offset=56) + format_specification.AddNewSignature(b'\x53\xef', offset=1080) return format_specification + def IsEnabled(self): + """Determines if the analyzer helper is enabled. + + Returns: + bool: True if the analyzer helper is enabled. + """ + return definitions.PREFERRED_EXT_BACK_END == self.TYPE_INDICATOR + analyzer.Analyzer.RegisterHelper(EXTAnalyzerHelper()) diff --git a/dfvfs/analyzer/tsk_analyzer_helper.py b/dfvfs/analyzer/tsk_analyzer_helper.py index 9dbdf1fb..b920c853 100644 --- a/dfvfs/analyzer/tsk_analyzer_helper.py +++ b/dfvfs/analyzer/tsk_analyzer_helper.py @@ -46,8 +46,9 @@ def GetFormatSpecification(self): # HFSX file system signature. format_specification.AddNewSignature(b'HX', offset=1024) - # Ext file system signature. - format_specification.AddNewSignature(b'\x53\xef', offset=1080) + if definitions.PREFERRED_EXT_BACK_END == self.TYPE_INDICATOR: + # Ext file system signature. + format_specification.AddNewSignature(b'\x53\xef', offset=1080) # ISO9660 file system signature. format_specification.AddNewSignature(b'CD001', offset=32769)