Skip to content

Commit 963645a

Browse files
committed
Fix unit tests and clean up project
1 parent dc61729 commit 963645a

File tree

8 files changed

+540
-302
lines changed

8 files changed

+540
-302
lines changed

.coverage

52 KB
Binary file not shown.

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
uses: actions/setup-python@v4
2121
with:
2222
python-version: ${{ matrix.python-version }}
23-
cache: 'pip'
23+
cache: "pip"
2424

2525
- name: Install dependencies
2626
run: |

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
uses: actions/setup-python@v4
1515
with:
1616
python-version: "3.11"
17-
cache: 'pip'
17+
cache: "pip"
1818

1919
- name: Install dependencies
2020
run: |

src/core/binary_loader.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ def __init__(self):
8383
"""Initialize the binary loader."""
8484
# Check for available tools
8585
self._check_tools()
86+
87+
# Define supported binary formats
88+
self.supported_formats = ["elf", "pe", "macho"]
8689

8790
def _check_tools(self) -> None:
8891
"""Check for available binary analysis tools."""

src/core/pipeline.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -167,21 +167,6 @@ def _run(self) -> Dict[str, Any]:
167167

168168
logger.info("Analysis completed successfully")
169169
return self.results
170-
"""
171-
Initialize the reverse engineering pipeline.
172-
173-
Args:
174-
binary_path: Path to the binary file to analyze
175-
output_dir: Directory to store output files
176-
config: Configuration object
177-
decompiler: Decompiler to use (ghidra, ida, binja, auto)
178-
generate_tests: Whether to generate test harnesses
179-
"""
180-
self.binary_path = binary_path
181-
self.output_dir = output_dir
182-
self.config = config
183-
self.decompiler_name = decompiler
184-
self.generate_tests = generate_tests
185170

186171
self.binary_loader = None
187172
self.decompiler = None

src/decompilers/decompiler_factory.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,21 @@ class DecompilerFactory:
2323
requested decompiler name or binary information.
2424
"""
2525

26+
def get_decompiler(self, decompiler_name: str = "auto") -> BaseDecompiler:
27+
"""
28+
Get a decompiler instance.
29+
30+
Args:
31+
decompiler_name: Name of the decompiler to create (ghidra, ida, binja, auto)
32+
33+
Returns:
34+
Initialized decompiler instance
35+
36+
Raises:
37+
ValueError: If the requested decompiler is not supported
38+
"""
39+
return self.create(decompiler_name)
40+
2641
def create(self, decompiler_name: str = "auto") -> BaseDecompiler:
2742
"""
2843
Create a decompiler instance.

0 commit comments

Comments
 (0)