I'm trying to "crack" a console program, forcing it to display something. The problem is I can't print a newline (\r\n
).
With a disassebler I found the place and edited the binary:
push 4ad0eb46 ; the string (let's pretend "Hi guys")
push 4ad0eb80 ; and the format ("%s")
call near ds:[<&msvcrt.printf>] ; call printf
jmp 4ad0eb4f ; skip data
; now here I coded the strings
mov ds:[4ad289ec],eax ; and here the program resumes
As I said, I can't print a newline. I tried encode "\r\n"
in the format string (so it becomes "%s\r\n"
, as I would do in C) and get printed "Hi guys\r\n"
, and encode it in the
string itself (making it "Hi guys\x13\x10"
) and get "Hi guys"
and two strange characters, probably the ASCII representation of 0x13 and 0x10.