Hex viewer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.adoc 2.7KB

2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
1 year ago
2 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. hex
  2. ===
  3. 'hex' is yet another hex viewer. It automatically interprets fields within
  4. files using a set of Lua scripts, colorizing them and showing descriptions on
  5. the side.
  6. At the moment there aren't that many features and we only have a few decoders.
  7. image::hex.png[align="center"]
  8. Packages
  9. --------
  10. Regular releases are sporadic. git master should be stable enough. You can get
  11. a package with the latest development version from Archlinux's AUR.
  12. Building and Running
  13. --------------------
  14. Build dependencies: CMake, pkg-config, help2man, liberty (included),
  15. termo (included) +
  16. Runtime dependencies: ncursesw, libunistring, Lua >= 5.3 (for highlighting)
  17. $ git clone --recursive https://git.janouch.name/p/hex.git
  18. $ mkdir hex/build
  19. $ cd hex/build
  20. $ cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug
  21. $ make
  22. To install the application, you can do either the usual:
  23. # make install
  24. Or you can try telling CMake to make a package for you. For Debian it is:
  25. $ cpack -G DEB
  26. # dpkg -i hex-*.deb
  27. Note that for versions of CMake before 2.8.9, you need to prefix `cpack` with
  28. `fakeroot` or file ownership will end up wrong.
  29. Having the program installed, optionally create a configuration file and run it
  30. on a file of your choice.
  31. Configuration
  32. -------------
  33. Create _~/.config/hex/hex.conf_ with contents like the following:
  34. ....
  35. colors = {
  36. footer = ""
  37. footer_hl = "bold"
  38. bar = "reverse"
  39. bar_hl = "reverse bold"
  40. even = ""
  41. odd = ""
  42. selection = "reverse"
  43. }
  44. ....
  45. Terminal caveats
  46. ----------------
  47. Terminals are somewhat tricky to get consistent results on, so be aware of the
  48. following:
  49. - Xterm needs `XTerm*metaSendsEscape: true` for the default bindings to work
  50. - urxvt's 'vtwheel' plugin sabotages scrolling
  51. Performance
  52. -----------
  53. While the Lua API has been made considerably easy to write new decoders with,
  54. the design is far from efficient as we make tons of new formatted strings.
  55. Since we need Lua 5.3 features (64-bit integers), LuaJIT can't help us here.
  56. Similar software
  57. ----------------
  58. * https://codisec.com/veles/ can also highlight files but it's not scriptable
  59. * https://bitbucket.org/haypo/hachoir/wiki/Home seems to be strictly
  60. hierarchical, which may not work for file formats like ELF
  61. Contributing and Support
  62. ------------------------
  63. Use https://git.janouch.name/p/hex to report any bugs, request features,
  64. or submit pull requests. `git send-email` is tolerated. If you want to discuss
  65. the project, feel free to join me at ircs://irc.janouch.name, channel #dev.
  66. Bitcoin donations are accepted at: 12r5uEWEgcHC46xd64tt3hHt9EUvYYDHe9
  67. License
  68. -------
  69. This software is released under the terms of the 0BSD license, the text of which
  70. is included within the package along with the list of authors.