QWXFB-2024/正式赛/Pwn/checkin_pwn/checkin_pwn.c

20 lines
411 B
C
Raw Normal View History

2024-09-16 11:35:04 +08:00
// gcc ./checkin_pwn.c -o ./pwn
#include <stdio.h>
#include <stdlib.h>
void init() {
setvbuf(stdin, 0LL, 2, 0LL);
setvbuf(stdout, 0LL, 2, 0LL);
setvbuf(stderr, 0LL, 2, 0LL);
}
int main () {
init();
long long key = 0xf61df61df61df61d;
long long input;
puts("Please input the key to login:");
read(0, (char *) &input, 8);
if(input == key) {
system("/bin/sh");
}
}