I'm trying to exploit a buffer overflow vulnerability in a C program, I have control of EIP but I don't know how to send the payload to the program. Here's the source:
#include <cstdio>
int main() {
char name[32];
printf("Enter your name and press ENTER\n");
scanf("%s", name);
printf("Hi, %s!\n", name);
return 0;
}
How can I insert the payload (BUFF + EIP + NOPs + Shellcode) in the name variable? In Linux its some like $(python -c 'print "BUFF + EIP + NOPs + Shellcode') how can I do this in windows? If possible with a python script.
Thanks.