I am trying to write an hex string into a file using python 2.7 so that when opened with HxD I can retrieve the same hex values. The following code works fine on multiple input strings, but when the string contains '0A' the writing is not working correctly.
import binascii
s = "0ABD"
f = open("output","w")
f.write(binascii.a2b_hex(s))
f.close()
After that open the file using HxD or online https://hexed.it/, you will find that '0D' is added before each '0A'. I am reading these generated files using vb.net and still I am getting more bytes than expected.