MCPcopy Create free account
hub / github.com/bsauce/kernel-exploit-factory / write_file

Function write_file

CVE-2022-34918/exploit/exploit.c:40–44  ·  view source on GitHub ↗

write_file(): Write a string into a file

Source from the content-addressed store, hash-verified

38
39// write_file(): Write a string into a file
40void write_file(const char *filename, char *text) {
41 int fd = open(filename, O_RDWR);
42 write(fd, text, strlen(text));
43 close(fd);
44}
45
46// new_ns(): Change the current namespace to access to netfilter and to be able to write security xattr in a tmpfs
47void new_ns(void) {

Callers 1

new_nsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected