Logo HexPatch

Crate Badge CI Badge Deps.rs Badge License Badge GitHub IO Badge

HexPatch is a binary patcher and editor with terminal user interface (TUI), it's capable of disassembling instructions and assembling patches. It supports a variety of architectures and file formats. Also, it can edit remote files via SSH.

Take a look at GitHub Pages for more information and some screenshots.

Installation

Using cargo

If you already have the requirements installed, you only need to run the following command:

cargo install hex-patch

Requirements

Using your package manager

NetBSD

On NetBSD, a package is available from the official repositories. To install it, simply run:

pkgin install hexpatch
Build from source on NetBSD

If you prefer to build from source:

cd /usr/pkgsrc/devel/hexpatch
make install

Arch Linux

On Arch Linux, a package is available from the official repositories:

pacman -S hexpatch

Building from source with cargo

Clone the repository

git clone https://github.com/Etto48/HexPatch.git
cd HexPatch

Build and install

cargo install --path .

SSH connection

In order to connect via SSH, you can use the following command:

hex-patch --ssh <user>@<host>[:<port>] [--password <password>] [additional arguments]

If you don't specify a password, the client must be set up with keypair authentication and you must have a key in your ~/.ssh directory.

Keys are searched in the following order:

The first key found will be used.

Supported file formats and architectures

The following file formats are supported by default:

Other file formats can be added with plugins.

The following architectures are supported:

Settings

Read the settings documentation for more information.

Plugins

HexPatch supports plugins written in Lua. Plugins must be placed in the plugins directory in hex-patch's configuration directory. A different plugins directory can be specified with the --plugins flag.

You can find more information about the Plugin Lua API here.

Known issues

Special thanks

Thanks to Lorenzo Colombini for the instruction highlighting.