diff options
| author | unknowntrojan <14975032+unknowntrojan@users.noreply.github.com> | 2025-02-14 02:46:25 +0100 |
|---|---|---|
| committer | unknowntrojan <14975032+unknowntrojan@users.noreply.github.com> | 2025-02-14 02:46:25 +0100 |
| commit | 7f1069d62c50412f97047f5082f7caa50e0bc104 (patch) | |
| tree | 34536681273b06a931b14e6e85f1332523521aad | |
| parent | b973b2d0e648b0aa291d753a29fd45e4f7d466de (diff) | |
finally do away with this madness
| -rw-r--r-- | Cargo.toml | 1 | ||||
| -rw-r--r-- | README.md | 10 | ||||
| -rw-r--r-- | src/lib.rs | 22 |
3 files changed, 11 insertions, 22 deletions
@@ -23,7 +23,6 @@ coolfindpattern = "0.1.6" binary-search = "0.1.2" -# Due to a breaking change in the binaryninja crate, you will also need to uncomment the relevant portion of code in the entrypoint. # Dev # binaryninja = { git = "https://github.com/Vector35/binaryninja-api", branch = "dev" } # Stable @@ -1,6 +1,8 @@ -# binja_coolsigmaker +# binja_coolsigmaker (stable channel) -(**I apologize for the inconvenience, but due to a breaking change in the binaryninja crate, you will need to make a change to the entry point depending on which branch you build for.**) +(**The dev branch now contains the version of the plugin for the binja development update channel.**) + +(**master/main will target stable.**) We all know signature scanning can be extremely useful. Sadly, the two public offerings for Binja are either very slow, or crash extremely often. @@ -37,4 +39,6 @@ This project requires the nightly channel of Rust. Check the blog post above for a step-by-step. -Check the Cargo.toml file and adjust the `binaryninja` dependency so it points to whatever Binja update channel you want to compile for. __!MAKE SURE!__ Cargo caught your change of branch. It sometimes doesn't realize you changed it. Delete `Cargo.lock` to make Cargo realize you did. Otherwise, it'll keep using whatever version was selected when you built or rust-analyzer ran. +Checkout the branch of the repository matching the channel of binja you are building for. + +You are now one `cargo b` away from greatness. @@ -18,7 +18,7 @@ //! along with this program. If not, see <https://www.gnu.org/licenses/>. //! -#![feature(let_chains, core_intrinsics, iter_array_chunks)] +#![feature(let_chains, iter_array_chunks)] use std::borrow::Cow; use std::fmt::Display; @@ -44,14 +44,12 @@ use iced_x86::{ }; use rayon::prelude::ParallelBridge; use rayon::prelude::{IntoParallelRefIterator, ParallelIterator}; -use strum::{ - Display, EnumIter, EnumMessage, EnumString, EnumVariantNames, IntoEnumIterator, VariantNames, -}; +use strum::{Display, EnumIter, EnumMessage, EnumString, IntoEnumIterator, VariantNames}; type OwnedPattern = Vec<Option<u8>>; type Pattern<'a> = &'a [Option<u8>]; -#[derive(EnumIter, EnumVariantNames, EnumMessage, EnumString, Display)] +#[derive(EnumIter, VariantNames, EnumMessage, EnumString, Display)] enum SignatureType { #[strum(message = "IDA-style signature with one ? wildcard per byte. (E9 ? ? ? ? 90)")] IDAOne, @@ -989,19 +987,7 @@ impl Command for SigFinderCommand { #[no_mangle] pub extern "C" fn CorePluginInit() -> bool { - - // Due to a breaking change in binaryninja-api, you will need to edit this line depending on which version you are building for. - - // For dev branch: - // binaryninja::logger::Logger::new("coolsigmaker") - // .with_level(log::LevelFilter::Info) - // .init(); - - // For stable branch: - // binaryninja::logger::init(log::LevelFilter::Info).unwrap(); - - // And uncomment this. Sorry for the inconvenience. - compile_error!("sadly, due to a breaking change in the api crate, you will need to make a change to the code above this error."); + binaryninja::logger::init(log::LevelFilter::Info).unwrap(); // TODO: (maybe) if signature not found, maybe go back a few instructions and attempt to create a signature with an offset. // TODO: introduce a setting for "dumb" searches, where we also search non-executable segments for uniqueness, incase the user doesn't want to check the segments before scanning them. |
