xxd
Practical xxd usage for hex dumping, binary inspection, firmware and EFI variable analysis, random data generation, ASCII↔hex conversion, and reverse reconstruction workflows
Convert ascii string to hex
Read output with 200 columns rather den default
Hexdump the DMI table with byte-level grouping and wide output (200 columns)
Extract ASCII columns for 200 bytes lines
Read our BootOrder file in efivars
Read bios rom exposed via sysfs (raw dump preview)
Read legacy bios memory region via /dev/mem (first 1 KB)
Read option rom area from /dev/mem (C0000h VGA ROM)
Read EFI BootCurrent variable (hex + ASCII)
Read EFI SecureBoot state
Read EFI SetupMode flag
Inspect raw EFI variable payload (skip attributes)
Matrix style (red color)
Matrix style (colorless)
Matrix style (random colors)
xxd -p -c1 /dev/urandom \
| awk -v cols="${COLUMNS:-$(tput cols)}" '
BEGIN {
split("31 32 33 34 35 36 37 90 92 93 94 95 96", C)
}
{
b = strtonum("0x"$1)
if (b % 8) {
printf " "
} else {
color = C[int(rand()*length(C))+1]
printf "\033[%sm%c\033[0m", color, 48+(b%10)
}
if (++n % cols == 0) printf "\n"
}'
The Entropy Scanner
xxd -p -c1 /dev/urandom | awk -v cols="${COLUMNS:-$(tput cols)}" '
BEGIN {
# Using Unicode block elements for a "solid" high-res look
split("░ ▒ ▓ █", B)
# Using a 256-color gradient (Greyscale to Blue/Purple)
C = "232 235 238 241 244 247 250 253 63 105 147"
split(C, Colors)
}
{
v = strtonum("0x"$1)
# Map 0-255 to our color/block arrays
b_idx = int(v / 64) + 1
c_idx = int(v / 24) + 1
# Print the "pixel"
printf "\033[38;5;%sm%s\033[0m", Colors[c_idx], B[b_idx]
if (++n % cols == 0) printf "\n"
}'
The snake variant (Geometric Randomness)
xxd -p -c1 /dev/urandom | awk -v cols=$(tput cols) -v lines=$(tput lines) '
BEGIN { x=int(cols/2); y=int(lines/2); printf "\033[2J" }
{
v = strtonum("0x"$1)
# Use the byte to determine direction (UP, DOWN, LEFT, RIGHT)
dir = v % 4
if (dir == 0) y--
else if (dir == 1) y++
else if (dir == 2) x--
else x++
# Keep within bounds
if (x<1) x=1; if (x>cols) x=cols; if (y<1) y=1; if (y>lines) y=lines
# Print at coordinate
printf "\033[%d;%dH\033[48;5;%dm \033[0m", y, x, (v % 231 + 16)
}'