ImHex is a relatively new Hex editor, released in December of 2020, for Reverse Engineers, Programmers and people that value their eye sight when working at 3 AM.
- GitHub — WerWolv/ImHex
https://github.com/WerWolv/ImHex
We will install ImHex on Ubuntu 20.04 with some modifications from the official procedure.
Note that the make command took up about 6GB of memory, so it is recommended to prepare an environment with 8GB of memory. On a 4GB memory environment, my computer froze during make :D
Installing ImHex
# if necessary.
sudo apt update && sudo apt upgradegit clone https://github.com/WerWolv/ImHex.git
cd ImHex# all-in-one dependency installation scripts for Ubuntu.
sudo ./dist/get_deps_debian.shmkdir build
cd build# Patch to fix cmake file to avoid errors in certain environments.
cat <<EOL >> cmakepatch.txt
55,56c55,61
< list(REMOVE_AT PYTHON_VERSION_MAJOR_MINOR 2)
< list(JOIN PYTHON_VERSION_MAJOR_MINOR "." PYTHON_VERSION_MAJOR_MINOR)
---
> list(LENGTH PYTHON_VERSION_MAJOR_MINOR PYTHON_VERSION_LENGHT)
> if(PYTHON_VERSION_LENGHT GREATER 2)
> list(REMOVE_AT PYTHON_VERSION_MAJOR_MINOR 2)
> list(JOIN PYTHON_VERSION_MAJOR_MINOR "." PYTHON_VERSION_MAJOR_MINOR)
> else()
> set(PYTHON_VERSION_MAJOR_MINOR \${Python_VERSION})
> endif()
EOL# Apply patch to cmake file.
patch ../cmake/build_helpers.cmake cmakepatch.txt# The official procedure gave an error, so an alternative command.
CC=gcc-10 CXX=g++-10 cmake ..# == Caution =============================================
# 8GB memory or more is recommended.
# On a 4GB memory environment, my computer froze during make.
#=========================================================
make -j
After successfully completing make, prepare the necessary files as described in the official website.
cp -r ../python_libs/lib ./git clone https://github.com/WerWolv/ImHex-Patterns.git
mv ImHex-Patterns/includes ./
mv ImHex-Patterns/magic ./
mv ImHex-Patterns/patterns ./
Now we just need to execute it!
./imhex
If all goes well, an empty ImHex will be started.
ImHex View Settings
You can add the views you need from the menu.
Views can be rearranged by dragging and dropping them.
You can also load a pattern file from “Load pattern…” under File in the menu. By loading a pattern file, the display will be colored according to the format of the file type. I could not find any way to automatically apply the pattern to the file type.
I set up the interface as shown in the image below.
Conclusion
First of all, it looks beautiful. As it is a tool that has just started its development, I got the impression that its operation is a bit unstable and it will be a while before I can use it on a daily basis, but it seems to have various functions, so I am looking forward to its future.
References
ImHex
- GitHub — WerWolv/ImHex: A Hex Editor for Reverse Engineers, Programmers and people that value their eye sight when working at 3 AM.
https://github.com/WerWolv/ImHex - GitHub — WerWolv/ImHex-Patterns: Hex patterns, include patterns and magic files for the use with the ImHex Hex Editor
https://github.com/WerWolv/ImHex-Patterns - Pattern Language Guide · WerWolv/ImHex Wiki · GitHub
https://github.com/WerWolv/ImHex/wiki/Pattern-Language-Guide
cmake command
- cmake-commands(7) — CMake 3.19.3 Documentation
https://cmake.org/cmake/help/v3.19/manual/cmake-commands.7.html
Troubleshooting
- Problem building on Ubuntu 20.04 · Issue #8 · WerWolv/ImHex · GitHub
https://github.com/WerWolv/ImHex/issues/8 - Failed to build on Ubuntu 20.04 · Issue #113 · WerWolv/ImHex · GitHub
https://github.com/WerWolv/ImHex/issues/113 - ImHex: A Hex Editor for Reverse Engineers, Programmers and people that value their eye sight when working at 3 AM : programming
https://www.reddit.com/r/programming/comments/k6jwpq/imhex_a_hex_editor_for_reverse_engineers/
Original Article
- ImHex:午前3時にがんばる人のためのバイナリエディタ — setodaNote
https://soji256.hatenablog.jp/entry/2021/01/25/070000
Update History
- 2021/01/28 New.