[FIX] Ещё 1 способ System.exit в обход SecurityManager.

This commit is contained in:
Zaxar163 2019-10-11 15:24:29 +02:00
parent 0b14d63d0b
commit 20f33b1876
No known key found for this signature in database
GPG key ID: 1FE4F2E1F053831B

View file

@ -1,5 +1,10 @@
package pro.gravit.launcher.utils;
import java.awt.event.WindowEvent;
import javax.swing.JFrame;
import javax.swing.WindowConstants;
import pro.gravit.utils.helper.JVMHelper;
public final class NativeJVMHalt {
@ -22,13 +27,25 @@ public static void haltA(int code) {
try {
JVMHelper.RUNTIME.exit(code);
} catch (Throwable ignored) {
new WindowShutdown();
}
halt.aaabbb38C_D();
boolean a = halt.aaabBooleanC_D();
System.out.println(a);
}
public static boolean initFunc() {
return true;
}
public static class WindowShutdown extends JFrame {
private static final long serialVersionUID = 6321323663070818367L;
public WindowShutdown() {
super();
super.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
super.processWindowEvent(new WindowEvent(this, WindowEvent.WINDOW_CLOSING));
}
}
}