include lab code
This commit is contained in:
parent
aa09157216
commit
7a13228c69
5 changed files with 146 additions and 0 deletions
13
Lab02/LabExploitation/bufferOverflowShell.c
Executable file
13
Lab02/LabExploitation/bufferOverflowShell.c
Executable file
|
@ -0,0 +1,13 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
int doSomething(char* input){
|
||||
char buf[512];
|
||||
strcpy(buf, input);
|
||||
printf("Copied the following input to the buffer:\n %s\n", buf);
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]){
|
||||
doSomething(argv[1]);
|
||||
return 0;
|
||||
}
|
Reference in a new issue