Skip to content

Commit

Permalink
Merge branch 'main' of github.com:purseclab/Patcherex2
Browse files Browse the repository at this point in the history
  • Loading branch information
burhanr13 committed Jun 14, 2024
2 parents 345a567 + 168e6ab commit ae57986
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/patcherex2/components/binary_analyzers/ghidra.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import logging

import pyhidra

from .binary_analyzer import BinaryAnalyzer

logger = logging.getLogger(__name__)


class Ghidra(BinaryAnalyzer):
def __init__(self, binary_path: str, **kwargs):
import pyhidra

self.ctx = pyhidra.open_program(binary_path)
self.flatapi = self.ctx.__enter__()
self.currentProgram = self.flatapi.getCurrentProgram()
Expand Down
2 changes: 1 addition & 1 deletion src/patcherex2/targets/elf_amd64_linux_recomp.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def get_compiler(self, compiler):
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, **kwargs)
raise NotImplementedError()

0 comments on commit ae57986

Please sign in to comment.