2
0
mirror of https://github.com/chubin/cheat.sheets synced 2024-11-03 15:40:17 +00:00
cheat.sheets/sheets/hexdump

13 lines
365 B
Plaintext
Raw Normal View History

# side-by-side hexadecimal and ascii view of the first 128 bytes of a file
hexdump -C -n128 /etc/passwd
# Convert a binary file to C Array
hexdump -v -e '16/1 "0x%02X, "' -e '"\n"' file.bin > hexarray.h
# Convert a binary file to Shell code
hexdump -v -e '"\\""x" 1/1 "%02x" ""'
# Generate random MAC address
hexdump -n6 -e '/1 ":%02X"' /dev/random|sed s/^://g