Cleanest/best practical approach?

Help on how to use HxD.
Post Reply
HGE
Posts: 2
Joined: 05 Oct 2021 19:36

Cleanest/best practical approach?

Post by HGE »

I have come across HxD and have further questions as I attempt Hex editing for the fist time.
For many, I'm sure this is routine and there are standard ways of doing it.

I will need to routinely edit many bytes of a Hex file that resides on an EEPROM chip. Manual editing this directly is easy but excessively laborious do to the file size. I prefer using Python. When finished with the editing, the format must be the same, if it is going to import (edited file written to EEPROM) properly. I need to know the cleanest way of going full circle - Exporting the file, editing, and importing it. Actually, I have a method for writing the file to EEPROM, I really just need to ensure the formatting is not corrupted in the exporting and editing process.

I find hints of potential options in the FILE EXPORT and FILE IMPORT menu of the HxD software. Python is not listed in either of the menus. You may tell me that Python is "C" based. Would selection of "C" in the exporting menu be the cleanest/best practical path forward?
Maël
Site Admin
Posts: 1370
Joined: 12 Mar 2005 14:15

Re: Cleanest/best practical approach?

Post by Maël »

Python is available in a development version of HxD (not final/fully tested yet) under the menus Edit|Copy as or File|Export as.

You can find the current (not final/fully tested yet) HxD.exe as part of the translation package:
https://mh-nexus.de/downloads/BabelfishForHxD.zip

Just extract the folder and run it from there (it will run as portable).
Maël
Site Admin
Posts: 1370
Joined: 12 Mar 2005 14:15

Re: Cleanest/best practical approach?

Post by Maël »

Regarding the rest of your question: there is no import functionality for source code, since there are many possible syntactical variations.

But Python should be able to generate binary files just fine, and Python can also parse Python code as well, so Python itself is probably a good option to solve your issue.
HGE
Posts: 2
Joined: 05 Oct 2021 19:36

Re: Cleanest/best practical approach?

Post by HGE »

Many Thanks! I give it a try.
Post Reply