Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lucabarile/hexfileconverter

Allows you to convert a file of any type to hexadecimal format (and vice versa).
https://github.com/lucabarile/hexfileconverter

arb-rw binary-to-hexadecimal file-to-hex hex-file hex-file-converter hex-files hex-to-file hexadecimal hexadecimal-converter hexadecimal-file-converter hexadecimal-to-binary hexadecimal-to-text hexfileconverter text-to-hexadecimal zdi-can-16318

Last synced: 12 days ago
JSON representation

Allows you to convert a file of any type to hexadecimal format (and vice versa).

Awesome Lists containing this project

README

        

# HexFileConverter

Why HexFileConverter?


I needed to convert a hex file (saved in a particular format) in order to develop my ARB_RW exploit for ZDI-CAN-16318.

(The exploit is quite interesting; read my report if you have nothing better to do šŸ™„).

After developing the code to convert a hex file to its original format I thought Iā€™d also implement the code to perform the reverse conversion as well.

HexFileConverter was born putting everything together in one program.

What is it for?


Allows you to convert a file of any type to hexadecimal format (and vice versa).

Usage


First of all download here HexFileConverter.



To convert a file of any type (e.g. foo.txt) to hex format:

HexFileConverter.exe foo.txt

The foo.txt.hex file will be generated.



To convert a file from hex format (e.g. foo.txt.hex) to its original format (txt):

HexFileConverter.exe foo.txt.hex

The foo.txt file will be generated.



Note:

In this case the file you want to convert must be located in the same folder as HexFileConverter.exe

If not, you must specify the entire path of the file to convert (e.g. C:\...\Desktop\foo.txt).




Hex file format


To convert a hex file successfully, it must be formatted as follows:

- Each hexadecimal number must be separated by a space.

- There must be at most 16 hexadecimal numbers in a row.

- The letters of a hexadecimal number can be either uppercase or lowercase.

- After the last hexadecimal number there must be a newline.

- The newline characters must be \r\n

- The hexadecimal file name must be fileName.OriginalFileExtension.hex (e.g. foo.txt.hex).




If your hex file is not formatted as shown in the previous image, you have two choices:



  1. You have also the original file, so you can throw away your unformatted hex file and use HexFileConverter.exe to convert it to the correct hex format.


  2. You don't have the original file, so you must convert it manually (small file) to the correct hex format or by creating a tool that does it for you (large file (sad story šŸ˜„)).


Oh?! Is that a flying unicorn?! šŸ˜²


If you liked HexFileConverter, what do you think about buying me a unicorn? šŸ¦„

Here you can buy me a unicorn.