blob: bbad3aed89ecb8740d64b21fc5715b65f7857b48 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
int main(int argc, char** argv) {
char *buf;
if (argc > 1) {
if (strcmp(argv[1], "LIBTOKENCAP") == 0)
printf("your string was libtokencap\n");
else if (strcmp(argv[1], "BUGMENOT") == 0)
printf("your string was bugmenot\n");
else if (strcmp(argv[1], "BUFFEROVERFLOW") == 0) {
buf = malloc(16);
strcpy(buf, "TEST");
strcat(buf, argv[1]);
printf("This will only crash with libdislocator: %s\n", buf);
return 0;
} else
printf("I do not know your string\n");
}
return 0;
}
|