huge commit
This commit is contained in:
14
2026/cscg/misc/CS_Sript_Time/readflag.c
Normal file
14
2026/cscg/misc/CS_Sript_Time/readflag.c
Normal file
@@ -0,0 +1,14 @@
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/sendfile.h>
|
||||
|
||||
void main() {
|
||||
struct stat buf;
|
||||
int fd = open("/flag", O_RDONLY);
|
||||
if (fd < 0) {
|
||||
return;
|
||||
}
|
||||
fstat(fd, &buf);
|
||||
sendfile(1, fd, 0, buf.st_size);
|
||||
}
|
||||
Reference in New Issue
Block a user