fileobj is a fresh Linux hex editor with a vi like interface and key bindings. It needs python 2.6 or above to run. The interface needs the ncurses library. The binary editing commands supported in fileobj are like vi. Besides the vi-like editing options, one of the key features of fileobj is the ability to load a user-specified region from a large file for editing.
Features
- insert, replace, delete data in hexadecimal or ascii
- cut and paste
- undo and redo
- visual select
- partial buffer loading
- multiple buffers support
- multiple windows support
- block device (raw disk) support
- mapping binary data to C struct
- open a file from and to an offset
- open virtual address space of a user process
Installation
To install on Ubuntu:
$ git clone https://github.com/kusumi/fileobj.git $ cd fileobj $ sudo python ./setup.py install --force --record ./install.out
fileobj is installed in /usr/local/bin/fileobj. If you face any issues, check install.out.
Usage
- List commands
$ fileobj --command
- Get help
$ fileobj --help
- Open files
$ fileobj file1 file2
- Open a file read-only
$ fileobj file1 -R
- Open a file from offset 1234
$ fileobj file1@1234
- Open a file at offset 1234 and read 1000 bytes
$ fileobj file1@1234:1000 OR read till 2234 (1000 bytes) $ fileobj file1@1234-2234
- Open a file and read first 1000 bytes
$ fileobj file1@:1000 OR $ fileobj file1@-1000
- Open virtual address space of a process (experimental at the time of writing)
$ pgrep -l a.out 10337 a.out $ objdump -s -j .rodata ./a.out ./a.out: file format elf64-x86-64 Contents of section .rodata: 4005c8 01000200 00000000 00000000 00000000 ................ 4005d8 41424344 45464748 494a4b4c 4d4e4f50 ABCDEFGHIJKLMNOP 4005e8 51525354 55565758 595a3031 32333435 QRSTUVWXYZ012345 4005f8 36373839 00 6789. $ fileobj pid10337@0x4005c8:0x35
On GitHub: fileobj