Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- void nullkey(void)
- {
- printf("%sType: ./CrackMe <password>%s\n");
- exit(1);
- }
- void youwin(void)
- {
- printf("%sYou win!%s\n");
- exit(1);
- }
- int main(int argc, char *argv[])
- {
- if (argv[1] == NULL) nullkey();
- char keytrue[] = "tfoib";
- char *key = argv[1];
- char *keystorage;
- int i;
- for (i=0; i<strlen(keytrue); i++) keytrue[i]--;
- keystorage = keytrue;
- if (strcmp(keystorage,key) == 0 ) { youwin(); } else { printf("%sChave invalida!\n%s"); }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement