.\" Generated by kramdown-man 0.1.8 .\" https://github.com/postmodern/kramdown-man#readme .TH ronin-hexdump 1 "2023-02-01" Ronin "User Manuals" .LP .SH SYNOPSIS .LP .HP \fBronin hexdump\fR \[lB]\fIoptions\fP\[rB] \[lB]\fIFILE\fP \.\.\.\[rB] .LP .SH DESCRIPTION .LP .PP Hexdumps data in a variety of encodings and formats\. .LP .SH ARGUMENTS .LP .TP \fIFILE\fP The optional path to the file(s) to hexdump\. .LP .SH OPTIONS .LP .TP \fB-t\fR, \fB--type\fR \fITYPE\fP The binary data type to decode the data as\. Must be one of the following: .LP .RS .IP \(bu 2 \fBint8\fR .IP \(bu 2 \fBuint8\fR .IP \(bu 2 \fBchar\fR .IP \(bu 2 \fBuchar\fR .IP \(bu 2 \fBbyte\fR .IP \(bu 2 \fBint16\fR .IP \(bu 2 \fBint16_le\fR .IP \(bu 2 \fBint16_be\fR .IP \(bu 2 \fBint16_ne\fR .IP \(bu 2 \fBuint16\fR .IP \(bu 2 \fBuint16_le\fR .IP \(bu 2 \fBuint16_be\fR .IP \(bu 2 \fBuint16_ne\fR .IP \(bu 2 \fBshort\fR .IP \(bu 2 \fBshort_le\fR .IP \(bu 2 \fBshort_be\fR .IP \(bu 2 \fBshort_ne\fR .IP \(bu 2 \fBushort\fR .IP \(bu 2 \fBushort_le\fR .IP \(bu 2 \fBushort_be\fR .IP \(bu 2 \fBushort_ne\fR .IP \(bu 2 \fBint32\fR .IP \(bu 2 \fBint32_le\fR .IP \(bu 2 \fBint32_be\fR .IP \(bu 2 \fBint32_ne\fR .IP \(bu 2 \fBuint32\fR .IP \(bu 2 \fBuint32_le\fR .IP \(bu 2 \fBuint32_be\fR .IP \(bu 2 \fBuint32_ne\fR .IP \(bu 2 \fBint\fR .IP \(bu 2 \fBlong\fR .IP \(bu 2 \fBlong_le\fR .IP \(bu 2 \fBlong_be\fR .IP \(bu 2 \fBlong_ne\fR .IP \(bu 2 \fBuint\fR .IP \(bu 2 \fBulong\fR .IP \(bu 2 \fBulong_le\fR .IP \(bu 2 \fBulong_be\fR .IP \(bu 2 \fBulong_ne\fR .IP \(bu 2 \fBint64\fR .IP \(bu 2 \fBint64_le\fR .IP \(bu 2 \fBint64_be\fR .IP \(bu 2 \fBint64_ne\fR .IP \(bu 2 \fBuint64\fR .IP \(bu 2 \fBuint64_le\fR .IP \(bu 2 \fBuint64_be\fR .IP \(bu 2 \fBuint64_ne\fR .IP \(bu 2 \fBlong_long\fR .IP \(bu 2 \fBlong_long_le\fR .IP \(bu 2 \fBlong_long_be\fR .IP \(bu 2 \fBlong_long_ne\fR .IP \(bu 2 \fBulong_long\fR .IP \(bu 2 \fBulong_long_le\fR .IP \(bu 2 \fBulong_long_be\fR .IP \(bu 2 \fBulong_long_ne\fR .IP \(bu 2 \fBfloat\fR .IP \(bu 2 \fBfloat_le\fR .IP \(bu 2 \fBfloat_be\fR .IP \(bu 2 \fBfloat_ne\fR .IP \(bu 2 \fBdouble\fR .IP \(bu 2 \fBdouble_le\fR .IP \(bu 2 \fBdouble_be\fR .IP \(bu 2 \fBdouble_ne\fR .RE .LP .TP \fB-O\fR, \fB--offset\fR \fIINDEX\fP Start reading data at the given offset within the file or data stream\. .LP .TP \fB-L\fR, \fB--length\fR \fILEN\fP Only read at most \fILEN\fP bytes of data\. .LP .TP \fB-Z\fR, \fB--zero-pad\fR Enables zero\-padding the input data so that it aligns with the data type specified by \fB-t\fR,\fB--type\fR\. .LP .TP \fB-c\fR, \fB--columns\fR \fIWIDTH\fP The number of bytes to hexdump per line\. .LP .TP \fB-g\fR, \`\-\-group\-columns \fIWIDTH\fP Groups the columns of hexdumped numbers together into groupings of \fIWIDTH\fP\. .LP .TP \fB-G\fR, \fB--group-chars\fR \fIWIDTH\fP\[or]\fBtype\fR Group the characters into columns of groupings of \fIWIDTH\fP, separated by the \fB|\fR character\. If \fBtype\fR is given, the size of the \fB-t\fR,\fB--type\fR type in bytes will be used for the character grouping width\. .LP .TP \fB-r\fR, \fB--[no-]repeating\fR Allows consecutive repeating lines in hexdump output\. By default consecutive repeating lines of data are omitted by a single \fB*\fR line\. .LP .TP \fB-b\fR, \fB--base\fR \fB2\fR\[or]\fB8\fR\[or]\fB10\fR\[or]\fB16\fR The numeric base to print hexdumped numbers in\. .LP .TP \fB-B\fR, \fB--index-base\fR \fB2\fR\[or]\fB8\fR\[or]\fB10\fR\[or]\fB16\fR The numeric base to print the index addresses in\. .LP .TP \fB-I\fR, \fB--index-offset\fR \fIINT\fP The starting value for the index addresses\. .LP .TP \fB-C\fR, \fB--[no-]chars-column\fR Enables or disables the display of the characters column\. .LP .TP \fB-E\fR, \fB--encoding\fR \fBascii\fR\[or]\fButf8\fR The character encoding to display the characters in\. Default to \fBascii\fR\. .LP .TP \fB--style-index\fR \fISTYLE\fP Applies ANSI styling to the index column\. See the \fIANSI STYLES\fP section for all possible style names\. .LP .TP \fB--style-numeric\fR \fISTYLE\fP Applies ANSI styling to the numeric column\. See the \fIANSI STYLES\fP section for all possible style names\. .LP .TP \fB--style-chars\fR \fISTYLE\fP Applies ANSI styling to the characters column\. See the \fIANSI STYLES\fP section for all possible style names\. .LP .TP \fB--highlight-index\fR \fIPATTERN\fP:\fISTYLE\fP Applies ANSI highlighting to the index column\. \fIPATTERN\fP may be either a literal \fISTRING\fP value or a \[sl]\fIREGEXP\fP\[sl] value\. See the \fIANSI STYLES\fP section for all possible style names\. .LP .TP \fB--highlight-numeric\fR \fIPATTERN\fP:\fISTYLE\fP Applies ANSI highlighting to the numeric column \fIPATTERN\fP may be either a literal \fISTRING\fP value or a \[sl]\fIREGEXP\fP\[sl] value\. See the \fIANSI STYLES\fP section for all possible style names\. .LP .TP \fB--highlight-chars\fR \fIPATTERN\fP:\fISTYLE\fP Applies ANSI highlighting to the characters column \fIPATTERN\fP may be either a literal \fISTRING\fP value or a \[sl]\fIREGEXP\fP\[sl] value\. See the \fIANSI STYLES\fP section for all possible style names\. .LP .TP \fB-h\fR, \fB--help\fR Prints help information\. .LP .SH ANSI STYLES .LP .PP An ANSI style string is comma\-separated list of one or more ANSI style names (ex: \fBgray,bold\fR)\. .LP .PP Font styles: .LP .RS .IP \(bu 2 \fBbold\fR .IP \(bu 2 \fBfaint\fR .IP \(bu 2 \fBitalic\fR .IP \(bu 2 \fBunderline\fR .IP \(bu 2 \fBinvert\fR .IP \(bu 2 \fBstrike\fR .RE .LP .PP Foreground colors: .LP .RS .IP \(bu 2 \fBblack\fR .IP \(bu 2 \fBred\fR .IP \(bu 2 \fBgreen\fR .IP \(bu 2 \fByellow\fR .IP \(bu 2 \fBblue\fR .IP \(bu 2 \fBmagenta\fR .IP \(bu 2 \fBcyan\fR .IP \(bu 2 \fBwhite\fR .RE .LP .PP Background colors: .LP .RS .IP \(bu 2 \fBon_black\fR .IP \(bu 2 \fBon_red\fR .IP \(bu 2 \fBon_green\fR .IP \(bu 2 \fBon_yellow\fR .IP \(bu 2 \fBon_blue\fR .IP \(bu 2 \fBon_magenta\fR .IP \(bu 2 \fBon_cyan\fR .IP \(bu 2 \fBon_white\fR .RE .LP .SH EXAMPLES .LP .PP Hexdump a file: .LP .nf \[Do] ronin hexdump \[sl]bin\[sl]ls 00000000 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 \[or]\.ELF\.\.\.\.\.\.\.\.\.\.\.\.\[or] 00000010 03 00 3e 00 01 00 00 00 d0 6b 00 00 00 00 00 00 \[or]\.\.>\.\.\.\.\.\.k\.\.\.\.\.\.\[or] 00000020 40 00 00 00 00 00 00 00 18 23 02 00 00 00 00 00 \[or]\[at]\.\.\.\.\.\.\.\.\[sh]\.\.\.\.\.\.\[or] 00000030 00 00 00 00 40 00 38 00 0d 00 40 00 20 00 1f 00 \[or]\.\.\.\.\[at]\.8\.\.\.\[at]\. \.\.\.\[or] 00000040 06 00 00 00 04 00 00 00 40 00 00 00 00 00 00 00 \[or]\.\.\.\.\.\.\.\.\[at]\.\.\.\.\.\.\.\[or] 00000050 40 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00 \[or]\[at]\.\.\.\.\.\.\.\[at]\.\.\.\.\.\.\.\[or] \.\.\. .fi .LP .PP Hexdump a UTF\-8 data: .LP .nf \[Do] ronin hexdump \-\-encoding utf8 file\.txt 00000000 e8 80 80 e8 80 80 e8 80 80 e8 80 80 e8 80 80 e8 \[or]耀耀耀耀耀\.\[or] 00000010 80 80 e8 80 80 e8 80 80 \[or]\.\.耀耀\[or] 00000018 .fi .LP .PP Control the number of columns: .LP .nf \[Do] ronin hexdump \-\-columns 10 a\.txt 00000000 41 41 41 41 41 41 41 41 41 41 \[or]AAAAAAAAAA\[or] \.\.\. .fi .LP .PP Show repeating data instead of omitting them with a \fB*\fR: .LP .nf \[Do] ronin hexdump \-\-repeating a\.txt 00000000 41 41 41 41 41 41 41 41 41 41 \[or]AAAAAAAAAA\[or] 0000000a 41 41 41 41 41 41 41 41 41 41 \[or]AAAAAAAAAA\[or] 00000014 41 41 41 41 41 41 41 41 41 41 \[or]AAAAAAAAAA\[or] .fi .LP .PP Grouping columns together: .LP .nf \[Do] ronin hexdump \-\-group\-columns 4 \-\-columns 16 abcd\.txt 00000000 41 42 43 44 41 42 43 44 41 42 43 44 41 42 43 44 \[or]ABCDABCDABCDABCD\[or] \.\.\. .fi .LP .PP Grouping the characters together: .LP .nf \[Do] ronin hexdump \-\-group\-chars 4 abcd\.txt 00000000 41 42 43 44 41 42 43 44 41 42 43 44 41 42 43 44 \[or]ABCD\[or]ABCD\[or]ABCD\[or]ABCD\[or] \.\.\. .fi .LP .PP Disabling the characters column: .LP .nf \[Do] ronin hexdump \-\-no\-chars\-column a\.txt 00000000 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 \.\.\. .fi .LP .PP Print the numbers as decimals (base 10): .LP .nf \[Do] ronin hexdump \-\-base 10 hello\.txt 00000000 104 101 108 108 111 0 \[or]hello\.\[or] .fi .LP .PP Print the numbers as octals (base 8): .LP .nf \[Do] ronin hexdump \-\-base 8 hello\.txt 00000000 0150 0145 0154 0154 0157 0000 \[or]hello\.\[or] .fi .LP .PP Print the numbers as binary (base 2): .LP .nf \[Do] ronin hexdump \-\-base 2 hello\.txt 00000000 01101000 01100101 01101100 01101100 01101111 00000000 \[or]hello\.\[or] .fi .LP .PP Decode \fBuint32\fR values: .LP .nf \[Do] ronin hexdump \-\-type uint32 abcd\.txt 00000000 44434241 44434241 44434241 44434241 \[or]ABCDABCDABCDABCD\[or] \.\.\. .fi .LP .PP Decode \fBuint32\fR (little\-endian) values: .LP .nf \[Do] ronin hexdump \-\-type uint32\[ru]le abcd\.txt 00000000 44434241 44434241 44434241 44434241 \[or]ABCDABCDABCDABCD\[or] \.\.\. .fi .LP .PP Decode \fBuint32\fR (big\-endian) values: .LP .nf \[Do] ronin hexdump \-\-type uint32\[ru]be abcd\.txt 00000000 41424344 41424344 41424344 41424344 \[or]ABCDABCDABCDABCD\[or] \.\.\. .fi .LP .PP Decode \fBint32\fR values: .LP .nf \[Do] ronin hexdump \-\-type int32 \-\-base 10 data\.bin 00000000 65535 \-1 \[or]\.\.\.\.\.\.\.\.\[or] 00000008 .fi .LP .PP Decode characters: .LP .nf \[Do] ronin hexdump \-\-type char hello\.txt 00000000 h e l l o \e0 \[or]hello\.\[or] 00000006 .fi .LP .PP Decode \fBfloat\fR values: .LP .nf \[Do] ronin hexdump \-\-type float64\[ru]le floats\.bin 00000000 0\.000000e\[pl]00 1\.000000e\[pl]00 \[or]\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.?\[or] 00000010 \-1\.000000e\[pl]00 NaN \[or]\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\[or] \.\.\. .fi .LP .PP Skipping to an offset: .LP .nf \[Do] ronin hexdump \-\-offset 7 data\.bin .fi .LP .PP Zero\-pad the data: .LP .nf \[Do] ronin hexdump \-\-type uint32\[ru]be \-\-zero\-pad abcd\.txt 00000000 41424344 41424344 41424344 41424344 \[or]ABCDABCDABCDABCD\[or] 00000010 41420000 \[or]AB\.\.\[or] 00000014 .fi .LP .PP ANSI coloring: .LP .nf \[Do] ronin hexdump \-\-style\-index white \e \-\-style\-numeric green \e \-\-style\-chars cyan \e data\.bin .fi .LP .PP ANSI highlighting: .LP .nf \[Do] ronin hexdump \-\-highlight\-index \[sl]00\[Do]\[sl]:white,bold \e \-\-highlight\-numeric \[sl]\(ha\[lB]8\-f\[rB]\[lB]0\-9a\-f\[rB]\[Do]\[sl]:faint \e \-\-highlight\-numeric \[sl]f\[sl]:cyan \e \-\-highlight\-numeric 00:black,on\[ru]red \e \-\-highlight\-chars \[sl]\[lB]\(ha\e\.\[rB]\[pl]\[sl]:green data\.bin .fi .LP .SH AUTHOR .LP .PP Postmodern .MT postmodern\.mod3\[at]gmail\.com .ME .LP .SH SEE ALSO .LP .PP ronin\-unhexdump(1)