Jun 17, 2010 at 8:11 PM
Join Date: Jan 28, 2010
Location: Internet
Posts: 1369
Age: 34
Pronouns: he/him
Well, today I made my own hex editor.
The editor is a small little python script file. It was actually quite easy to make, but it's also kind of primitive at this stage, since everything is done through command line. You can still do the basics, such as reading/writing hex values for any file, as well as reading/writing ascii characters if you need to do that.
=== Some Commands ===
open X - Opens the file with filename X for editing.
name - Shows the filename of the file that is currently opened.
offset X - Sets the starting offset to hexadecimal number X.
decoffset X - Sets the starting offset to decimal number X.
readhex - Displays a block of hex codes, which start at the offset specified by the offset commands.
writehex [hex string] - Writes a string of hex codes directly into the file starting at the offset specified by the offset commands. (example: writehex 4A 6B 32 FF 00 AC 5B 5C)
readascii - Shows a block of ascii characters from the file, starting at the offset specified in the offset commands.
writeascii [ASCII text] - Converts a block of ASCII characters into their respective hex codes, then writes those hex codes directly into the file starting at the offset specified by the offset commands. (example: writeascii A125fe89305euqn25m3)
readsize X - Changes the maximum number of ASCII characters displayed by the command readascii to X.
readlineshex X - Changes the maximum number of hex code lines displayed by the command readhex to X.
showvars - Displays the numbers that are stored in the offset, readsize, and readlineshex variables.
exit - Closes the program.
========
Example hack:
Put Doukutsu.exe in the same folder as the program. Then use the commands:
open Doukutsu.exe
offset 83AF
writehex 57
offset 83ED
writehex 57
offset 8428
writehex 57
offset 8463
writehex 57
exit
This will cause the Nemesis bullets to produce hearts (yes, the healing kind) instead of smoke.
So, what was the point of all this?
Well, I can easily make this more Cavestory specific. For example, I could make a program that could
auto-install a certain type of ASM hack into a Cavestory executable, given the correct offsets and hex codes needed to do it.
Also, since this is a Hex editor in its early stages, writing a custom disassembler is not far off.
If you want to see it, it's available here. Please read the "User Guide.html" for extra information on the commands.
The editor is a small little python script file. It was actually quite easy to make, but it's also kind of primitive at this stage, since everything is done through command line. You can still do the basics, such as reading/writing hex values for any file, as well as reading/writing ascii characters if you need to do that.
=== Some Commands ===
open X - Opens the file with filename X for editing.
name - Shows the filename of the file that is currently opened.
offset X - Sets the starting offset to hexadecimal number X.
decoffset X - Sets the starting offset to decimal number X.
readhex - Displays a block of hex codes, which start at the offset specified by the offset commands.
writehex [hex string] - Writes a string of hex codes directly into the file starting at the offset specified by the offset commands. (example: writehex 4A 6B 32 FF 00 AC 5B 5C)
readascii - Shows a block of ascii characters from the file, starting at the offset specified in the offset commands.
writeascii [ASCII text] - Converts a block of ASCII characters into their respective hex codes, then writes those hex codes directly into the file starting at the offset specified by the offset commands. (example: writeascii A125fe89305euqn25m3)
readsize X - Changes the maximum number of ASCII characters displayed by the command readascii to X.
readlineshex X - Changes the maximum number of hex code lines displayed by the command readhex to X.
showvars - Displays the numbers that are stored in the offset, readsize, and readlineshex variables.
exit - Closes the program.
========
Example hack:
Put Doukutsu.exe in the same folder as the program. Then use the commands:
open Doukutsu.exe
offset 83AF
writehex 57
offset 83ED
writehex 57
offset 8428
writehex 57
offset 8463
writehex 57
exit
This will cause the Nemesis bullets to produce hearts (yes, the healing kind) instead of smoke.
So, what was the point of all this?
Well, I can easily make this more Cavestory specific. For example, I could make a program that could
auto-install a certain type of ASM hack into a Cavestory executable, given the correct offsets and hex codes needed to do it.
Also, since this is a Hex editor in its early stages, writing a custom disassembler is not far off.
If you want to see it, it's available here. Please read the "User Guide.html" for extra information on the commands.