Skip to content

Commit 1e76329

Browse files
committed
Modification for our plugin (thanks rikodot!)
1 parent 3de7149 commit 1e76329

File tree

3 files changed

+27
-37
lines changed

3 files changed

+27
-37
lines changed

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
**For full readme and source code of native sigscan plugin check out [binja_native_sigscan](https://github.com/rikodot/binja_native_sigscan).**<br>
2-
This python script serves just as a loader for the actual plugin since it is written in C++ and might not be directly used with Binary Ninja's plugin manager.<br>
1+
# Native Predicate Solver Loader
32

4-
![preview](https://github.com/rikodot/binja_native_sigscan/blob/main/preview.gif)
3+
**For full documentation and source code of the Native Predicate Solver plugin, check out [native-predicate-solver](https://github.com/ScriptWare-Software/native-predicate-solver).**
4+
5+
This Python script serves as a loader for the actual plugin since it is written in C++ and utilises Binary Ninja's native API.
6+
7+
Full credit to [rikodot](https://github.com/rikodot) for this script, this is merely a modified fork of [his work](https://github.com/rikodot/binja_native_sigscan_loader).
8+
9+
*original writing:*
510

611
### How it works
712
On the start of Binary Ninja, this script checks if the related native plugin is present and either downloads it or verifies its version using native plugin's github repository. Native plugin requires its own repository which is also used for updating. Each native plugin requires its own loader. Unless there is a bug within this python script or an update is required or highly beneficial, this script is not supposed to be updated as it servers just as a loader. Exact behaviour is described within the script itself.

__init__.py

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@
2323
# if latest_hash != downloaded plugin hash -> alert to update (with link to latest release)
2424

2525
# Plugin details
26-
plugin_name = 'sigscan'
26+
plugin_name = 'native-predicate-solver'
2727

2828
# Repository details
29-
repo_owner = 'rikodot'
30-
repo_name = 'binja_native_sigscan'
29+
repo_owner = 'ScriptWare-Software'
30+
repo_name = 'native-predicate-solver'
3131
file_url = 'https://github.com/{}/{}/releases/latest/download'.format(repo_owner, repo_name)
3232

3333
# File names in release section on github along with Binary Ninja versions for which they were compiled (leave whole variable blank if platform not supported)
@@ -41,30 +41,16 @@
4141
# ('DEV', 'DEV', 'sigscan_dev2.dll'), # anything in between 3.4.4169 and 3.4.4189 (inclusive) - all dev versions
4242
# ]
4343
win_files = [
44-
('3.3.3996', '3.3.3996', '3996sigscan.dll'),
45-
('3.4.4271', '3.4.4271', '4271sigscan.dll'),
46-
('3.5.4526', '3.5.4526', '4526sigscan.dll'),
47-
('4.0.4958', '4.0.4958', '4958sigscan.dll'),
48-
('4.1.5747', '4.1.5747', '5747sigscan.dll'),
49-
('DEV', 'DEV', 'DEVsigscan.dll')
44+
('5.0.7290', '5.0.7290', '7290NativePredicateSolver.dll'),
45+
('DEV', 'DEV', 'NativePredicateSolver-dev.dll')
5046
]
5147
linux_files = [
52-
('3.3.3996', '3.3.3996', '3996libsigscan.so'),
53-
('3.4.4271', '3.4.4271', '4271libsigscan.so'),
54-
('3.5.4526', '3.5.4526', '4526libsigscan.so'),
55-
('4.0.4911', '4.0.4911', '4911libsigscan.so'),
56-
('4.0.4958', '4.0.4958', '4958libsigscan.so'),
57-
('4.1.5747', '4.1.5747', '5747libsigscan.so'),
58-
('DEV', 'DEV', 'DEVlibsigscan.so')
48+
('5.0.7290', '5.0.7290', '7290libNativePredicateSolver.so'),
49+
('DEV', 'DEV', 'libNativePredicateSolver-dev.so')
5950
]
6051
darwin_files = [
61-
('3.3.3996', '3.3.3996', '3996libsigscan.dylib'),
62-
('3.4.4271', '3.4.4271', '4271libsigscan.dylib'),
63-
('3.5.4526', '3.5.4526', '4526libsigscan.dylib'),
64-
('4.0.4911', '4.0.4911', '4911libsigscan.dylib'),
65-
('4.0.4958', '4.0.4958', '4958libsigscan.dylib'),
66-
('4.1.5747', '4.1.5747', '5747libsigscan.dylib'),
67-
('DEV', 'DEV', 'DEVlibsigscan.dylib')
52+
('5.0.7290', '5.0.7290', '7290libNativePredicateSolver.dylib'),
53+
('DEV', 'DEV', 'libNativePredicateSolver-dev.dylib')
6854
]
6955

7056
# Function that determines whether Binary Ninja version is supported (returns None if not, according file name if yes)

plugin.json

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,35 @@
11
{
22
"pluginmetadataversion":2,
3-
"name":"Native SigScan",
3+
"name":"Native Predicate Solver",
44
"type":[
55
"helper"
66
],
77
"api":[
8-
"python2",
98
"python3"
109
],
11-
"description":"Find and create signatures",
12-
"longdescription":"This plugin allows to scan analyzed binaries for signatures and their creation. Supports both normal signatures (e.g. 49 28 15 ? ? 30) and commonly used code signatures (e.g. \"\\x49\\x28\\x15\\x00\\x00\\x30\", \"xxx??x\").\n\nAs title suggests, it is coded in C++ and utilizes Binary Ninja's native API. For this reason this plugin serves just as a loader for the [actual plugin](https://github.com/rikodot/binja_native_sigscan).\n\n![preview](https://github.com/rikodot/binja_native_sigscan/blob/main/preview.gif)",
10+
"description":"Remove opaque predicates from binaries",
11+
"longdescription":"This plugin removes conditional branches that always evaluate to the same value. Written in C++ for speed - faster than the Python version, especially on large binaries. Uses multiple threads to process functions in parallel, and will iteratively perform passes through functions to clean up newly uncovered opaque predicates.\n\n## Features\n\n- Fast native C++ implementation\n- Multi-threaded parallel processing\n- Iterative analysis to catch nested predicates\n- Works on individual functions or entire binaries\n- Configurable pass limits and thread count\n\n## Example\n\n### Before:\n![Before example](https://github.com/ScriptWare-Software/native-predicate-solver/blob/master/img/before.png?raw=true)\n\n### After:\n![After example](https://github.com/ScriptWare-Software/native-predicate-solver/blob/master/img/after.png?raw=true)\n\nThis plugin serves as a loader for the [native C++ plugin](https://github.com/ScriptWare-Software/native-predicate-solver).",
1312
"license":{
1413
"name":"MIT",
15-
"text":"MIT License\n\nCopyright (c) 2023 rikodot\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."
14+
"text":"MIT License\n\nCopyright (c) 2025 Script-Ware Software\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."
1615
},
1716
"platforms":[
1817
"Windows",
1918
"Linux",
2019
"Darwin"
2120
],
2221
"installinstructions":{
23-
"Windows":"",
24-
"Linux":"",
25-
"Darwin":""
22+
"Windows":"The plugin will automatically download and install the native component.",
23+
"Linux":"The plugin will automatically download and install the native component.",
24+
"Darwin":"The plugin will automatically download and install the native component."
2625
},
2726
"dependencies":{
2827
"pip":[
2928
"requests",
3029
"bs4"
3130
]
3231
},
33-
"version":"1.0.9",
34-
"author":"rikodot",
35-
"minimumbinaryninjaversion":0
32+
"version":"1.0.0",
33+
"author":"ScriptWare Software",
34+
"minimumbinaryninjaversion":4100
3635
}

0 commit comments

Comments
 (0)