Skip to content

Instantly share code, notes, and snippets.

@zeldani
Last active July 9, 2017 19:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zeldani/53851ba98c1583efd78d85abb99deb97 to your computer and use it in GitHub Desktop.
Save zeldani/53851ba98c1583efd78d85abb99deb97 to your computer and use it in GitHub Desktop.
#include <string.h>
#include <stdio.h>
int login(char *password) {
int secret = 0;
char buffer[16];
strcpy(buffer, password);
if (secret == 0x231da6e1){
printf("Welcome! ;)\n");
secret = 1;
} else {
printf("Access Denied.\n");
}
}
int main(int argc, char *argv[]) {
if (argc > 1)
login(argv[1]);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment