V
vibgyorbits
I'm writing a tool to do some binary file comparisons.
I'm opening the file using
fd=open(filename,'rb')
# Need to seek to 0x80 (hex 80th) location
fd.seek(0x80)
# Need to read just 8 bytes and get the result back in hex format.
x=fd.read(8)
print x
This prints out garbage. I would like to know what am i missing here.
Basically, I am trying to read
8 bytes from location 0x80 from a binary file called "filename"
Any tips/inputs are welcome.
thanks!
I'm opening the file using
fd=open(filename,'rb')
# Need to seek to 0x80 (hex 80th) location
fd.seek(0x80)
# Need to read just 8 bytes and get the result back in hex format.
x=fd.read(8)
print x
This prints out garbage. I would like to know what am i missing here.
Basically, I am trying to read
8 bytes from location 0x80 from a binary file called "filename"
Any tips/inputs are welcome.
thanks!