-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathThreadbox.java
More file actions
39 lines (33 loc) · 975 Bytes
/
Threadbox.java
File metadata and controls
39 lines (33 loc) · 975 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package threadbox;
import java.io.FileWriter;
import java.io.IOException;
public class Threadbox {
public static void sandbox_ps() {
try {
FileWriter myWriter = new FileWriter("/sys/kernel/security/funcsandbox/sandbox_ps");
myWriter.write(" ");
myWriter.close();
} catch (IOException e) {
e.printStackTrace();
}
}
public static void permissions(String promises, String debug, Boolean complain) {
try {
FileWriter p = new FileWriter("/sys/kernel/security/funcsandbox/promises");
FileWriter d = new FileWriter("/sys/kernel/security/funcsandbox/debug");
FileWriter c = new FileWriter("/sys/kernel/security/funcsandbox/learning_mode");
p.write(promises);
if(debug.length()!=0) {
d.write(debug);
}
if(complain==true) {
c.write(" ");
}
p.close();
d.close();
c.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}