-
Notifications
You must be signed in to change notification settings - Fork 227
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add md1rom binary view with pure Rust lzma implementation
- Loading branch information
Showing
9 changed files
with
705 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
cmake_minimum_required(VERSION 3.9 FATAL_ERROR) | ||
|
||
project(view_md1rom) | ||
|
||
if(NOT BN_INTERNAL_BUILD) | ||
add_subdirectory(${PROJECT_SOURCE_DIR}/../.. ${PROJECT_BINARY_DIR}/api) | ||
endif() | ||
|
||
file(GLOB SOURCES | ||
*.cpp | ||
*.h) | ||
|
||
if(DEMO) | ||
add_library(view_md1rom STATIC ${SOURCES}) | ||
else() | ||
add_library(view_md1rom SHARED ${SOURCES}) | ||
endif() | ||
|
||
target_link_libraries(view_md1rom binaryninjaapi) | ||
|
||
set_target_properties(view_md1rom PROPERTIES | ||
CXX_STANDARD 17 | ||
CXX_VISIBILITY_PRESET hidden | ||
CXX_STANDARD_REQUIRED ON | ||
VISIBILITY_INLINES_HIDDEN ON | ||
POSITION_INDEPENDENT_CODE ON) | ||
|
||
if(BN_INTERNAL_BUILD) | ||
plugin_rpath(view_md1rom) | ||
set_target_properties(view_md1rom PROPERTIES | ||
LIBRARY_OUTPUT_DIRECTORY ${BN_CORE_PLUGIN_DIR} | ||
RUNTIME_OUTPUT_DIRECTORY ${BN_CORE_PLUGIN_DIR}) | ||
endif() |
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,13 @@ | ||
Copyright 2021-2024 Vector 35 Inc. | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. |
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,23 @@ | ||
# view-md1rom | ||
This is the md1rom view plugin that ships with Binary Ninja. | ||
|
||
## Building | ||
|
||
Building the architecture plugin requires `cmake` 3.9 or above. You will also need the | ||
[Binary Ninja API source](https://github.com/Vector35/binaryninja-api). | ||
|
||
Run `cmake`. This can be done either from a separate build directory or from the source | ||
directory. Once that is complete, run `make` in the build directory to compile the plugin. | ||
|
||
The plugin can be found in the root of the build directory as `libview_md1rom.so`, | ||
`libview_md1rom.dylib` or `view_md1rom.dll` depending on your platform. | ||
|
||
To install the plugin, first launch Binary Ninja and uncheck the "Md1rom view plugin" | ||
option in the "Core Plugins" section. This will cause Binary Ninja to stop loading the | ||
bundled plugin so that its replacement can be loaded. Once this is complete, you can copy | ||
the plugin into the user plugins directory (you can locate this by using the "Open Plugin Folder" | ||
option in the Binary Ninja UI). | ||
|
||
**Do not replace the view plugin in the Binary Ninja install directory. This will be overwritten | ||
every time there is a Binary Ninja update. Use the above process to ensure that updates do not | ||
automatically uninstall your custom build.** |
Oops, something went wrong.