-
Notifications
You must be signed in to change notification settings - Fork 312
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
54 changed files
with
7,026 additions
and
4,220 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
REM - Clean up an existing or past 'test session' | ||
taskkill /F /IM "binaryninja.exe" | ||
timeout 1 | ||
REM del "..\..\testcase\*.id0" | ||
REM del "..\..\testcase\*.id1" | ||
REM del "..\..\testcase\*.id2" | ||
REM del "..\..\testcase\*.nam" | ||
REM del "..\..\testcase\*.til" | ||
REM del "..\..\testcase\*.$$$" |
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,18 @@ | ||
set LIGHTHOUSE_LOGGING=1 | ||
REM - Close any running instances of IDA | ||
call close_BINJA.bat | ||
|
||
REM - Purge old lighthouse log files | ||
del /F /Q "C:\Users\user\AppData\Roaming\Binary Ninja\lighthouse_logs\*" | ||
|
||
REM - Delete the old plugin bits | ||
del /F /Q "C:\Users\user\AppData\Roaming\Binary Ninja\plugins\*lighthouse_plugin.py" | ||
rmdir "C:\Users\user\AppData\Roaming\Binary Ninja\plugins\lighthouse" /s /q | ||
|
||
REM - Copy over the new plugin bits | ||
xcopy /s/y "..\plugin\*" "C:\Users\user\AppData\Roaming\Binary Ninja\plugins\" | ||
del /F /Q "C:\Users\user\AppData\Roaming\Binary Ninja\plugins\.#lighthouse_plugin.py" | ||
|
||
REM - Launch a new IDA session | ||
start "" "C:\tools\disassemblers\BinaryNinja\binaryninja.exe" "..\..\testcase\boombox.bndb" | ||
|
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,18 @@ | ||
set LIGHTHOUSE_LOGGING=1 | ||
REM - Close any running instances of IDA | ||
call close_BINJA.bat | ||
|
||
REM - Purge old lighthouse log files | ||
del /F /Q "C:\Users\user\AppData\Roaming\Binary Ninja\lighthouse_logs\*" | ||
|
||
REM - Delete the old plugin bits | ||
del /F /Q "C:\Users\user\AppData\Roaming\Binary Ninja\plugins\*lighthouse_plugin.py" | ||
rmdir "C:\Users\user\AppData\Roaming\Binary Ninja\plugins\lighthouse" /s /q | ||
|
||
REM - Copy over the new plugin bits | ||
xcopy /s/y "..\plugin\*" "C:\Users\user\AppData\Roaming\Binary Ninja\plugins\" | ||
del /F /Q "C:\Users\user\AppData\Roaming\Binary Ninja\plugins\.#lighthouse_plugin.py" | ||
|
||
REM - Launch a new IDA session | ||
start "" "C:\tools\disassemblers\BinaryNinja\binaryninja.exe" "..\..\testcase\idaq.bndb" | ||
|
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
set LIGHTHOUSE_LOGGING=1 | ||
REM - Close any running instances of IDA | ||
call close_IDA.bat | ||
|
||
|
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,18 @@ | ||
set LIGHTHOUSE_LOGGING=1 | ||
REM - Close any running instances of IDA | ||
call close_IDA.bat | ||
|
||
REM - Purge old lighthouse log files | ||
del /F /Q "C:\Users\user\AppData\Roaming\Hex-Rays\IDA Pro\lighthouse_logs\*" | ||
|
||
REM - Delete the old plugin bits | ||
del /F /Q "C:\Users\user\AppData\Roaming\Hex-Rays\IDA Pro\plugins\*lighthouse_plugin.py" | ||
rmdir "C:\Users\user\AppData\Roaming\Hex-Rays\IDA Pro\plugins\lighthouse" /s /q | ||
|
||
REM - Copy over the new plugin bits | ||
xcopy /s/y "..\plugin\*" "C:\Users\user\AppData\Roaming\Hex-Rays\IDA Pro\plugins\" | ||
del /F /Q "C:\Users\user\AppData\Roaming\Hex-Rays\IDA Pro\plugins\.#lighthouse_plugin.py" | ||
|
||
REM - Launch a new IDA session | ||
start "" "C:\tools\disassemblers\IDA 7.1\ida.exe" "..\..\testcase\idaq71.idb" | ||
|
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
set LIGHTHOUSE_LOGGING=1 | ||
REM - Close any running instances of IDA | ||
call close_IDA.bat | ||
|
||
|
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
set LIGHTHOUSE_LOGGING=1 | ||
REM - Close any running instances of IDA | ||
call close_IDA.bat | ||
|
||
|
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,18 @@ | ||
set LIGHTHOUSE_LOGGING=1 | ||
REM - Close any running instances of IDA | ||
call close_IDA.bat | ||
|
||
REM - Purge old lighthouse log files | ||
del /F /Q "C:\Users\user\AppData\Roaming\Hex-Rays\IDA Pro\lighthouse_logs\*" | ||
|
||
REM - Delete the old plugin bits | ||
del /F /Q "C:\tools\disassemblers\IDA 6.8\plugins\*lighthouse_plugin.py" | ||
rmdir "C:\tools\disassemblers\IDA 6.8\plugins\lighthouse" /s /q | ||
|
||
REM - Copy over the new plugin bits | ||
xcopy /s/y "..\plugin\*" "C:\tools\disassemblers\IDA 6.8\plugins\" | ||
del /F /Q "C:\tools\disassemblers\IDA 6.8\plugins\.#lighthouse_plugin.py" | ||
|
||
REM - Relaunch two IDA sessions | ||
start "" "C:\tools\disassemblers\IDA 6.8\idaq.exe" "..\..\testcase\harness_ufs_pdf.instr.idb" | ||
|
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
set LIGHTHOUSE_LOGGING=1 | ||
REM - Close any running instances of IDA | ||
call close_IDA.bat | ||
|
||
|
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,14 @@ | ||
import os | ||
import binaryninja | ||
|
||
target = os.path.abspath(os.path.join( | ||
os.path.dirname(os.path.abspath(__file__)), | ||
"..", | ||
"testcase", | ||
"boombox.exe" | ||
)) | ||
|
||
print "Opening '%s' headlessly..." % target | ||
x = binaryninja.BinaryViewType["PE"].open(target) | ||
x.update_analysis_and_wait() | ||
print "DONE!" |
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,65 @@ | ||
import logging | ||
|
||
from binaryninja import PluginCommand | ||
from lighthouse.core import Lighthouse | ||
from lighthouse.util.disassembler import disassembler | ||
|
||
logger = logging.getLogger("Lighthouse.Binja.Integration") | ||
|
||
#------------------------------------------------------------------------------ | ||
# Lighthouse Binja Integration | ||
#------------------------------------------------------------------------------ | ||
|
||
class LighthouseBinja(Lighthouse): | ||
""" | ||
Lighthouse UI Integration for Binary Ninja. | ||
""" | ||
|
||
def __init__(self): | ||
super(LighthouseBinja, self).__init__() | ||
|
||
def interactive_load_file(self, bv): | ||
disassembler.bv = bv | ||
super(LighthouseBinja, self).interactive_load_file() | ||
|
||
def interactive_load_batch(self, bv): | ||
disassembler.bv = bv | ||
super(LighthouseBinja, self).interactive_load_batch() | ||
|
||
def interactive_load_batch(self, bv): | ||
disassembler.bv = bv | ||
super(LighthouseBinja, self).open_coverage_overview() | ||
|
||
def _install_load_file(self): | ||
PluginCommand.register( | ||
"Lighthouse - Load code coverage file...", | ||
"Load individual code coverage file(s)", | ||
self.interactive_load_file | ||
) | ||
logger.info("Installed the 'Code coverage file' menu entry") | ||
|
||
def _install_load_batch(self): | ||
PluginCommand.register( | ||
"Lighthouse - Load code coverage batch...", | ||
"Load and aggregate code coverage files", | ||
self.interactive_load_batch | ||
) | ||
logger.info("Installed the 'Code coverage batch' menu entry") | ||
|
||
def _install_open_coverage_overview(self): | ||
PluginCommand.register( | ||
"Lighthouse - Coverage Overview", | ||
"Open the database code coverage overview", | ||
self.interactive_load_batch | ||
) | ||
logger.info("Installed the 'Coverage Overview' menu entry") | ||
|
||
# TODO/V35: No good signals to unload (core) plugin on | ||
def _uninstall_load_file(self): | ||
pass | ||
|
||
def _uninstall_load_batch(self): | ||
pass | ||
|
||
def _uninstall_open_coverage_overview(self): | ||
pass |
Oops, something went wrong.