16 lines
310 B
C
16 lines
310 B
C
|
// gcc ./newbie_fmt.c -o ./pwn
|
||
|
#include <stdio.h>
|
||
|
#include <stdlib.h>
|
||
|
#include <string.h>
|
||
|
#include <fcntl.h>
|
||
|
#include <unistd.h>
|
||
|
|
||
|
int main () {
|
||
|
char dummpy[0x200];
|
||
|
char buf[8];
|
||
|
int fd = open("flag", O_RDONLY);
|
||
|
read(fd, dummpy+0x1a0, 0x30);
|
||
|
close(fd);
|
||
|
read(0, buf, 8);
|
||
|
printf(buf);
|
||
|
}
|