markasoftware · 2022-05-10 16:35
Are there any good ones? There's the built-in hexl mode, but it leaves a /lot/ to be desired if you want to do anything but the most basic operations. For example, when reverse engineering it's critical to be able to view the bytes at point as different types of integers and floats. And as far as I can tell, it's even impossible to change the number of bytes on each line (though maybe this can be customized by some undocumented option to the `hexl` binary).
Are there any good alternatives?
ennoausberlin · 2022-05-10 16:57
If you just want to view the bytes the xxd command line tool might be helpful
sawyergardner · 2022-05-10 17:15
I know this pain. There really aren't any better hex editors out there for emacs. Whenever I need to edit a binary file I always end up downloading some other program to open it and it's always a pain. Something I haven't looked into but probably should, is using a terminal hex editor. Then you could run that in eshell or something and it should be almost as good as a package. I'm willing to bet there's a good terminal hex editor out there, but again, I havent gotten around to looking.
hkjels · 2022-05-10 21:29
https://github.com/emacs-mirror/emacs/blob/620ac6735520aea97ce49059b0df38ed41930b6b/lisp/hexl.el#L55
reini_urban · 2022-05-11 03:49
A kaitai-struct mode would be cool. I'm using it with webide locally, but within emacs it would be even better. and easier.
gvol · 2022-05-11 03:53
I wrote a bit of code, for hexl-mode, to display different integer values at point in the mode-line. I never did floats though since that was quite a bit more difficult. I guess I could create a little package for it. Using a module, it might not be too hard to add float support. I used it for a little while and then my needs changed and I haven't used hexl much since.
markasoftware · 2022-05-11 05:43
This changes where spaces go on each line, not the number of bytes per line.
markasoftware · 2022-05-11 05:43
Wow, kaitai looks like it could be very helpful for me. Does the web IDE work ok with large files (2GB)?
hkjels · 2022-05-11 18:12
OK. I haven’t used hexl myself. Sounds like it needs an update.