#include "stdio.h" exploitfunction() { printf("This line will be printed after successfully exploiting the bufferoverflow.\n"); system("pause"); ExitProcess(0); } normalfunction(char *myargument) { char buffer[10]; strcpy(buffer,myargument); } main(int argc, char *argv[]) { if(argc>1) { normalfunction(argv[1]); printf("\nThese lines get printed during normal execution with at least\ \n1 commandline argument.\ \nThe address of exploitfunction is 0x%.8X\n\n",&exploitfunction); } else printf("Please provide the program with at least 1 commandline argument.\n"); ExitProcess(0); }