From f9fa0ee382510815905f63346db1bcdc9366399a Mon Sep 17 00:00:00 2001 From: Quentin Kaiser Date: Tue, 26 Sep 2023 10:47:22 +0200 Subject: [PATCH] fix(handlers): fix extfs handler for samples with spaces in their names. The Command extractor definition for our extfs handler was defined so that a sample with space in its name would make debugfs go haywire since the path was not properly quoted. debugfs -R 'rdump / a_sample_with_no_space.ext4_extract' sample.ext4 -> works debugfs -R 'rdump / a sample with space.ext4_extract' sample.ext4 -> does not work Fixed by quoting the output dir :) --- unblob/handlers/filesystem/extfs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unblob/handlers/filesystem/extfs.py b/unblob/handlers/filesystem/extfs.py index d3cb273ab7..f3c524f101 100644 --- a/unblob/handlers/filesystem/extfs.py +++ b/unblob/handlers/filesystem/extfs.py @@ -64,7 +64,7 @@ class EXTHandler(StructHandler): PATTERN_MATCH_OFFSET = -MAGIC_OFFSET - EXTRACTOR = Command("debugfs", "-R", "rdump / {outdir}", "{inpath}") + EXTRACTOR = Command("debugfs", "-R", 'rdump / "{outdir}"', "{inpath}") def valid_header(self, header) -> bool: if header.s_state not in [0x1, 0x2]: