Skip to content

Commit

Permalink
add binary_analyzer opts
Browse files Browse the repository at this point in the history
  • Loading branch information
DennyDai committed Nov 22, 2024
1 parent 74b8772 commit 0857869
Show file tree
Hide file tree
Showing 12 changed files with 36 additions and 36 deletions.
6 changes: 3 additions & 3 deletions src/patcherex2/targets/elf_aarch64_linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ def get_binfmt_tool(self, binfmt_tool):
return ELF(self.p, self.binary_path)
raise NotImplementedError()

def get_binary_analyzer(self, binary_analyzer):
def get_binary_analyzer(self, binary_analyzer, **kwargs):
binary_analyzer = binary_analyzer or "angr"
if binary_analyzer == "angr":
return Angr(self.binary_path)
return Angr(self.binary_path, **kwargs)
if binary_analyzer == "ghidra":
return Ghidra(self.binary_path)
return Ghidra(self.binary_path, **kwargs)
raise NotImplementedError()

def get_utils(self, utils):
Expand Down
6 changes: 3 additions & 3 deletions src/patcherex2/targets/elf_amd64_linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ def get_binfmt_tool(self, binfmt_tool):
return ELF(self.p, self.binary_path)
raise NotImplementedError()

def get_binary_analyzer(self, binary_analyzer):
def get_binary_analyzer(self, binary_analyzer, **kwargs):
binary_analyzer = binary_analyzer or "angr"
if binary_analyzer == "angr":
return Angr(self.binary_path)
return Angr(self.binary_path, **kwargs)
if binary_analyzer == "ghidra":
return Ghidra(self.binary_path)
return Ghidra(self.binary_path, **kwargs)
raise NotImplementedError()

def get_utils(self, utils):
Expand Down
6 changes: 3 additions & 3 deletions src/patcherex2/targets/elf_arm_linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ def get_binfmt_tool(self, binfmt_tool):
return ELF(self.p, self.binary_path)
raise NotImplementedError()

def get_binary_analyzer(self, binary_analyzer):
def get_binary_analyzer(self, binary_analyzer, **kwargs):
binary_analyzer = binary_analyzer or "angr"
if binary_analyzer == "angr":
return Angr(self.binary_path)
return Angr(self.binary_path, **kwargs)
if binary_analyzer == "ghidra":
return Ghidra(self.binary_path)
return Ghidra(self.binary_path, **kwargs)
raise NotImplementedError()

def get_utils(self, utils):
Expand Down
6 changes: 3 additions & 3 deletions src/patcherex2/targets/elf_leon3_bare.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@ def get_binfmt_tool(self, binfmt_tool):
return CustomElf(self.p, self.binary_path)
raise NotImplementedError()

def get_binary_analyzer(self, binary_analyzer):
def get_binary_analyzer(self, binary_analyzer, **kwargs):
binary_analyzer = binary_analyzer or "angr"
if binary_analyzer == "angr":
return Angr(self.binary_path)
return Angr(self.binary_path, **kwargs)
if binary_analyzer == "ghidra":
return Ghidra(self.binary_path)
return Ghidra(self.binary_path, **kwargs)
raise NotImplementedError()

def get_utils(self, utils):
Expand Down
6 changes: 3 additions & 3 deletions src/patcherex2/targets/elf_mips64_linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ def get_binfmt_tool(self, binfmt_tool):
return ELF(self.p, self.binary_path)
raise NotImplementedError()

def get_binary_analyzer(self, binary_analyzer):
def get_binary_analyzer(self, binary_analyzer, **kwargs):
binary_analyzer = binary_analyzer or "angr"
if binary_analyzer == "angr":
return Angr(self.binary_path)
return Angr(self.binary_path, **kwargs)
if binary_analyzer == "ghidra":
return Ghidra(self.binary_path)
return Ghidra(self.binary_path, **kwargs)
raise NotImplementedError()

def get_utils(self, utils):
Expand Down
6 changes: 3 additions & 3 deletions src/patcherex2/targets/elf_mips64el_linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ def get_binfmt_tool(self, binfmt_tool):
return ELF(self.p, self.binary_path)
raise NotImplementedError()

def get_binary_analyzer(self, binary_analyzer):
def get_binary_analyzer(self, binary_analyzer, **kwargs):
binary_analyzer = binary_analyzer or "angr"
if binary_analyzer == "angr":
return Angr(self.binary_path)
return Angr(self.binary_path, **kwargs)
if binary_analyzer == "ghidra":
return Ghidra(self.binary_path)
return Ghidra(self.binary_path, **kwargs)
raise NotImplementedError()

def get_utils(self, utils):
Expand Down
6 changes: 3 additions & 3 deletions src/patcherex2/targets/elf_mips_linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ def get_binfmt_tool(self, binfmt_tool):
return ELF(self.p, self.binary_path)
raise NotImplementedError()

def get_binary_analyzer(self, binary_analyzer):
def get_binary_analyzer(self, binary_analyzer, **kwargs):
binary_analyzer = binary_analyzer or "angr"
if binary_analyzer == "angr":
return Angr(self.binary_path)
return Angr(self.binary_path, **kwargs)
if binary_analyzer == "ghidra":
return Ghidra(self.binary_path)
return Ghidra(self.binary_path, **kwargs)
raise NotImplementedError()

def get_utils(self, utils):
Expand Down
6 changes: 3 additions & 3 deletions src/patcherex2/targets/elf_mipsel_linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ def get_binfmt_tool(self, binfmt_tool):
return ELF(self.p, self.binary_path)
raise NotImplementedError()

def get_binary_analyzer(self, binary_analyzer):
def get_binary_analyzer(self, binary_analyzer, **kwargs):
binary_analyzer = binary_analyzer or "angr"
if binary_analyzer == "angr":
return Angr(self.binary_path)
return Angr(self.binary_path, **kwargs)
if binary_analyzer == "ghidra":
return Ghidra(self.binary_path)
return Ghidra(self.binary_path, **kwargs)
raise NotImplementedError()

def get_utils(self, utils):
Expand Down
6 changes: 3 additions & 3 deletions src/patcherex2/targets/elf_ppc64_linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ def get_binfmt_tool(self, binfmt_tool):
return ELF(self.p, self.binary_path)
raise NotImplementedError()

def get_binary_analyzer(self, binary_analyzer):
def get_binary_analyzer(self, binary_analyzer, **kwargs):
binary_analyzer = binary_analyzer or "angr"
if binary_analyzer == "angr":
return Angr(self.binary_path)
return Angr(self.binary_path, **kwargs)
if binary_analyzer == "ghidra":
return Ghidra(self.binary_path)
return Ghidra(self.binary_path, **kwargs)
raise NotImplementedError()

def get_utils(self, utils):
Expand Down
6 changes: 3 additions & 3 deletions src/patcherex2/targets/elf_ppc64le_linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ def get_binfmt_tool(self, binfmt_tool):
return ELF(self.p, self.binary_path)
raise NotImplementedError()

def get_binary_analyzer(self, binary_analyzer):
def get_binary_analyzer(self, binary_analyzer, **kwargs):
binary_analyzer = binary_analyzer or "angr"
if binary_analyzer == "angr":
return Angr(self.binary_path)
return Angr(self.binary_path, **kwargs)
if binary_analyzer == "ghidra":
return Ghidra(self.binary_path)
return Ghidra(self.binary_path, **kwargs)
raise NotImplementedError()

def get_utils(self, utils):
Expand Down
6 changes: 3 additions & 3 deletions src/patcherex2/targets/elf_ppc_linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ def get_binfmt_tool(self, binfmt_tool):
return ELF(self.p, self.binary_path)
raise NotImplementedError()

def get_binary_analyzer(self, binary_analyzer):
def get_binary_analyzer(self, binary_analyzer, **kwargs):
binary_analyzer = binary_analyzer or "angr"
if binary_analyzer == "angr":
return Angr(self.binary_path)
return Angr(self.binary_path, **kwargs)
if binary_analyzer == "ghidra":
return Ghidra(self.binary_path)
return Ghidra(self.binary_path, **kwargs)
raise NotImplementedError()

def get_utils(self, utils):
Expand Down
6 changes: 3 additions & 3 deletions src/patcherex2/targets/elf_x86_linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ def get_binfmt_tool(self, binfmt_tool):
return ELF(self.p, self.binary_path)
raise NotImplementedError()

def get_binary_analyzer(self, binary_analyzer):
def get_binary_analyzer(self, binary_analyzer, **kwargs):
binary_analyzer = binary_analyzer or "angr"
if binary_analyzer == "angr":
return Angr(self.binary_path)
return Angr(self.binary_path, **kwargs)
if binary_analyzer == "ghidra":
return Ghidra(self.binary_path)
return Ghidra(self.binary_path, **kwargs)
raise NotImplementedError()

def get_utils(self, utils):
Expand Down

0 comments on commit 0857869

Please sign in to comment.