I want to send input to a process which includes unprintable characters like "\x90". I when I try to send it like this: p.sendline(p64(0x414190))
, my programm which prints it back, returns AA\x90
. It took the "\x90" as a string, not as a byte. Can someone help me how to send raw bytes?
My program (vulnerable to format string, I dont need to be told):
#include <stdio.h>
int main() {
char name[512];
char passwd[512];
printf("Enter your name: ");
fgets(name, sizeof(name), stdin);
printf(name);
printf("Enter your password: ");
fgets(passwd, sizeof(passwd), stdin);
printf(passwd);
exit(1);
}