diff --git a/games/compaq/passwd/Makefile b/games/compaq/passwd/Makefile new file mode 100644 index 0000000..0fc063d --- /dev/null +++ b/games/compaq/passwd/Makefile @@ -0,0 +1,9 @@ +LDFLAGS = -static + +all: main + +main: CFLAGS = -Dpasswd='"$(shell cat key)"' + +clean: + rm -rf main + diff --git a/games/compaq/passwd/key b/games/compaq/passwd/key new file mode 100644 index 0000000..ad21564 --- /dev/null +++ b/games/compaq/passwd/key @@ -0,0 +1 @@ +Gawain Ballard Tunisia diff --git a/games/compaq/passwd/main.c b/games/compaq/passwd/main.c new file mode 100644 index 0000000..d1ec346 --- /dev/null +++ b/games/compaq/passwd/main.c @@ -0,0 +1,28 @@ +#include +#include + +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; +} diff --git a/puzzles/compaq/300/a.out b/puzzles/compaq/200/a.out similarity index 63% rename from puzzles/compaq/300/a.out rename to puzzles/compaq/200/a.out index 2ede643..f0a7fce 100755 Binary files a/puzzles/compaq/300/a.out and b/puzzles/compaq/200/a.out differ diff --git a/puzzles/compaq/200/key b/puzzles/compaq/200/key index 89709ea..ad21564 100644 --- a/puzzles/compaq/200/key +++ b/puzzles/compaq/200/key @@ -1 +1 @@ -PC LOAD LETTER +Gawain Ballard Tunisia diff --git a/puzzles/compaq/200/dad.jpg b/puzzles/compaq/300/dad.jpg similarity index 100% rename from puzzles/compaq/200/dad.jpg rename to puzzles/compaq/300/dad.jpg diff --git a/puzzles/compaq/300/key b/puzzles/compaq/300/key index c4b3aba..89709ea 100644 --- a/puzzles/compaq/300/key +++ b/puzzles/compaq/300/key @@ -1 +1 @@ -lawful forths Amanda +PC LOAD LETTER diff --git a/puzzles/compaq/400/a.out b/puzzles/compaq/400/a.out index 027c81c..2ede643 100755 Binary files a/puzzles/compaq/400/a.out and b/puzzles/compaq/400/a.out differ diff --git a/puzzles/compaq/400/key b/puzzles/compaq/400/key index 576c70d..c4b3aba 100644 --- a/puzzles/compaq/400/key +++ b/puzzles/compaq/400/key @@ -1 +1 @@ -codger launched jet +lawful forths Amanda diff --git a/puzzles/compaq/500/a.out b/puzzles/compaq/500/a.out new file mode 100755 index 0000000..027c81c Binary files /dev/null and b/puzzles/compaq/500/a.out differ diff --git a/puzzles/compaq/500/key b/puzzles/compaq/500/key new file mode 100644 index 0000000..576c70d --- /dev/null +++ b/puzzles/compaq/500/key @@ -0,0 +1 @@ +codger launched jet