.\" Generated by kramdown-man 1.0.1 .\" https://github.com/postmodern/kramdown-man#readme .TH ronin-hexdump 1 "2023-02-01" Ronin "User Manuals" .SH NAME .PP ronin\-hexdump \- Hexdumps data in a variaty of encodings and formats .SH SYNOPSIS .PP \fBronin hexdump\fR \[lB]\fIoptions\fP\[rB] \[lB]\fIFILE\fP \.\.\.\[rB] .SH DESCRIPTION .PP Hexdumps data in a variety of encodings and formats\. .SH ARGUMENTS .TP \fIFILE\fP The optional path to the file(s) to hexdump\. .SH OPTIONS .TP \fB\-t\fR, \fB\-\-type\fR \fITYPE\fP The binary data type to decode the data as\. Must be one of the following: .RS .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\[ru]le\fR .IP \(bu 2 \fBint16\[ru]be\fR .IP \(bu 2 \fBint16\[ru]ne\fR .IP \(bu 2 \fBuint16\fR .IP \(bu 2 \fBuint16\[ru]le\fR .IP \(bu 2 \fBuint16\[ru]be\fR .IP \(bu 2 \fBuint16\[ru]ne\fR .IP \(bu 2 \fBshort\fR .IP \(bu 2 \fBshort\[ru]le\fR .IP \(bu 2 \fBshort\[ru]be\fR .IP \(bu 2 \fBshort\[ru]ne\fR .IP \(bu 2 \fBushort\fR .IP \(bu 2 \fBushort\[ru]le\fR .IP \(bu 2 \fBushort\[ru]be\fR .IP \(bu 2 \fBushort\[ru]ne\fR .IP \(bu 2 \fBint32\fR .IP \(bu 2 \fBint32\[ru]le\fR .IP \(bu 2 \fBint32\[ru]be\fR .IP \(bu 2 \fBint32\[ru]ne\fR .IP \(bu 2 \fBuint32\fR .IP \(bu 2 \fBuint32\[ru]le\fR .IP \(bu 2 \fBuint32\[ru]be\fR .IP \(bu 2 \fBuint32\[ru]ne\fR .IP \(bu 2 \fBint\fR .IP \(bu 2 \fBlong\fR .IP \(bu 2 \fBlong\[ru]le\fR .IP \(bu 2 \fBlong\[ru]be\fR .IP \(bu 2 \fBlong\[ru]ne\fR .IP \(bu 2 \fBuint\fR .IP \(bu 2 \fBulong\fR .IP \(bu 2 \fBulong\[ru]le\fR .IP \(bu 2 \fBulong\[ru]be\fR .IP \(bu 2 \fBulong\[ru]ne\fR .IP \(bu 2 \fBint64\fR .IP \(bu 2 \fBint64\[ru]le\fR .IP \(bu 2 \fBint64\[ru]be\fR .IP \(bu 2 \fBint64\[ru]ne\fR .IP \(bu 2 \fBuint64\fR .IP \(bu 2 \fBuint64\[ru]le\fR .IP \(bu 2 \fBuint64\[ru]be\fR .IP \(bu 2 \fBuint64\[ru]ne\fR .IP \(bu 2 \fBlong\[ru]long\fR .IP \(bu 2 \fBlong\[ru]long\[ru]le\fR .IP \(bu 2 \fBlong\[ru]long\[ru]be\fR .IP \(bu 2 \fBlong\[ru]long\[ru]ne\fR .IP \(bu 2 \fBulong\[ru]long\fR .IP \(bu 2 \fBulong\[ru]long\[ru]le\fR .IP \(bu 2 \fBulong\[ru]long\[ru]be\fR .IP \(bu 2 \fBulong\[ru]long\[ru]ne\fR .IP \(bu 2 \fBfloat\fR .IP \(bu 2 \fBfloat\[ru]le\fR .IP \(bu 2 \fBfloat\[ru]be\fR .IP \(bu 2 \fBfloat\[ru]ne\fR .IP \(bu 2 \fBdouble\fR .IP \(bu 2 \fBdouble\[ru]le\fR .IP \(bu 2 \fBdouble\[ru]be\fR .IP \(bu 2 \fBdouble\[ru]ne\fR .RE .RE .TP \fB\-O\fR, \fB\-\-offset\fR \fIINDEX\fP Start reading data at the given offset within the file or data stream\. .TP \fB\-L\fR, \fB\-\-length\fR \fILEN\fP Only read at most \fILEN\fP bytes of data\. .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\. .TP \fB\-c\fR, \fB\-\-columns\fR \fIWIDTH\fP The number of bytes to hexdump per line\. .TP \fB\-g\fR, \`\-\-group\-columns \fIWIDTH\fP Groups the columns of hexdumped numbers together into groupings of \fIWIDTH\fP\. .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\[or]\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\. .TP \fB\-r\fR, \fB\-\-\[lB]no\-\[rB]repeating\fR Allows consecutive repeating lines in hexdump output\. By default consecutive repeating lines of data are omitted by a single \fB*\fR line\. .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\. .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\. .TP \fB\-I\fR, \fB\-\-index\-offset\fR \fIINT\fP The starting value for the index addresses\. .TP \fB\-C\fR, \fB\-\-\[lB]no\-\[rB]chars\-column\fR Enables or disables the display of the characters column\. .TP \fB\-E\fR, \fB\-\-encoding\fR \fBascii\fR\[or]\fButf8\fR The character encoding to display the characters in\. Default to \fBascii\fR\. .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\. .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\. .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\. .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\. .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\. .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\. .TP \fB\-h\fR, \fB\-\-help\fR Prints help information\. .SH ANSI STYLES .PP An ANSI style string is comma\-separated list of one or more ANSI style names (ex: \fBgray,bold\fR)\. .PP Font styles: .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 .PP Foreground colors: .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 .PP Background colors: .RS .IP \(bu 2 \fBon\[ru]black\fR .IP \(bu 2 \fBon\[ru]red\fR .IP \(bu 2 \fBon\[ru]green\fR .IP \(bu 2 \fBon\[ru]yellow\fR .IP \(bu 2 \fBon\[ru]blue\fR .IP \(bu 2 \fBon\[ru]magenta\fR .IP \(bu 2 \fBon\[ru]cyan\fR .IP \(bu 2 \fBon\[ru]white\fR .RE .SH EXAMPLES .PP Hexdump a file: .PP .RS 4 .EX \[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] \.\.\. .EE .RE .PP Hexdump a UTF\-8 data: .PP .RS 4 .EX \[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 .EE .RE .PP Control the number of columns: .PP .RS 4 .EX \[Do] ronin hexdump \-\-columns 10 a\.txt 00000000 41 41 41 41 41 41 41 41 41 41 \[or]AAAAAAAAAA\[or] \.\.\. .EE .RE .PP Show repeating data instead of omitting them with a \fB*\fR: .PP .RS 4 .EX \[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] .EE .RE .PP Grouping columns together: .PP .RS 4 .EX \[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] \.\.\. .EE .RE .PP Grouping the characters together: .PP .RS 4 .EX \[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] \.\.\. .EE .RE .PP Disabling the characters column: .PP .RS 4 .EX \[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 \.\.\. .EE .RE .PP Print the numbers as decimals (base 10): .PP .RS 4 .EX \[Do] ronin hexdump \-\-base 10 hello\.txt 00000000 104 101 108 108 111 0 \[or]hello\.\[or] .EE .RE .PP Print the numbers as octals (base 8): .PP .RS 4 .EX \[Do] ronin hexdump \-\-base 8 hello\.txt 00000000 0150 0145 0154 0154 0157 0000 \[or]hello\.\[or] .EE .RE .PP Print the numbers as binary (base 2): .PP .RS 4 .EX \[Do] ronin hexdump \-\-base 2 hello\.txt 00000000 01101000 01100101 01101100 01101100 01101111 00000000 \[or]hello\.\[or] .EE .RE .PP Decode \fBuint32\fR values: .PP .RS 4 .EX \[Do] ronin hexdump \-\-type uint32 abcd\.txt 00000000 44434241 44434241 44434241 44434241 \[or]ABCDABCDABCDABCD\[or] \.\.\. .EE .RE .PP Decode \fBuint32\fR (little\-endian) values: .PP .RS 4 .EX \[Do] ronin hexdump \-\-type uint32\[ru]le abcd\.txt 00000000 44434241 44434241 44434241 44434241 \[or]ABCDABCDABCDABCD\[or] \.\.\. .EE .RE .PP Decode \fBuint32\fR (big\-endian) values: .PP .RS 4 .EX \[Do] ronin hexdump \-\-type uint32\[ru]be abcd\.txt 00000000 41424344 41424344 41424344 41424344 \[or]ABCDABCDABCDABCD\[or] \.\.\. .EE .RE .PP Decode \fBint32\fR values: .PP .RS 4 .EX \[Do] ronin hexdump \-\-type int32 \-\-base 10 data\.bin 00000000 65535 \-1 \[or]\.\.\.\.\.\.\.\.\[or] 00000008 .EE .RE .PP Decode characters: .PP .RS 4 .EX \[Do] ronin hexdump \-\-type char hello\.txt 00000000 h e l l o \e0 \[or]hello\.\[or] 00000006 .EE .RE .PP Decode \fBfloat\fR values: .PP .RS 4 .EX \[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] \.\.\. .EE .RE .PP Skipping to an offset: .PP .RS 4 .EX \[Do] ronin hexdump \-\-offset 7 data\.bin .EE .RE .PP Zero\-pad the data: .PP .RS 4 .EX \[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 .EE .RE .PP ANSI coloring: .PP .RS 4 .EX \[Do] ronin hexdump \-\-style\-index white \e \-\-style\-numeric green \e \-\-style\-chars cyan \e data\.bin .EE .RE .PP ANSI highlighting: .PP .RS 4 .EX \[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 .EE .RE .SH AUTHOR .PP Postmodern .MT postmodern\.mod3\[at]gmail\.com .ME .SH SEE ALSO .PP .BR ronin\-unhexdump (1)