weggli-rs / weggli

weggli is a fast and robust semantic search tool for C and C++ codebases. It is designed to help security researchers identify interesting functionality in large codebases.
Apache License 2.0
2.34k stars 130 forks source link

Improved Binary Ninja Script #32

Closed fabianfreyer closed 2 years ago

fabianfreyer commented 2 years ago

Rebased @mmaekr's script from #1 on current main, used the decompile to C API, and added some utility and interaction, demangling.

Works rudimentally as both a plugin and a snippet in the Snippets editor.

felixwilhelm commented 2 years ago

Thanks this looks super useful. I'll test it and report back.

psifertex commented 2 years ago

Any updates on accepting this PR?

psifertex commented 2 years ago

Also, for what it's worth, Binary Ninja's plugin manager supports plugins that are subfolders from other repos so it would be possible to convert this into a plugin that could be installed via the plugin manager, making it more discoverable.

Feel free to let me know if I can help any with that process.

felixwilhelm commented 2 years ago

Sorry for not merging this earlier.

The Python API is missing a couple of features (mainly query normalization) that are supported by the CLI right now. So I was a bit hesitant to merge this, before improving the Python interface. But @ZetaTwo played around with it and says it's useful already. So I guess there is no reason to further delay this.

Thanks @fabianfreyer, @ZetaTwo and @psifertex