This is a simple hex editor with a console interface. It allows you to view and edit the hexadecimal representation of a file.
To run the program, enter the following command:
python hex_editor.py [filename]
Please replace [filename]
with the absolute or relative path to the file you want to edit.
-
Multiple Cursors: The Hex Editor supports multiple cursors for editing convenience. You can add upper and lower cursors using the
Ctrl + Up
orCtrl + Down
combination. These cursors can be moved independently to edit different parts of the file simultaneously. -
Edit Restrictions: The use of the
delete
key and thepaste
functionality is limited in the Hex Editor using multiple cursors. This is done to prevent accidental deletion or modification of data. In the case of attempting to delete a character from the beginning of a large file, a dialog message is displayed, requiring user confirmation.
The following key combinations can be used while running the Hex Editor:
Ctrl + Z
: Undo the last action.Ctrl + Y
: Redo the last undone action.Ctrl + P
: Paste a string from the clipboard.Ctrl + Up
: Add an upper cursor.Ctrl + Down
: Add a lower cursor.
To run tests, enter the following command
WARNING. The test will generate a large file size to test throwing a dialog message to the user when attempting to delete a character. Sized ~1.5 GB.
python -m pytest