• Stars
    star
    143
  • Rank 250,951 (Top 6 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created over 4 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

CLI hex dumper with colors

heksa

Screenshot

GitHub All Releases GitHub release (latest by date) GitHub tag (latest by date) Go Report Card

Packaging status

Hex dumper with colors

Features

  • ANSI colors for different byte groups such as
    • Printable: A-Z, a-z, 0-9
    • Spaces: space, tab, new line
    • Special: 0x00, 0xFF
  • Output multiple formats at once (hexadecimal, decimal, octal, bits or special combination formats)
  • Multiple offset formats (hexadecimal, decimal, octal, percentage)
    • First one is displayed on left side and second one on the right side
  • Read only N bytes
  • Seek to given offset
    • also reads from end of file when using minus sign
  • Seek and limit supports
    • Prefixes hex (0x), octal (0o) and binary (0b)
    • Units (KB, KiB, MB, MiB, GB, GiB, TB, TiB)
  • Print relative offset starting from zero if seeking a file
  • Read from stdin

Screenshot

heksa --help

heksa - hex file dumper v1.14.0 - (2021-05-18T16:20:59+03:00)
(c) Pekka Järvinen 2019- [ https://github.com/raspi/heksa ]
SYNOPSIS:
    heksa [--format|-f <fmt1,fmt2,..>] [--help|-h|-?]
          [--limit|-l <[prefix]bytes[unit]>] [--offset-format|-o <fmt1[,fmt2]>]
          [--print-relative-offset|-r] [--seek|-s <[prefix]offset[unit]>]
          [--splitter|-S <size>] [--version] [--width|-w <[prefix]width>]
          <filename> or STDIN

OPTIONS:
    --format|-f <fmt1,fmt2,..>          One or multiple of: asc, bit, bitwasc, bitwdec, bitwhex, blk, dec, decwasc, hex, hexwasc, oct (default: "hex,asc")

    --help|-h|-?                        Show this help (default: false)

    --limit|-l <[prefix]bytes[unit]>    Read only N bytes (0 = no limit). See NOTES. (default: "0")

    --offset-format|-o <fmt1[,fmt2]>    One or two of: dec, hex, humiec, humsi, oct, per, no, ''.
                                        First one is displayed on the left side and second one on right side after formatters. (default: "hex")

    --print-relative-offset|-r          Print relative offset(s) starting from 0 (file only) (default: false)

    --seek|-s <[prefix]offset[unit]>    Start reading from certain offset. See NOTES. (default: "0")

    --splitter|-S <size>                Insert visual splitter every N bytes. Zero (0) disables. (default: 8)

    --version                           Show version information (default: false)

    --width|-w <[prefix]width>          Width. See NOTES. (default: "16")


NOTES:
    - You can use prefixes for seek, limit and width. 0x = hex, 0b = binary, 0o = octal
    - Use '--seek \-1234' for seeking from end of file
    - Limit and seek parameters supports units (KB, KiB, MB, MiB, GB, GiB, TB, TiB)
    - --print-relative-offset can be used when seeking to certain offset to also print extra offset position starting from zero
    - Offset formatters:
      - Disable formatter output with 'no' or ''
      - 'humiec' (IEC: 1024 B) and 'humsi' (SI: 1000 B) displays offset in human form (n KiB/KB)
    - Formatters:
      - 'blk' can be used to print simple color blocks which helps to visualize where data vs. human readable strings are

EXAMPLES:
    heksa -f hex,asc,bit foo.dat
    heksa -o hex,per -f hex,asc foo.dat
    heksa -o hex -f hex,asc,bit foo.dat
    heksa -o no -f bit foo.dat
    heksa -l 0x1024 foo.dat
    heksa -s 0b1010 foo.dat
    heksa -s 4321KiB foo.dat
    heksa -w 8 foo.dat
    echo "test" | heksa

Requirements

Get source

git clone https://github.com/raspi/heksa

Contributing and helping with the project

See CONTRIBUTING.md and current issues that might need help.

Developing

  1. Make changes
  2. make build or just go build .

Releasing new version:

Requirements:

  • upx for compressing executables
  1. Create new version tag
  2. make release

If there's a lot of visual changes you can take new screenshots with screenshot.sh script in _assets directory

Is it any good?

Yes.

More Repositories

1

WinLLDPService

LLDP Service for Windows
C#
76
star
2

kaukosohva

Play games remotely with Linux
Shell
43
star
3

dirscanner

dirscanner is a recursive file lister which uses channels for go.
Go
23
star
4

duplikaatti

Remove duplicate files.
Go
13
star
5

lomake

HTML Form generator from Go structs
Go
12
star
6

scrapy-intel-ark

Web crawler for Intel ARK (ark.intel.com)
Python
11
star
7

screenjournal

Generate screenshots to be used as a journal to track work day. Interval is user defined.
C#
9
star
8

BuildingNAS

Building NAS for home use with ZFS
7
star
9

annotatorreader

Annotator Reader Dumper
Go
6
star
10

kallu

CLI Calendar with colors
Go
5
star
11

samanlainen

Delete duplicate files
Rust
4
star
12

emailcheck

Validate email address
Go
3
star
13

iMagickFx

Effects for iMagick
PHP
3
star
14

trackermod

Library for Amiga Protracker .mod module music tracker format for Go.
Go
2
star
15

zf-tupas

TUPAS for Zend Framework
PHP
2
star
16

motion-tracking-video-crop

Crop motion tracked video with added smoothing movement
Python
2
star
17

Json2ArchPkgBuild

Generate Arch Linux PKGBUILD files from JSON
Go
2
star
18

searchreader

Search single bytes.Reader with multiple strings.Readers with or without case sensitivity
Go
2
star
19

ip-range-to-CIDR

Convert IP address range to CIDR
Makefile
2
star
20

pypdnsrest

PowerDNS HTTP REST API Python client
Python
2
star
21

FreeBSD-pkg

Golang library for generating FreeBSD +MANIFEST JSON files
Go
2
star
22

scrapy-kuntavaalit2021-yle

Fetch YLE kuntavaalit 2021 data
Python
2
star
23

scrapy-finlex

Scrapy for finlex
Python
1
star
24

tulkki

Translated HTML templates for Go
Go
1
star
25

timeaverage

Moving average window
Go
1
star
26

muisto

Memory dumper for Linux
Go
1
star
27

DHCPNet

DHCP packets for .NET (C#)
C#
1
star
28

scrapy-supermicro

Web crawler for Supermicro (supermicro.com) website
Python
1
star
29

pyicalmerge

Merge multiple iCalendar .ics files to one file. Written in Python. Uses vObject.
Python
1
star
30

go-PKGBUILD

Template for Arch Linux PKGBUILD file
Go
1
star
31

pydupechecker

Find duplicate files
Python
1
star
32

yle-areena-cli

Yle Areena CLI
Python
1
star
33

randomXorReaderWriter

Generate two randomly xor'ed outputs from one input and vice versa
Go
1
star
34

zf1-fb-auth

Zend Framework 1 Facebook SDK authentication adapter
PHP
1
star