Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CyberCutter - contents vizualization #3

Open
XVilka opened this issue Apr 24, 2018 · 10 comments
Open

CyberCutter - contents vizualization #3

XVilka opened this issue Apr 24, 2018 · 10 comments

Comments

@XVilka
Copy link
Member

XVilka commented Apr 24, 2018

Something in the spirit of https://github.com/patois/IDACyber

image

image

image

image
image

@XVilka
Copy link
Member Author

XVilka commented Aug 8, 2018

Seems this code can be adopted (license is MIT) https://github.com/kentavv/binary_viewer

@XVilka
Copy link
Member Author

XVilka commented Aug 8, 2018

Or Veles (license is Apache 2) https://github.com/codilime/veles

@ITAYC0HEN
Copy link
Member

Very nice! Would be implemented in a plug-in. Maybe as part of Veles integration

@ITAYC0HEN ITAYC0HEN reopened this Feb 17, 2019
@Maijin Maijin transferred this issue from rizinorg/cutter Jul 18, 2019
@hello-adam
Copy link
Contributor

hello-adam commented May 5, 2020

Is there any documentation on the C++ plugin interface? I'd be willing to look into Mahlet-Inc/hobbits#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.

@karliss
Copy link
Member

karliss commented May 6, 2020

@hello-adam Take a look at sample-cpp plugin it demonstrates the most important parts you need to know:

  • how to create a loadable plugin
  • how to create a dockable widget
  • how to access information from r2 through cutter

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.

@hello-adam
Copy link
Contributor

Thanks, @karliss , I'll take a look.

@hello-adam
Copy link
Contributor

hello-adam commented May 6, 2020

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:

  1. Load the whole file whenever it changes (responding to some of the 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.

  2. 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?)

  3. 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.

@hello-adam
Copy link
Contributor

here's a functioning version of option 2 https://github.com/Mahlet-Inc/hobbits-cutter-plugin

@karliss
Copy link
Member

karliss commented May 8, 2020

I recommend moving further discussion of hobbits plugin to Mahlet-Inc/hobbits#9 or separate issue in cutter-plugins.

@XVilka
Copy link
Member Author

XVilka commented Jul 24, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants