I am currently trying to make my Ruby script output the following:
“\x41” * 28 “\x42\x13\x40\x00”
My code is:
puts "\x41" * 28 "\x42\x13\x40\x00"
instead of outputting it as you might expect it outputs:
AAAAAAAAAAAAAAAAAAAAAAAAAAAAB‼@
I know that this is the “translated” values but how do I avoid this translation? I have been looking into .pack() but I could not figure it out.
Thanks in advance.
Dar56
How about
or
Case 1 works because
\\is an escape sequence meaning a\while case 2 works because the literals inside''only check for the\'and\\escape sequences.