I want to overwrite a single byte in a binary file at a specific
f = open(program, "wb")
f.seek(offset, 0) # absolute
mfo@mfo-Ubuntu:~/llvm-ir-obfuscation/checker$ objdump -dF fac_c
objdump: fac_c: File format not recognized
You opened your file with
w mode, which truncates the file when opening it. So your final file will only consist of the one byte you wrote.
Just open it in update mode:
f = open(program, "r+b")
and it should be fine.