Top
Best
New

Posted by tobr 2 days ago

Your hex editor should color-code bytes(simonomi.dev)
358 points | 105 commentspage 4
PunchyHamster 6 hours ago|
I wonder how hard it would be to color code repeating sequences
TheRealPomax 2 hours ago||
It'd be nicer if the hex coloring actually matched the "ascii" coloring as well. Orange on the left but green on the right does not help find things.
mplanchard 4 hours ago||
Anyone know of a good emacs package for this?
azalemeth 9 hours ago||
I really like hexyl [1], which does this by default.

https://github.com/sharkdp/hexyl

kqr 8 hours ago|
The author uses hexyl as an example of trying, but not doing it right.
greatgib 8 hours ago||
To me the random colors at each byte is messing up with my brain making it hard to fast identify C0 or any other value that I could more easily identify in all black.

But color would be nice more based on the bytes logic.

Eventually the 00 in a shaded grey instead of black, and in best case scenario by logic unit based on your protocol. And worst case scenario by groups of words or so.

asibahi 9 hours ago||
When I read this article a few days ago it inspired me to create my own hex viewer : https://ar-ms.me/thoughts/3sl-a-sweet-hex-utility/

The cool thing about it imo (outside of colors) is a `--windows` flag. Which separates the hex view into partitions: so `-w 2:-3:5` shows the first two bytes on a line, then skips three bytes, then shows the next 5 bytes on a line, then the rest of the file. Easy to use combined with a terminal's up arrow.

xyx0826 8 hours ago||
If you analyze binary files often, I highly recommend binvis - http://binvis.io/. It creates a colored minimap for files it loads and has two available arrangements. Pixel color is based on range of bytes, eg ASCII/null bytes/FF bytes. Besides, it’s a pretty basic hex viewer that runs in your browser. The minimap is extremely powerful for identifying interesting areas and patterns in unknown data.
pratyahava 8 hours ago|
> it’s a pretty basic hex viewer that runs in your browser

excuse me? "basic" and "runs in your browser" together sound very contradictory to me. while doing things i actually feel (yes, emotionally) much better when there is no browser open on my machine, but only text editors, vcs gui and file managers, and terminals of course. and sometimes i reject an idea to start a browser just thinking how much ram it will take (ha, what a progress we have done - one github issue tab, with text only and no images, takes 180mb of ram).

franga2000 8 hours ago||
It's basic bause it does like two things. It's not advanced or complex. HN is also a basic forum, even though it runs in a browser.
adv_zxy 8 hours ago||
radare2 also has excellent hex viewing/editing support, if one manages to grok the usage of it.
snvzz 4 hours ago|
The iaito GUI suddenly got good recently.
wang_li 3 hours ago||
Color coding is a simplistic, half-assed way of doing semantic analysis. Go full assed and make an /etc/magic aware file decoder that decodes and highlights anomalies.
7bit 8 hours ago|
> it’s much easier to pick out the unique byte when it’s a different color! human brains are really good at spotting visual patterns—given the right format

Don't really see the advantage. Unique bytes have no unique meaning across data types.

The only good syntax highlight to me is 00 and perhaps FF. But that's my opinion of course.

Anything else that has no direct relation to what you're looking at is meaningless.

masklinn 7 hours ago||
> The only good syntax highlight to me is 00 and perhaps FF. But that's my opinion of course.

Would probably make the most sense to have various ranges you can enable depending on what you’re looking for (or to look for patterns) e.g. for single byte coloration I could see

- nul

- printable / non-printable ascii

- non-ascii

- UTF8 leading / continuation

- separators

- start/end pairs (both printable and non printable)

gblargg 7 hours ago||
It would be interesting to do a heat map coloring based on frequency of that value.
More comments...