This commit is contained in:
Zeecka
2026-01-02 21:01:44 +01:00
parent 2e602959ce
commit 456e041892
12 changed files with 24 additions and 24 deletions
+2 -2
View File
@@ -11,8 +11,8 @@ from .base_analyzer import SubprocessAnalyzer
class BinwalkAnalyzer(SubprocessAnalyzer):
"""Analyzer for binwalk."""
def __init__(self, *args) -> None:
super().__init__("binwalk", *args, has_archive=True)
def __init__(self, input_img, output_dir) -> None:
super().__init__("binwalk", input_img, output_dir, has_archive=True)
self.cmd = ["binwalk", "--matryoshka", "-e", self.img, "--run-as=root"]
self.make_folder = False # Binwalk already create its own folder
+2 -2
View File
@@ -15,8 +15,8 @@ from .base_analyzer import SubprocessAnalyzer
class DecomposerAnalyzer(SubprocessAnalyzer):
"""Analyzer for bits decomposer."""
def __init__(self, *args: Any) -> None:
super().__init__("decomposer", *args)
def __init__(self, input_img, output_dir: Any) -> None:
super().__init__("decomposer", input_img, output_dir)
def get_results(self, _: Optional[str] = None) -> dict[str, Any]:
"""Analyze an image submission using bits decomposition."""
+2 -2
View File
@@ -12,8 +12,8 @@ from .base_analyzer import SubprocessAnalyzer
class ExiftoolAnalyzer(SubprocessAnalyzer):
"""Analyzer for exiftool."""
def __init__(self, *args: Any) -> None:
super().__init__("exiftool", *args)
def __init__(self, input_img, output_dir: Any) -> None:
super().__init__("exiftool", input_img, output_dir)
self.cmd = ["exiftool", "-a", "-u", "-g1", self.img]
def process_output(self, stdout: str, stderr: str) -> dict[str, str]:
+2 -2
View File
@@ -12,8 +12,8 @@ from .base_analyzer import SubprocessAnalyzer
class ForemostAnalyzer(SubprocessAnalyzer):
"""Analyzer for foremost."""
def __init__(self, *args: Any) -> None:
super().__init__("foremost", *args, has_archive=True)
def __init__(self, input_img, output_dir: Any) -> None:
super().__init__("foremost", input_img, output_dir, has_archive=True)
self.cmd = ["foremost", "-o", str(self.get_extracted_dir()), "-i", self.img]
def is_error(self, returncode: int, stdout: str, stderr: str, zip_exist: bool) -> bool:
+2 -2
View File
@@ -17,8 +17,8 @@ class ResizeAnalyzer(SubprocessAnalyzer):
png: PNG
def __init__(self, *args: Any) -> None:
super().__init__("image_resize", *args, has_archive=True)
def __init__(self, input_img, output_dir: Any) -> None:
super().__init__("image_resize", input_img, output_dir, has_archive=True)
def _lookup_crc(self) -> List[PNG]:
"""
+2 -2
View File
@@ -12,8 +12,8 @@ from .base_analyzer import SubprocessAnalyzer
class OpenStegoAnalyzer(SubprocessAnalyzer):
"""Analyzer for openstego."""
def __init__(self, *args: Any) -> None:
super().__init__("openstego", *args, has_archive=True)
def __init__(self, input_img, output_dir: Any) -> None:
super().__init__("openstego", input_img, output_dir, has_archive=True)
self.algo = 0
def build_cmd(self, password: Optional[str] = None) -> list[str]:
+2 -2
View File
@@ -12,8 +12,8 @@ from .base_analyzer import SubprocessAnalyzer
class OutguessAnalyzer(SubprocessAnalyzer):
"""Analyzer for outguess."""
def __init__(self, *args: Any) -> None:
super().__init__("outguess", *args, has_archive=True)
def __init__(self, input_img, output_dir: Any) -> None:
super().__init__("outguess", input_img, output_dir, has_archive=True)
def build_cmd(self, password: Optional[str] = None) -> list[str]:
extracted_dir = self.get_extracted_dir()
+2 -2
View File
@@ -12,8 +12,8 @@ from .base_analyzer import SubprocessAnalyzer
class PngcheckAnalyzer(SubprocessAnalyzer):
"""Analyzer for pngcheck."""
def __init__(self, *args: Any) -> None:
super().__init__("pngcheck", *args)
def __init__(self, input_img, output_dir: Any) -> None:
super().__init__("pngcheck", input_img, output_dir)
self.cmd = ["pngcheck", "-v", self.img]
def is_error(self, returncode: int, stdout: str, stderr: str, zip_exist: bool) -> bool:
+2 -2
View File
@@ -13,8 +13,8 @@ from .base_analyzer import SubprocessAnalyzer
class SteghideAnalyzer(SubprocessAnalyzer):
"""Analyzer for steghide."""
def __init__(self, *args: Any) -> None:
super().__init__("steghide", *args, has_archive=True)
def __init__(self, input_img, output_dir: Any) -> None:
super().__init__("steghide", input_img, output_dir, has_archive=True)
def build_cmd(self, password: Optional[str] = None) -> list[str]:
if password is None:
+2 -2
View File
@@ -12,8 +12,8 @@ from .base_analyzer import SubprocessAnalyzer
class StringsAnalyzer(SubprocessAnalyzer):
"""Analyzer for strings."""
def __init__(self, *args: Any) -> None:
super().__init__("strings", *args)
def __init__(self, input_img, output_dir: Any) -> None:
super().__init__("strings", input_img, output_dir)
self.cmd = ["strings", self.img]
+2 -2
View File
@@ -12,8 +12,8 @@ from .base_analyzer import SubprocessAnalyzer
class TemplateAnalyze(SubprocessAnalyzer):
"""Analyzer for <toolname>."""
def __init__(self, *args: Any) -> None:
super().__init__("<toolname>", *args, has_archive=True)
def __init__(self, input_img, output_dir: Any) -> None:
super().__init__("<toolname>", input_img, output_dir, has_archive=True)
def build_cmd(self, password: Optional[str] = None) -> list[str]:
if password:
+2 -2
View File
@@ -12,8 +12,8 @@ from .base_analyzer import SubprocessAnalyzer
class ZstegAnalyzer(SubprocessAnalyzer):
"""Analyzer for zsteg."""
def __init__(self, *args: Any) -> None:
super().__init__("zsteg", *args)
def __init__(self, input_img, output_dir: Any) -> None:
super().__init__("zsteg", input_img, output_dir)
self.cmd = ["zsteg", self.img]
def is_error(self, returncode: int, stdout: str, stderr: str, zip_exist: bool) -> bool: