Skip to content

Commit 562595b

Browse files
committed
Merge branch 'develop'
2 parents 7245a2d + eeb16a5 commit 562595b

29 files changed

+634
-379
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2017-2021 Markus Gaasedelen
3+
Copyright (c) 2017-2024 Markus Gaasedelen
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,22 +39,13 @@ Use the instructions below for your respective disassembler.
3939

4040
## Binary Ninja Installation
4141

42-
Lighthouse can be installed through the plugin manager on newer versions of Binary Ninja (>2.4.2918). The plugin will have to be installed manually on older versions.
43-
44-
### Auto Install
42+
Lighthouse can be installed through the plugin manager on Binary Ninja, supporting v3.5 and newer.
4543

4644
1. Open Binary Ninja's plugin manager by navigating the following submenus:
4745
- `Edit` -> `Preferences` -> `Manage Plugins`
4846
2. Search for Lighthouse in the plugin manager, and click the `Enable` button in the bottom right.
4947
3. Restart your disassembler.
5048

51-
### Manual Install
52-
53-
1. Open Binary Ninja's plugin folder by navigating the following submenus:
54-
- `Tools` -> `Open Plugins Folder...`
55-
2. Copy the contents of this repository's `/plugins/` folder to the listed directory.
56-
3. Restart your disassembler.
57-
5849
# Usage
5950

6051
Once properly installed, there will be a few new menu entries available in the disassembler. These are the entry points for a user to load coverage data and start using Lighthouse.
@@ -203,6 +194,7 @@ Lighthouse will remember your theme preference for future loads and uses.
203194

204195
Time and motivation permitting, future work may include:
205196

197+
* Nag Vector35 to fix HLIL highlighting ([bug](https://github.com/Vector35/binaryninja-api/issues/2584)) in Binary Ninja
206198
* ~~Asynchronous composition, painting, metadata collection~~
207199
* ~~Multifile/coverage support~~
208200
* Profiling based heatmaps/painting

binjastub/plugin.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
"description": "A Coverage Explorer for Reverse Engineers",
77
"license": {
88
"name": "MIT",
9-
"text": "Copyright (c) 2021> Markus Gaasedelen\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
9+
"text": "Copyright (c) 2024> Markus Gaasedelen\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
1010
},
1111
"longdescription": "",
12-
"minimumbinaryninjaversion": 2918,
12+
"minimumbinaryninjaversion": 4526,
1313
"name": "Lighthouse",
1414
"platforms": [
1515
"Darwin",
@@ -20,5 +20,5 @@
2020
"type": [
2121
"helper"
2222
],
23-
"version": "0.9.2"
23+
"version": "0.9.3"
2424
}

coverage/frida/frida-drcov.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
var filtered_maps = new ModuleMap(function (m) {
6666
if (whitelist.indexOf('all') >= 0) { return true; }
6767
68-
return whitelist.indexOf(m.name) >= 0;
68+
return whitelist.some(item => m.name.toLowerCase().includes(item.toLowerCase()));
6969
});
7070
7171
// This function takes a list of GumCompileEvents and converts it into a DRcov

coverage/pin/README.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# CodeCoverage Pintool
22

3-
The `CodeCoverage` pintool runs ontop of the [Intel Pin](https://software.intel.com/en-us/articles/pin-a-dynamic-binary-instrumentation-tool) DBI framework and collects code coverage data in a log format compatible with [Lighthouse](https://github.com/gaasedelen/lighthouse). The log produced by this pintool emulates that of [drcov](http://dynamorio.org/docs/page_drcov.html) as shipped with [DynamoRIO](http://www.dynamorio.org).
3+
The `CodeCoverage` pintool runs ontop of the [Intel Pin](https://software.intel.com/en-us/articles/pin-a-dynamic-binary-instrumentation-tool) DBI framework and collects code coverage data in a log format compatible with [Lighthouse](https://github.com/gaasedelen/lighthouse). The log produced by this pintool emulates that of [drcov](http://dynamorio.org/docs/page_drcov.html) as shipped with [DynamoRIO](http://www.dynamorio.org).
44

55
This pintool is labeled only as a prototype.
66

@@ -12,7 +12,7 @@ Follow the build instructions below for your respective platform.
1212

1313
## Building for MacOS or Linux
1414

15-
On MacOS or Liunux, one can compile the pintool using the following commands.
15+
On MacOS or Linux, one can compile the pintool using the following commands.
1616

1717
```
1818
# Location of this repo / pintool source
@@ -39,7 +39,11 @@ Launch a command prompt and build the pintool with the following commands.
3939
### 32bit Pintool
4040

4141
```
42-
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86
42+
REM If you are on VS 2022 or so you can run this line:
43+
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" x86
44+
45+
REM VS 2015 or so you can run this line instead:
46+
REM "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86
4347
4448
REM Location of this repo / pintool source
4549
cd C:\Users\user\lighthouse\coverage\pin
@@ -53,7 +57,11 @@ build-x86.bat
5357
### 64bit Pintool
5458

5559
```
56-
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64
60+
REM If you are on VS 2022 or so you can run this line:
61+
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64
62+
63+
REM VS 2015 or so you can run this line instead:
64+
REM "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64
5765
5866
REM Location of this repo / pintool source
5967
cd C:\Users\user\lighthouse\coverage\pin
@@ -64,7 +72,7 @@ set PATH=%PATH%;%PIN_ROOT%
6472
build-x64.bat
6573
```
6674

67-
The resulting binaries will be labaled based on their architecture (eg, 64 is the 64bit pintool).
75+
The resulting binaries will be labeled based on their architecture (eg, 64 is the 64bit pintool).
6876

6977
* CodeCoverage.dll
7078
* CodeCoverage64.dll

coverage/pin/build-x64.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ link ^
2727
/LIBPATH:%PIN_ROOT%\intel64\lib ^
2828
/LIBPATH:"%PIN_ROOT%\intel64\lib-ext" ^
2929
/LIBPATH:"%PIN_ROOT%\extras\xed-intel64\lib" ^
30-
/LIBPATH:%PIN_ROOT%\intel64\runtime\pincrt pin.lib xed.lib pinvm.lib pincrt.lib ntdll-64.lib kernel32.lib crtbeginS.obj ^
30+
/LIBPATH:%PIN_ROOT%\intel64\runtime\pincrt pin.lib xed.lib pinipc.lib pincrt.lib kernel32.lib crtbeginS.obj ^
3131
/NODEFAULTLIB ^
3232
/MANIFEST:NO ^
3333
/OPT:NOREF ^

coverage/pin/build-x86.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ link ^
2828
/LIBPATH:%PIN_ROOT%\ia32\lib ^
2929
/LIBPATH:"%PIN_ROOT%\ia32\lib-ext" ^
3030
/LIBPATH:"%PIN_ROOT%\extras\xed-ia32\lib" ^
31-
/LIBPATH:%PIN_ROOT%\ia32\runtime\pincrt pin.lib xed.lib pinvm.lib pincrt.lib ntdll-32.lib kernel32.lib crtbeginS.obj ^
31+
/LIBPATH:%PIN_ROOT%\ia32\runtime\pincrt pin.lib xed.lib pinipc.lib pincrt.lib kernel32.lib crtbeginS.obj ^
3232
/NODEFAULTLIB ^
3333
/MANIFEST:NO ^
3434
/OPT:NOREF ^

plugins/lighthouse/composer/shell.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1045,7 +1045,7 @@ def _ui_init(self):
10451045
# set the height of the textbox based on some arbitrary math :D
10461046
LINE_PADDING = self.document().documentMargin()*2
10471047
line_height = self._font_metrics.height() + LINE_PADDING + 2
1048-
self.setFixedHeight(line_height)
1048+
self.setFixedHeight(int(line_height))
10491049

10501050
#--------------------------------------------------------------------------
10511051
# QPlainTextEdit Overloads

0 commit comments

Comments
 (0)