hex (hx)
Futuristic take on hexdump.
hx accepts a file path as input and outputs a hexadecimal colorized view to stdout.
hx also accepts stdin as input.
|
quick links
examples
lower hex format -fx
$ hx src/main.rs
binary hex format -fb
$ hx -fb -c4 src/main.rs
octal hex format -fo
$ hx -fo -c8 src/main.rs
install
crates.io install
If cargo
is already installed, simply:
source install
From within the hx
source code directory, simply execute:
This will run the following cargo
commands:
Which will compile the release version, run tests and install release binary to <USERDIR>/.cargo/bin/hx
.
If <USERDIR>/.cargo/bin
is part of the PATH
environment variable, hx
should be able to be executed anywhere in the shell.
debian install
&&
docker run
|
features
output arrays in rust
, c
, golang
, python
, kotlin
, java
, or swift
hx
has a feature which can output the input file bytes as source code arrays.
For example:
rust array: -ar
;
c array: -ac
;
golang array: -ag
python array: -ap
kotlin array: -ak
)
java array: -aj
;
swift array: -as
NO_COLOR support
hx
will honor the NO_COLOR environment variable. If set, no color will be output to the terminal.
Rust no_color
crate:
manual
hx
Futuristic take on hexdump, made in Rust.
USAGE:
hx [OPTIONS] [INPUTFILE]
<stdout> | hx [OPTIONS]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-a, --array <array_format> Set source code format output: rust (r), C (c), golang (g), python (p), kotlin (k), java (j) [possible values: r, c, g, p, k, j]
-t, --color <color> Set color tint terminal output. 0 to disable, 1 to enable [possible values: 0, 1]
-c, --cols <columns> Set column length
-f, --format <format> Set format of octet: Octal (o), LowerHex (x), UpperHex (X), Binary (b) [possible
values: o, x, X, b]
-u, --func <func_length> Set function wave length
-l, --len <len> Set <len> bytes to read
-p, --places <func_places> Set function wave output decimal places
ARGS:
<INPUTFILE> Pass file path as an argument for hex dump
license
MIT