All Projects → sitkevij → Hex

sitkevij / Hex

Licence: mit
🔮 Futuristic take on hexdump, made in Rust.

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Hex

Xxv
The XXV visual hex viewer for the terminal.
Stars: ✭ 61 (-74.79%)
Mutual labels:  bytes, developer-tools, ascii, hex
Despacer
C library to remove white space from strings as fast as possible
Stars: ✭ 90 (-62.81%)
Mutual labels:  bytes, ascii
Cargo Modules
A cargo plugin for showing a tree-like overview of a crate's modules.
Stars: ✭ 222 (-8.26%)
Mutual labels:  developer-tools
React Sight
Visualization tool for React, with support for Fiber, Router (v4), and Redux
Stars: ✭ 2,716 (+1022.31%)
Mutual labels:  developer-tools
Audion
Audion (Web Audio Inspector) is a Chrome extension that adds a Web Audio panel to Developer Tools. This panel visualizes the web audio graph in real-time and lets users inspect nodes.
Stars: ✭ 230 (-4.96%)
Mutual labels:  developer-tools
Awesome Ci
List of Continuous Integration services
Stars: ✭ 2,737 (+1030.99%)
Mutual labels:  developer-tools
Docker Mastery For Nodejs
Docker Mastery for Node.js Projects, From a Docker Captain
Stars: ✭ 231 (-4.55%)
Mutual labels:  developer-tools
Rustplayground
Quickly test Rust code on macOS
Stars: ✭ 222 (-8.26%)
Mutual labels:  developer-tools
Dojo
Containerize your development and operations environment
Stars: ✭ 240 (-0.83%)
Mutual labels:  developer-tools
Dynamiccolor
Yet another extension to manipulate colors easily in Swift and SwiftUI
Stars: ✭ 2,677 (+1006.2%)
Mutual labels:  hex
Monocorpus
A notepad for software and machine learning
Stars: ✭ 234 (-3.31%)
Mutual labels:  developer-tools
Tints And Shades
🌈 Display tints and shades of a given hex color in 10% increments.
Stars: ✭ 228 (-5.79%)
Mutual labels:  hex
Rested
A REST client for browsers
Stars: ✭ 225 (-7.02%)
Mutual labels:  developer-tools
Opentouryo
”Open棟梁”は、長年の.NETアプリケーション開発実績にて蓄積したノウハウに基づき開発した.NET用アプリケーション フレームワークです。 (”OpenTouryo” , is an application framework for .NET which was developed using the accumulated know-how with a long track record in .NET application development.)
Stars: ✭ 233 (-3.72%)
Mutual labels:  developer-tools
Devutils App
Offline Toolbox for Developers
Stars: ✭ 2,735 (+1030.17%)
Mutual labels:  developer-tools
Review
🎨 A view to help developers and designers view the View's font size, color, and border.
Stars: ✭ 236 (-2.48%)
Mutual labels:  developer-tools
Ecto mnesia
Ecto adapter for Mnesia Erlang term database.
Stars: ✭ 223 (-7.85%)
Mutual labels:  hex
Hack
A typeface designed for source code
Stars: ✭ 14,543 (+5909.5%)
Mutual labels:  developer-tools
Go Asciibot
Golang ASCII Robot Generator
Stars: ✭ 231 (-4.55%)
Mutual labels:  ascii
See
Python's dir() for humans. (GitHub mirror)
Stars: ✭ 240 (-0.83%)
Mutual labels:  developer-tools

hex (hx)

Futuristic take on hexdump.

hx accepts a file path as input and outputs a hexadecimal colorized view to stdout.

$ hx tests/files/alphanumeric.txt
0x000000: 0x61 0x62 0x63 0x64 0x65 0x66 0x67 0x68 0x69 0x6a abcdefghij
0x00000a: 0x6b 0x69 0x6c 0x6d 0x6e 0x6f 0x70 0x71 0x72 0x73 kilmnopqrs
0x000014: 0x74 0x75 0x76 0x77 0x78 0x79 0x7a 0x30 0x31 0x32 tuvwxyz012
0x00001e: 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x0a 0x30 0x31 3456789.01
0x000028: 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x30 0x31 2345678901
0x000032: 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x30 0x31 2345678901
0x00003c: 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39           23456789
   bytes: 68

hx also accepts stdin as input.

cat "tests/files/alphanumeric.txt" | hx
0x000000: 0x61 0x62 0x63 0x64 0x65 0x66 0x67 0x68 0x69 0x6a abcdefghij
0x00000a: 0x6b 0x69 0x6c 0x6d 0x6e 0x6f 0x70 0x71 0x72 0x73 kilmnopqrs
0x000014: 0x74 0x75 0x76 0x77 0x78 0x79 0x7a 0x30 0x31 0x32 tuvwxyz012
0x00001e: 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x0a 0x30 0x31 3456789.01
0x000028: 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x30 0x31 2345678901
0x000032: 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x30 0x31 2345678901
0x00003c: 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39           23456789
   bytes: 68

build coverage

quick links

examples

lower hex format -fx

$ hx src/main.rs

lower hex output format

binary hex format -fb

$ hx -fb -c4 src/main.rs

binary hex output format

octal hex format -fo

$ hx -fo -c8 src/main.rs

octal hex output format

install

crates.io install

If cargo is already installed, simply:

cargo install hx

source install

From within the hx source code directory, simply execute:

make install

This will run the following cargo commands:

cargo build --release
cargo test --verbose --all -- --nocapture
cargo install --path .

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.

arch linux install

pacman -S hex

debian install

curl -sLO https://github.com/sitkevij/hex/releases/download/v0.4.1/hx_0.4.1_amd64.deb && dpkg -i hx_0.4.1_amd64.deb

docker run

cat README.md | docker run -i sitkevij/hx:latest

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

$ hx -ar -c8 tests/files/tiny.txt
let ARRAY: [u8; 3] = [
    0x69, 0x6c, 0x0a
];

c array: -ac

$ hx -ac -c8 tests/files/tiny.txt
unsigned char ARRAY[3] = {
    0x69, 0x6c, 0x0a
};

golang array: -ag

$ hx -ag -c8 tests/files/tiny.txt
a := [3]byte{
    0x69, 0x6c, 0x0a,
}

python array: -ap

$ hx -ap -c8 tests/files/tiny.txt
a = [
    0x69, 0x6c, 0x0a
]

kotlin array: -ak

$ hx -ak -c8 tests/files/tiny.txt
val a = byteArrayOf(
    0x69, 0x6c, 0x0a
)

java array: -aj

$ hx -aj -c8 tests/files/tiny.txt
byte[] a = new byte[]{
    0x69, 0x6c, 0x0a
};

swift array: -as

$ hx -as -c8 tests/files/tiny.txt
let a: [UInt8] = [
    0x69, 0x6c, 0x0a
]

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].