-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor analysis module and backends (#27)
* Fix plugin settings * Remove unused code in analysis module * Refactor metrics with a schema dataclass * Fix minor bugs in frontend CLI and binary ninja
- Loading branch information
Showing
9 changed files
with
99 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,6 @@ | |
""" | ||
import typing as t | ||
|
||
from os.path import dirname, abspath | ||
from pathlib import Path | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
""" | ||
test_main.py | ||
Tests main functionality, including | ||
""" | ||
|
||
import unittest | ||
|
||
from pathlib import Path | ||
|
||
from fuzzable.analysis import AnalysisMode | ||
from fuzzable.analysis.angr import AngrAnalysis | ||
from fuzzable.analysis.ast import AstAnalysis | ||
|
||
|
||
class TestMain(unittest.TestCase): | ||
def test_basic(self): | ||
data = [1, 2, 3] | ||
result = sum(data) | ||
self.assertEqual(result, 6) | ||
|
||
def test_analysis_binary(self): | ||
target = Path("examples/binaries/libbasic.so.1") | ||
analyzer = AngrAnalysis(target, mode=AnalysisMode.RANK) | ||
analyzer.run() | ||
|
||
def test_analysis_source_file(self): | ||
target = Path("examples/source/libbasic.c") | ||
analyzer = AstAnalysis([target], mode=AnalysisMode.RANK) | ||
analyzer.run() | ||
|
||
def test_analysis_source_folder(self): | ||
target = Path("examples/source/libyaml") | ||
analyzer = AstAnalysis(target, mode=AnalysisMode.RANK) | ||
analyzer.run() | ||
|
||
|
||
if __name__ == "__main__": | ||
unittest.main() |