A better hexdump

Related tags

Miscellaneous hxd
Overview

logo

huxdemp (aka hxd)

huxdemp is an advanced version of the venerable hexdump that uses colors, bolding, and other terminal formatting to distinguish between nul bytes, ASCII whitespace, UTF8-control characters, ASCII control characters, and normal printable bytes.

NOTE: This should be considered beta software. Expect a multitude of bugs and snakes, and count the directories in your $HOME after you use huxdemp.

Seeing is believing

hxd reading /dev/input/mouse hxd reading /dev/input/mouse hxd reading part of a PNG image hxd reading /dev/random hxd reading a snippet from The Silmarillion hxd reading some UTF8 text, demonstrating the -u flag

Features/Anti-features

  • No octal dumping (this might be added later).
  • "Highlights" bytes that "belong" to the same UTF8-encoded character.
  • Readable source, written in literate programming using a dialect of unu from RetroForth.
  • Ability to print characters in IBM's code page 437 (see screenshots).
  • Ability to print control characters using fancy Unicode glyphs (e.g. ␀ for NUL, ␌ for FF (form feed), etc).
  • Not written in Rust. (The horrors!)

Install

Requirements

  • A POSIX system. (Windows is not supported at present.)
  • scdoc (for building from source)
  • A C99 compiler and GNU Make (for building from source)

NOTE: If you are seeing garbled output on urxvt or other terminals, you may want to try building from source. A few bugs were fixed after 0.1.0 was released that only crops up on those terminals.

Download a binary tarball from the releases, unpack, and move the executable into your $PATH and the manpage (hxd.1) to someplace like /usr/local/share/man/man1/hxd.1.

Or, to build from source, clone (or download a tarball from the releases), make, and install:

$ cd huxdemp
$ make
    CCLD    unu
    UNU     main.c
    CCLD    hxd
    SCDOC  
$ sudo make install
[sudo] password for kiedtl:
$

As far as I am aware, there are no distributions that carry huxdemp in their repositories.

TODO

  • hexdump's *-n and -s option.
  • An option to change the order/format of the columns.
  • A $HXD_COLORS variable to change the display style of the ASCII/byte column.
  • A flag to display the ASCII column in bold.
  • A flag to "mark" the nth byte of the input.
  • Use pledge(2)/unveil(2) on OpenBSD.
  • Support Winbl^B^B^Kdows 10.

License

This project is licensed under the GPLv3 license, with the exception of utf8.c, which comes from termbox and is licensed under the MIT license.

You might also like...
A C++ data container replicating std::queue functionality but with better performance.

A data container replicating std::queue functionality but with better performance than standard library containers in a queue context. C++98/03/11/14/etc-compatible.

 Creating CLI's just got a whole lot better
Creating CLI's just got a whole lot better

Staq Creating CLI's just got a whole lot better. Don't worry about CLI colouring, networking, Size of Executables, Speed ever again Have any doubts? R

Organic Maps is a better fork of MAPS.ME, an Android & iOS offline maps app for travelers, tourists, hikers, and cyclists based on top of crowd-sourced OpenStreetMap data and curated with love by MAPS.ME founders.
Organic Maps is a better fork of MAPS.ME, an Android & iOS offline maps app for travelers, tourists, hikers, and cyclists based on top of crowd-sourced OpenStreetMap data and curated with love by MAPS.ME founders.

🍃 Organic Maps is a better fork of MAPS.ME, an Android & iOS offline maps app for travelers, tourists, hikers, and cyclists based on top of crowd-sourced OpenStreetMap data and curated with love by MAPS.ME founders. No ads, no tracking, no data collection, no crapware.

Task System presented in
Task System presented in "Better Code: Concurrency - Sean Parent"

task_system task_system provides a task scheduler for modern C++. The scheduler manages an array of concurrent queues A task, when scheduled, is enque

Thread Stack Spoofing - PoC for an advanced In-Memory evasion technique allowing to better hide injected shellcode's memory allocation from scanners and analysts.
Thread Stack Spoofing - PoC for an advanced In-Memory evasion technique allowing to better hide injected shellcode's memory allocation from scanners and analysts.

Thread Stack Spoofing PoC A PoC implementation for an advanced in-memory evasion technique that spoofs Thread Call Stack. This technique allows to byp

 T-HYDRA is a modified version of original thc-hydra for better use inside Termux .
T-HYDRA is a modified version of original thc-hydra for better use inside Termux .

T-HYDRA is a modified version of original thc-hydra for better use inside Termux . Earlier , hydra pakage had been with Termux repositories. Then afte

ImmortalWrt is a fork of OpenWrt, with more packages ported, more devices supported, better performance, and special optimizations for mainland China users.

ImmortalWrt is a fork of OpenWrt, with more packages ported, more devices supported, better performance, and special optimizations for mainland China users.

7Zip Windows Client , re-build with better icons.
7Zip Windows Client , re-build with better icons.

7zip-BetterIcon 7Zip Windows Client (https://www.7-zip.org ) , re-build with better icons. How to Build Use the Visual Studio 2017 Community or Visual

Brand new engine with new and QoL features. Grafex is Psych engine with some additions and Better graphics

Friday Night Funkin' - Graphex Engine Credits: Grafex Mod aka Psych Graphic Rework: Xale - Lead Coding, Artist PurpleSnake - Second Coder Psych Engine

A C++ data container replicating std::stack functionality but with better performance than standard library containers in a stack context.

plf::stack A data container replicating std::stack functionality but with better performance than standard library containers in a stack context. C++9

Stock exchange simulator made in Swing using Java with logic backend in C++ giving it faster load time and better data control

StockSimulator Stock exchange simulator made in Swing using Java with logic backend in C++ giving it faster load time and better data control Features

An CPP Adaptation of esHTML. For better porpuses.

Keepy Keepy is a pseudo-language / HTML preprocessor that translates special syntax into HTML with the peculiarity of being a "compiled pseudo-languag

Visual-inertial-wheel fusion odometry, better performance in scenes with drastic changes in light
Visual-inertial-wheel fusion odometry, better performance in scenes with drastic changes in light

VIW-Fusion An visual-inertial-wheel fusion odometry VIW-Fusion is an optimization-based viusla-inertial-wheel fusion odometry, which is developed as a

A UE4 editor plugin for better artist/designer UI.
A UE4 editor plugin for better artist/designer UI.

Details Workspace (for UE4) Details Workspace is a UE4 editor plugin for better artist/designer workflow. It allows you to create any number of "Detai

Industrial-grade RPC framework used throughout Baidu, with 1,000,000+ instances and thousands kinds of services.
Industrial-grade RPC framework used throughout Baidu, with 1,000,000+ instances and thousands kinds of services. "brpc" means "better RPC".

中文版 An industrial-grade RPC framework used throughout Baidu, with 1,000,000+ instances(not counting clients) and thousands kinds of services. "brpc" m

Hello, I am creating this file to make everyone understand the basis of C++ language which is actually the advanced version of C but better than C because of its OOPs feature.

Hello-in-C++ 😄 😄 FOR BEGINNERS IN C++ Hello, I am creating this file to make everyone understand the basics of C++ language which is actually the ad

Either and Maybe monads for better error-handling in C++ ↔️

neither A functional implementation of Either in C++14. buckaroo add github.com/loopperfect/neither Examples Handling Unsafe Code auto unsafe = [] {

The Better String Library

The Better String Library The Better String Library is an abstraction of a string data type which is superior to the C library char buffer string type

Turn images into text better than caca/aalib
Turn images into text better than caca/aalib

hiptext hiptext is command line tool for rendering images and videos inside terminals. Dependencies You need clang or gcc =4.7. You also need to inst

Comments
  • packing for gentoo

    packing for gentoo

    hello,

    you wrote a very cool program (with interesting source code btw) and i created a package for it in my overlay

    so if yo planned to include info about installing huxdemp in different distros you can include instruction for Gentoo:

    sudo eselect repository enable dm9pZCAq
    sudo emerge --sync dm9pZCAq
    sudo emerge sys-apps/huxdemp::dm9pZCAq
    
    opened by dm9pZCAq 1
Releases(1.0.0)
  • 1.0.0(Dec 7, 2021)

    v1.0.0

    huxdemp is now stable, and should be considered for the most part "done". More plugins may be added and huxdemp will recieve bugfixes, but new features are unlikely to be implemented.

    • The -f flag was added for column reordering.
    • The ASCII column can be split into left/right column.
    • The bytes column can be split into left/right column.
    • A Lua-based plugin system was added.
    • A chip8, ebcdic, and uxn plugins were added.
    • Some utf-8 related bugs were fixed.
    Source code(tar.gz)
    Source code(zip)
    huxd-FreeBSD-amd64-1.0.0.tar.xz(29.46 KB)
    huxd-Linux-armv6l-1.0.0.tar.xz(28.61 KB)
    huxd-Linux-x86_64-1.0.0.tar.xz(33.37 KB)
  • 0.2.1(Nov 26, 2021)

    (Amalgation release notes for 0.2.0 and 0.2.1)

    0.2.1

    Quick bugfix patch for 0.2.0, fixing some urgent issues that were overlooked.

    • Bump version (huxd -V still returned "0.1.0"!)
    • Fixed compile warnings on 32-bit platforms.
    • Made config parsing a bit more robust (errors are now properly given when an invalid color is passed).

    0.2.0

    Well! After some time away I was again able to focus on huxdemp.

    Most notably, the tool's abbreviation was renamed (hxdhuxd) to avoid naming clashes with HxD, a Windows hex editing tool that's been around longer then huxdemp. (Thanks to M. Hörz, HxD's author, for letting me know.)

    A bunch of new features have also been added, making huxdemp a more attractive alternative to existing tools.

    • The -s flag was added, which specifies an offset to read the input from.

    • The -n flag was added, which specifies a maximum number of bytes to be read from the input.

    • The -P flag and an auto-paging feature was added. huxdemp will now automatically pipe long outputs to less(1) (unless -P never is passed).

    • Most significantly, the HUXD_COLORS environment variable was added, which now allows the colors used to be modified at runtime (see the manpage for further details).

    • Fix invalid escape sequences being emitted, which broke huxdemp completely on non-xterm terminals.

    • Fix out of range error when -c flag is on and characters above 0x7F are encountered. (Thanks to @skeeto!)

    • Unu, the tool used to generate some source files from literate sources, now emits #line directives. This means that crash info (from valgrind or gdb) will now use the line numbers of the literate source files, not the generated files. This makes debugging a ton easier.

    Next up: a plugin system!

    Source code(tar.gz)
    Source code(zip)
    huxd-FreeBSD-amd64-0.2.1.tar.xz(10.82 KB)
    huxd-Linux-armv6l-0.2.1.tar.xz(10.22 KB)
    huxd-Linux-x86_64-0.2.1.tar.xz(22.42 KB)
Owner
LPTSTR
Changing the world, one utility at a time.
LPTSTR
Thread Stack Spoofing - PoC for an advanced In-Memory evasion technique allowing to better hide injected shellcode's memory allocation from scanners and analysts.

Thread Stack Spoofing PoC A PoC implementation for an advanced in-memory evasion technique that spoofs Thread Call Stack. This technique allows to byp

Mariusz B. 698 Sep 28, 2022
T-HYDRA is a modified version of original thc-hydra for better use inside Termux .

T-HYDRA is a modified version of original thc-hydra for better use inside Termux . Earlier , hydra pakage had been with Termux repositories. Then afte

Devil Master 42 Oct 1, 2022
Stock exchange simulator made in Swing using Java with logic backend in C++ giving it faster load time and better data control

StockSimulator Stock exchange simulator made in Swing using Java with logic backend in C++ giving it faster load time and better data control Features

Dušan Todorović 0 Mar 1, 2022
Visual-inertial-wheel fusion odometry, better performance in scenes with drastic changes in light

VIW-Fusion An visual-inertial-wheel fusion odometry VIW-Fusion is an optimization-based viusla-inertial-wheel fusion odometry, which is developed as a

庄庭达 213 Sep 28, 2022
The Better String Library

The Better String Library The Better String Library is an abstraction of a string data type which is superior to the C library char buffer string type

null 385 Sep 29, 2022
Turn images into text better than caca/aalib

hiptext hiptext is command line tool for rendering images and videos inside terminals. Dependencies You need clang or gcc >=4.7. You also need to inst

Justine Tunney 680 Sep 27, 2022
Refinements of the WFA alignment algorithm with better complexity

wfalm Refinements of the WFA alignment algorithm with better complexity Introduction This repository contains implementations of the WFA algorithm as

Jordan Eizenga 25 Aug 19, 2022
Like feh, but better, faster, more image formats, simpler, more lightweight, animation support, and better UI

Like feh, but better, faster, more image formats, simpler, more lightweight, animation support, and better UI

martin 11 Aug 18, 2022
Ghidra rewrite in C++ for better performance and usability

Ghidra Plus Plus A rewrite of all but the core decompiler in C++ in the name of performance and usability. UNDER DEVELOPMENT, things are currently bei

null 11 Mar 6, 2021
The Pizza Compass will determine your location and direct you to the nearest pizza place. It’s like a regular compass, but better!

Pizza_Compass A Particle project named Pizza_Compass Welcome to your project! Every new Particle project is composed of 3 important elements that you'

Joe Grand 68 Aug 16, 2022