fix mypy
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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."""
|
||||
|
||||
@@ -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]:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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]:
|
||||
"""
|
||||
|
||||
@@ -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]:
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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]
|
||||
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user