I’m new to C# binary and I need to know something…
-
Read the exe
-
Translate it to string (eg. 10001011)
-
Modify the string
-
write it back to a new exe
I heard something about string.Join to convert binary to the string, but I couldn’t understand very well.
To get the exe to a binary string, first read it into a byte array:
Then:
will get it to a binary string.
To turn your binary string back into a byte array:
Finally, write the file: