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)