Giter Club home page Giter Club logo

hexit's Introduction

Hexit

A minimalistic Hex-Editor!

Forks Stars Build Status Contributors Issues License

About The Project

Hexit aims to be a simple yet efficient hex editor.

  • It allows you to view and/or edit raw bytes in a file.
  • The UI is separated into three visual areas: the byte offset on the left, the hexadecimal representation in the center, and the ASCII interpretation on the right.
  • Hexit will not load the whole file in memory but it will instead load different 'chunks' of the file on demand. This makes it use as little memory as possible regardless of the actual size of the file.
  • You can easily jump into different absolute byte offsets.
  • Hexit will attempt to display the actual type of the file and display it on the bottom right of the screen. It does that by trying to match the first few bytes of each file against a database of well known file signatures.
  • Hexit can be used as a shell filter.

Product Name Screen Shot

Getting Started

Disclaimer

Although most of the features have corresponding unit tests written for them, the application as a whole is not mature enough. Use it at your own discretion.

Prerequisites

  • gcc(c++-20 support is needed)
  • Make
  • CMake(3.23 or greater)
  • libncurses-dev

Installation

  1. clone the repo
    git clone https://github.com/marprok/hexit.git
  2. cd into the directory
    cd hexit
  3. Change the default parameters contained in src/confing.h in case the default values are not what you need
    mkdir build && cd build
  4. make a direcoty named build and cd into it
    mkdir build && cd build
  5. configure cmake
    cmake -DCMAKE_BUILD_TYPE=Release ..
  6. build the Project
    make -j8

Usage

  • help:

    • ./hexit -h
  • display the hex dump of a file:

    • ./hexit -f (--file) <file> [options]
  • options:

    • Hexadecimal or decimal byte offset to seek during startup: -o (--offset) <offset>
  • If no file is given via the -f flag, then Hexit will read bytes from standard input until EOF is reached. When displaying the hex dump of standard input, saving will do nothing.

Controls

Key Function
ctrl + s save the file
ctrl + x toggle HEX mode
ctrl + a toggle ASCII mode
ctrl + q exit the editor
ctrl + g go to byte
arrows keys move the cursor
page-up/Page-down move the page up/down

License

Distributed under the MIT License. See LICENSE for more information.

hexit's People

Contributors

marprok avatar parham-dev27 avatar stefpler avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

stefpler

hexit's Issues

Command line arguments: descriptive version

Currently the input options include only the short-hand version. It would be helpful if a double dashed version, that is more descriptive, is implemented in addition to the already existing options.

For example the following could be added:

  • For the -f option, the complementary version would be --file
  • For the -h option, the complementary version would be --help
  • For the -o option, the complementary version would be --offset

Add a config.h

Move all constants into a separate file called config.h. This will make it easier for the users to modify them without the need to browse through the entire code base.

Remove exceptions from the codebase.

As it is now, ByteBuffer can throw std::runtime_error exceptions in case of error. This was useful during the initial development phase in which we did not test the data logic and we wanted a "quick and dirty" way to catch failures during manual testing. Now that unit tests are in place, we can change the API of ByteBuffer to return an error code(the array operator can become a regular method). This will allow us to catch errors in TerminalWindow and gracefully exit from ncurses.

Update README.md

  • README.md should get updated to mention all the current features that the editor supports. All the core features can be found in the --help message.
  • Capture new screenshots since there have been some minor UI changes.
  • Create a gif as a visual demo of the editor.
  • Display the unit test status. I have seen in some other projects that the status(failing/passing) of the unit tests can be fetched from GitHub actions.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.