mirror of https://github.com/dirtbags/moth.git
Add a more different memfrob puzzle
This commit is contained in:
parent
39d9e069e4
commit
d574a11c3b
|
@ -0,0 +1,5 @@
|
|||
LDFLAGS = -static
|
||||
|
||||
main:
|
||||
|
||||
|
|
@ -0,0 +1 @@
|
|||
codger launched jet
|
|
@ -0,0 +1,37 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
char ps1[] = "What is the password? ";
|
||||
char passwd[] = {0x34, 0x07, 0x05, 0x13,
|
||||
0x45, 0x1b, 0x53, 0x4c,
|
||||
0x15, 0x1d, 0x0b, 0x43,
|
||||
0x18, 0x04, 0x17, 0x53,
|
||||
0x1d, 0x0a, 0x06, 0x00};
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
char reply[256];
|
||||
|
||||
printf(ps1);
|
||||
fflush(stdout);
|
||||
if (fgets(reply, sizeof(reply), stdin)) {
|
||||
int i;
|
||||
|
||||
for (i = 0; reply[i]; i += 1) {
|
||||
if ('\n' == reply[i]) {
|
||||
reply[i] = '\0';
|
||||
break;
|
||||
}
|
||||
reply[i] ^= ps1[i % sizeof(ps1)];
|
||||
//printf("0x%02x, ", reply[i]);
|
||||
}
|
||||
if (strcmp(reply, passwd)) {
|
||||
printf("No it isn't!\n");
|
||||
} else {
|
||||
printf("Congratulations.\n");
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
lawful forths Amanda
|
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
codger launched jet
|
Loading…
Reference in New Issue