Open XVilka opened 6 years ago
Seems this code can be adopted (license is MIT) https://github.com/kentavv/binary_viewer
Or Veles (license is Apache 2) https://github.com/codilime/veles
Very nice! Would be implemented in a plug-in. Maybe as part of Veles integration
Is there any documentation on the C++ plugin interface? I'd be willing to look into https://github.com/Mahlet-Inc/hobbits/issues/9 if I had some place to start. Seems like it could be pretty easy, but I'd rather not trudge through the code to find the relevant files/concepts.
@hello-adam Take a look at sample-cpp plugin it demonstrates the most important parts you need to know:
You can also take a look at https://cutter.re/docs/plugins.html#creating-plugins . The example shows how to create a python plugin but API is generated from C++ so doing the same in C++ would be very similar. It can serve you as explanation for C++ example. Cutter coding advices in developer docs are equally relevent for plugins. For more information about querying state read https://cutter.re/docs/api/core/classCutterCore.html . The rest is just is writing code with Qt widgets.
Thanks, @karliss , I'll take a look.
I have a plugin compiling and loading (the examples did not work without some nudging in fedora 30), but I'm a little uncertain about how and when to load the data from CutterCore::ioRead
into a hobbits BitContainer
for the displays. It seems like I should either:
CutterCore::*Changed
signals?) into a BitContainer
and update the offset whenever I get a CutterCore::seekChanged
. This would be similar to how Hobbits works, but I'm not sure exacly how to load the "whole thing" or even what exactly that would mean in a radare2 context.Load the "active segment" into a BitContainer
in response to every CutterCore::seekChanged
. Again, not really sure how to get the full size of whatever is currently "active" (that is to say: what is the length parameter for the CutterCore::ioRead
call?)
EDIT: I guess a third option would be like option 1 except instead of aligning to the current CutterCore::seekChanged
, one could scroll freely through the file in the hobbits plugin and maybe call CutterCore::seek
from there
This looks like it will be easy once I have a better understanding of the user story and answers to my API questions above.
here's a functioning version of option 2 https://github.com/Mahlet-Inc/hobbits-cutter-plugin
I recommend moving further discussion of hobbits plugin to https://github.com/Mahlet-Inc/hobbits/issues/9 or separate issue in cutter-plugins.
Something in the spirit of https://github.com/patois/IDACyber