]> git.siccegge.de Git - frida/frida.git/blob - samples/crypt/main.c
Fix width of basic blocks
[frida/frida.git] / samples / crypt / main.c
1 #define _GNU_SOURCE
2 #include <unistd.h>
3 #include <stdio.h>
4 #include <string.h>
5
6 int check(char * str) {
7 /* Ich bin der größte! */
8 static const char * correct = "TOgP5hrln1SAE";
9 printf("%s\n", crypt(str, "TOPSECRET"));
10 return ! strcmp(correct, crypt(str, "TOPSECRET"));
11 }
12
13 int main() {
14 char password[255];
15 printf("Password: ");
16 scanf("%s", password);
17 if (check(password))
18 printf("Success!\n");
19 else
20 printf("Failure!\n");
21 }