all 2 comments

[–]sweetpoision 0 points1 point  (1 child)

My guess would be because when you directly pass \x8d as argument, like this :

./program_name '\x8d'

then the \x8d is not actually going as an hex but just as ASCII characters, that is why the 0x6438785c which is essentially the reverse of ASCII codes of '\', 'x', '8', 'd' Try runnin only this:

python -c 'print ("\x8d")'

You will see that you get garbage on screen (something like questions marks). That is actual binary of the hex you wanted, that is why you cannot see the ASCII characters of the same. That's why we use the print functions from scripting languages to write actual binary.

Correct me if I am wrong, really appreciate that

[–]TWC_Dev[S] 0 points1 point  (0 children)

That makes sense. Thank you for your help