.\" Generated by kramdown-man 1.0.1 .\" https://github.com/postmodern/kramdown-man#readme .TH ronin-encode 1 "2023-02-01" Ronin "User Manuals" .SH NAME .PP ronin\-encode \- Encodes each character of data into a variety of encodings .SH SYNOPSIS .PP \fBronin encode \fR \[lB]\fIoptions\fP\[rB] \[lB]\fIFILE\fP \.\.\.\[rB] .SH DESCRIPTION .PP Encodes each character of the given data into a variety of formats\. .SH ARGUMENTS .TP \fIFILE\fP The optional file to read and process\. If no \fIFILE\fP arguments are given, input will be read from \fBstdin\fR\. .SH OPTIONS .TP \fB\-f\fR, \fB\-\-file\fR \fIFILE\fP Optional file to process\. .TP \fB\-\-string\fR \fISTRING\fP Optional string to process\. .TP \fB\-M\fR, \fB\-\-multiline\fR Process each line of input separately\. .TP \fB\-n\fR, \fB\-\-keep\-newlines\fR Preserves newlines at the end of each line\. .TP \fB\-\-base16\fR Base16 encodes the data\. .TP \fB\-\-base32\fR Base32 encodes the data\. .TP \fB\-b\fR, \fB\-\-base64\fR\[lB]\fB\[eq]\fR\fIstrict\fP\[or]\fIurl\fP\[rB] Base64 encodes the data\. If the \fBstrict\fR or \fBurl\fR option value is given, it will enable \fBstrict\fR or \fBurl\fR Base64 encoding mode, respectively\. .TP \fB\-z\fR, \fB\-\-zlib\fR Zlib compresses the data\. .TP \fB\-g\fR, \fB\-\-gzip\fR gzip compresses the data\. .TP \fB\-c\fR, \fB\-\-c\fR Encodes the data as a C string\. .TP \fB\-X\fR, \fB\-\-hex\fR Hex encode the data (ex: \fB414141\.\.\.\fR)\. .TP \fB\-H\fR, \fB\-\-html\fR HTML encodes the data\. .TP \fB\-u\fR, \fB\-\-uri\fR URI encodes the data\. .TP \fB\-\-http\fR HTTP encodes the data\. .TP \fB\-j\fR, \fB\-\-js\fR JavaScript encodes the data\. .TP \fB\-S\fR, \fB\-\-shell\fR Encodes the data as a Shell String\. .TP \fB\-P\fR, \fB\-\-powershell\fR Encodes the data as a PowerShell String\. .TP \fB\-\-punycode\fR Encodes the data as Punycode\. .TP \fB\-Q\fR, \fB\-\-quoted\-printable\fR Decodes the data as Quoted Printable\. .TP \fB\-\-uuencode\fR uuencodes the data\. .TP \fB\-R\fR, \fB\-\-ruby\fR Encodes the data as a Ruby String\. .TP \fB\-x\fR, \fB\-\-xml\fR XML encodes the data\. .TP \fB\-h\fR, \fB\-\-help\fR Print help information\. .SH EXAMPLES .PP Encode the string \fB\[dq]hello world\[dq]\fR to Base64: .PP .RS 4 .EX \[Do] ronin encode \-\-base64 \-\-string \[dq]hello world\[dq] aGVsbG8gd29ybGQ\[eq] .EE .RE .PP Encode the string \fB\[dq]hello world\[dq]\fR to HTTP encoded characters: .PP .RS 4 .EX \[Do] ronin encode \-\-http \-\-string \[dq]hello world\[dq] %68%65%6C%6C%6F%20%77%6F%72%6C%64 .EE .RE .PP Encode the string \fB\[dq]hello world\[dq]\fR to XML encoded characters: .PP .RS 4 .EX \[Do] ronin encode \-\-xml \-\-string \[dq]hello world\[dq] &\[sh]104;&\[sh]101;&\[sh]108;&\[sh]108;&\[sh]111;&\[sh]32;&\[sh]119;&\[sh]111;&\[sh]114;&\[sh]108;&\[sh]100; .EE .RE .PP Hex encodes the contents of a file: .PP .RS 4 .EX ronin encode \-\-hex \-\-file \[sl]path\[sl]to\[sl]file\.txt .EE .RE .PP Hex encodes every line of a file: .PP .RS 4 .EX ronin encode \-\-hex \-\-multiline \-\-file \[sl]path\[sl]to\[sl]file\.txt .EE .RE .PP Compresses the file\[cq]s contents using Zlib and then Base64 encodes it: .PP .RS 4 .EX ronin encode \-\-zlib \-\-base64 \-\-file hi\.txt .EE .RE .PP Encode the string \fB\[dq]hello world\[dq]\fR to a Ruby hex\-escaped string: .PP .RS 4 .EX \[Do] ronin encode \-\-ruby \-\-string \[dq]hello world\[dq] \ex68\ex65\ex6C\ex6C\ex6F\ex20\ex77\ex6F\ex72\ex6C\ex64 .EE .RE .SH AUTHOR .PP Postmodern .MT postmodern\.mod3\[at]gmail\.com .ME .SH SEE ALSO .PP .BR ronin\-decode (1)