Systemsicherheit/Assignment 6 - Software Security - Teil 2/ret2libc/ret2libc.c

24 lines
323 B
C
Raw Permalink Normal View History

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int vuln(char* input) {
char buff[100];
strcpy(buff, input);
return 0;
}
int main(int argc, char *argv[])
{
if(argc < 2)
{
printf("Syntax: %s <input string>\n", argv[0]);
exit (0);
}
vuln(argv[1]);
return 0;
}