Terminal hex editor & binary analysis toolkit: 20 format parsers, wildcard search, entropy analysis, steganography detection, Base64/URL/Unicode/Hex codecs. Cross-platform (Windows/Linux), dual-target (Native + Wasm-GC).
Dependencies
# Clone and setup (auto-installs MoonBit, GCC, builds, tests)
git clone https://github.com/R00TK17/moonbit-HexEditor.git
cd moonbit-HexEditor
chmod +x setup.sh && ./setup.sh # Linux
# .\setup.ps1 # Windows
# CLI usage
moon run cmd/main -- struct file.bin
moon run cmd/main -- scan file.bin
moon run cmd/main -- entropy file.bin
# TUI mode
moon run cmd/main -- file.bin// Parse binary file structure
///|
let fields = @R00TK17/hex_editor.parse_structure(bytes)
// Scan for embedded file signatures
///|
let matches = @R00TK17/hex_editor.scan_signatures(bytes)
// Shannon entropy analysis (256-byte blocks)
///|
let blocks = @R00TK17/hex_editor.entropy_scan(bytes)
// Search with wildcards
///|
let result = @R00TK17/hex_editor.find_hex_pattern(bytes, "FF ?? ?? EE")
///|
let result = @R00TK17/hex_editor.find_text_pattern(bytes, "He*ld")
// Codecs
///|
let b64 = @R00TK17/hex_editor.base64_encode(bytes)
///|
let decoded = @R00TK17/hex_editor.base64_decode(b64)| Platform | Native | Wasm-GC |
|---|---|---|
| Windows | ✓ TUI + CLI | N/A |
| Linux | ✓ TUI + CLI | N/A |
| Browser | — | ✓ CLI only |
type HexBuffertype HexViewConfigfn extract_region(bytes : Bytes, start : Int, name : String, base_path : String) -> Stringfn format_ascii(byte : Byte) -> Charfn format_byte_hex(byte : Byte, uppercase? : Bool) -> Stringfn format_hex_dump(buffer : HexBuffer, start_offset? : Int, length? : Int, config? : HexViewConfig) -> Stringfn format_hex_row(data : FixedArray[Byte], start : Int, length : Int, base_offset : Int, config : HexViewConfig) -> Stringfn format_offset(offset : Int, width? : Int, uppercase? : Bool) -> Stringfn hex_decode(text : String) -> Bytes?fn hex_encode(data : Bytes) -> Stringfn parse_hex_string(hex_str : String) -> Bytes?fn to_hex_string(n : Int, width? : Int) -> Stringfn unicode_decode(text : String) -> Bytes?fn unicode_encode(data : Bytes) -> Stringfn url_decode(text : String) -> Bytes?fn url_encode(data : Bytes) -> StringTerminal hex editor & binary analysis toolkit: 20 format parsers, wildcard search, entropy analysis, steganography detection, Base64/URL/Unicode/Hex codecs. Cross-platform (Windows/Linux), dual-target (Native + Wasm-GC).
Dependencies