Created
February 16, 2021 20:55
-
-
Save adililhan/9d88bf9d79a6a9fe0c5fb164348d5a0d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <linux/seccomp.h> | |
#include <sys/prctl.h> | |
void main() { | |
FILE *filePoint; | |
filePoint = fopen("/tmp/test.txt", "a"); | |
if(filePoint == NULL) { | |
puts("File can not be opened"); | |
exit(1); | |
} | |
fputs("qwe\n", filePoint); | |
prctl(PR_SET_SECCOMP, SECCOMP_MODE_STRICT); | |
fputs("xyz", filePoint); | |
fclose(filePoint); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment