Skip to content

Commit

Permalink
example crackme
Browse files Browse the repository at this point in the history
  • Loading branch information
qrxnz committed Nov 14, 2024
1 parent 868a3b1 commit 8afe83d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
Binary file added example_crackme/test_crackme
Binary file not shown.
21 changes: 21 additions & 0 deletions example_crackme/test_crackme.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#include <stdio.h>
#include <string.h>

#define PASSWORD "arisfertidis"

int main(int argc, char *argv[]) {
// Check if the user provided a password as an argument
if (argc < 2) {
printf("Usage: %s <password>\n", argv[0]);
return 1;
}

// Compare the provided password with the correct one
if (strcmp(argv[1], PASSWORD) == 0) {
printf("Password correct! Access granted.\n");
} else {
printf("Incorrect password! Access denied.\n");
}

return 0;
}

0 comments on commit 8afe83d

Please sign in to comment.