downloaded challenges
didnt know they would publish everything
This commit is contained in:
32
DownUnderCTF 2023/beginner/confusing/confusing.c
Normal file
32
DownUnderCTF 2023/beginner/confusing/confusing.c
Normal file
@@ -0,0 +1,32 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
void init() {
|
||||
setvbuf(stdout, 0, 2, 0);
|
||||
setvbuf(stdin, 0, 2, 0);
|
||||
}
|
||||
|
||||
int main() {
|
||||
init();
|
||||
|
||||
short d;
|
||||
double f;
|
||||
char s[4];
|
||||
int z;
|
||||
|
||||
printf("Give me d: ");
|
||||
scanf("%lf", &d);
|
||||
|
||||
printf("Give me s: ");
|
||||
scanf("%d", &s);
|
||||
|
||||
printf("Give me f: ");
|
||||
scanf("%8s", &f);
|
||||
|
||||
if(z == -1 && d == 13337 && f == 1.6180339887 && strncmp(s, "FLAG", 4) == 0) {
|
||||
system("/bin/sh");
|
||||
} else {
|
||||
puts("Still confused?");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user