PDA

View Full Version : Question :D


Reiko
November 12th, 2006, 09:05 PM
How can i open in Ubuntu files to view their hexadecimal form.

Christmas
November 12th, 2006, 09:08 PM
I do not know.

Reiko
November 12th, 2006, 09:09 PM
funny :))

Reiko
November 12th, 2006, 09:12 PM
bine mai Danutz

oxEz
November 12th, 2006, 09:14 PM
How can i open in Ubuntu files to view their hexadecimal form.

In console you can do: xxd (yourfilehere)

Example: xxd data.dat

If you want to echo the output in another file, just do:

xxd data.dat >> someotherfile

Hope this helps.

Reiko
November 12th, 2006, 09:18 PM
YEY THANK YOU oxEz

Reiko
November 12th, 2006, 09:32 PM
Now the problem is : How can I modify that object file, in his hexadecimal form. xxd just prints his hexadecimal. So if i make a C "hello world" program and "$ xxd "the compiled file" > executeMe" . I can't run executeMe (with no errors) cuz is a ASCII file. So I want that file to be still binary. And i want to edit it in that form :D thx

DoctorMO
November 12th, 2006, 10:32 PM
You could always write a perl program to insert the correct bytes at given locations.

once you have your mod use patch --binary to store it.

IYY
November 12th, 2006, 11:27 PM
hexedit is the program you're looking for.

pmj
November 13th, 2006, 02:08 AM
Try ghex.

Reiko
November 13th, 2006, 07:06 AM
thank you