[BUGFIX] Added redirect for issue #161

For `exec(Ljava/lang/Runtime;[Ljava/lang/String;)Ljava/lang/Process;`
This commit is contained in:
JKetelaar
2017-02-03 00:11:21 +01:00
parent 25d46acb16
commit d6f45ed9cb
@@ -22,6 +22,11 @@ public class RuntimeRedirect {
return (long) 1024; return (long) 1024;
} }
public static Process exec(Runtime r, String[] s) {
System.out.println("Blocked attempted command: " + s);
throw RedirectClassAdapter.createSecurityException();
}
public static Process exec(Runtime r, String s) { public static Process exec(Runtime r, String s) {
if (s.contains("ping")) { if (s.contains("ping")) {
System.out.println("Faked attempted command: " + s); System.out.println("Faked attempted command: " + s);