radareorg / radare2

UNIX-like reverse engineering framework and command-line toolset
https://www.radare.org/
GNU Lesser General Public License v3.0
19.71k stars 2.94k forks source link

Nibble colordump under prcn/prcb. Idea by Patrick Hurd ##print #22880

Closed trufae closed 2 weeks ago

trufae commented 2 weeks ago

https://infosec.exchange/@pancake/112355240246542707

Djent- commented 2 weeks ago

Thanks Pancake! In my screenshots on Mastodon, the color palette I was using was as below. There are a couple inconsistencies with the palette you've chosen for radare. For example, 0xe being light gray and 0x2 and 0x3 being the same color 0x00ff00.

The goal of using colors in order of the rainbow is to represent the adjacency of the values. Red being adjacent to Orange as 0x01 is adjacent to 0x02. This is what enabled the continuous rainbow effect in https://infosec.exchange/@phurd/112348777843763942 for example. As a coincidence, the colors I've chosen have the affect of making ASCII text regions appear predominantly green, as shown in the lower half of this screenshot https://infosec.exchange/@phurd/112284269719833207 .

colors = [
    'e71d43', # Dark Red
    'ff0000', # Red
    'ff6e00', # Orange
    'ffc300', # Orange Yellow
    'ffff00', # Yellow
    'aad500', # Lime
    '55aa00', # Grass Green
    '008000', # Forest Green
    '005555', # Dark Teal
    '002baa', # Navy
    '0000ff', # Blue
    '3200ac', # Purple
    '4b0082', # Magenta
    '812ba6', # Dark Pink
    'b857ca', # Light Pink
    'd03a87', # Salmon
]