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

visualizer: adding search support #6

Open
hilts-vaughan opened this issue Oct 23, 2016 · 4 comments
Open

visualizer: adding search support #6

hilts-vaughan opened this issue Oct 23, 2016 · 4 comments

Comments

@hilts-vaughan
Copy link

Is there any plans to add search support to the visualizer? I doubt your goal is to make a fully featured hex editor, but just having vim-like search support would be pretty neat, I think.

I might be able to supply a pull request for this feature if approved, as well, would just need an hour of someone's time to talk implementation.

I often use Kaitai to map out a file when I am reverse-engineering and like to explore the data surrounding a particular string. I often go to my hex editor to find the offset but it would be nice if I could just do "/Estelle" for example, and jump to the first occurrence of the string "Estelle"

@GreyCat
Copy link
Member

GreyCat commented Oct 24, 2016

Definitely a good idea. If you feel like implementing one, please do.

I guess it would be a good idea to have both "search by hex bytes", "search by character string" (may be specifying in which encoding), etc.

@GreyCat
Copy link
Member

GreyCat commented Oct 24, 2016

Just a quick note: these guys here seem to have started visualizer / IDE project in HTML / JavaScript. I reckon that you are the front-end web developer, so you might be interested in discussing stuff with them as well?

@hilts-vaughan
Copy link
Author

  1. Thanks for letting me know. Do you have any preference on how this functionality should be implemented? What kind of keybinding(s)
  2. Interesting -- though, I am more of a fan of a modular workspace, as I use i3wm so the terminal based one is great for being able to attach to whatever it is I'm doing instead of one particular editor. I'll definitely join the discussion there, though since it is my domain area as you have noted. :)

@GreyCat
Copy link
Member

GreyCat commented Oct 25, 2016

There is HexViewer class that represents hex viewer part of the display, probably it's a good idea to add relevant search command invocation into its run method. It should be similar to current implementation of "write buffer to file" (w), but probably more complex:

Note that text UI module used in ksv is self-written and thus very bare-bones. There is a quick method to ask a user for single line (@ui.input_str), but there are no fancy dialog constructors, layouts, etc, etc. So making a form with an input + single choice selection on search mode might be tricky.

As for keybindings, / is all fine by me. Pretty intuitive, as far as standard UNIX stuff goes (i.e. the majority of viewers).

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

2 participants