Skip to content

Instantly share code, notes, and snippets.

@nuit
Created September 12, 2014 04:55
Show Gist options
  • Save nuit/1de398efcb92c217a838 to your computer and use it in GitHub Desktop.
Save nuit/1de398efcb92c217a838 to your computer and use it in GitHub Desktop.
wargame.c
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int
main(int argc, char **argv)
{
char password[] = "zeldani";
if(argc < 2)
{
printf("Uso: %s <senha>n", argv[0]);
exit(1);
}
if(strncmp(argv[1], password, strlen(password)))
{
printf("FALHOU\n");
exit(1);
} else {
printf("GANHOU\n");
return(0);
}
return(0); // never reached :)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment