New "dead simple password" puzzle.

This commit is contained in:
Neale Pickett 2009-09-03 12:07:10 -06:00
parent d574a11c3b
commit a6dcbdcdf9
11 changed files with 42 additions and 3 deletions

View File

@ -0,0 +1,9 @@
LDFLAGS = -static
all: main
main: CFLAGS = -Dpasswd='"$(shell cat key)"'
clean:
rm -rf main

1
games/compaq/passwd/key Normal file
View File

@ -0,0 +1 @@
Gawain Ballard Tunisia

View File

@ -0,0 +1,28 @@
#include <stdio.h>
#include <string.h>
int
main(int argc, char *argv[])
{
char reply[256];
printf("What is the password? ");
fflush(stdout);
if (fgets(reply, sizeof(reply), stdin)) {
char *p;
for (p = reply; *p; p += 1) {
if ('\n' == *p) {
*p = '\0';
break;
}
}
if (strcmp(reply, passwd)) {
printf("No it isn't!\n");
} else {
printf("Congratulations.\n");
}
}
return 0;
}

View File

@ -1 +1 @@
PC LOAD LETTER
Gawain Ballard Tunisia

View File

@ -1 +1 @@
lawful forths Amanda
PC LOAD LETTER

Binary file not shown.

View File

@ -1 +1 @@
codger launched jet
lawful forths Amanda

BIN
puzzles/compaq/500/a.out Executable file

Binary file not shown.

1
puzzles/compaq/500/key Normal file
View File

@ -0,0 +1 @@
codger launched jet