mirror of
https://github.com/TheOfficialFloW/bd-jb
synced 2025-02-16 07:10:15 -05:00
Move security manager checks.
This commit is contained in:
parent
fab3db6d51
commit
1d8fab5dd3
@ -29,8 +29,7 @@ class Exploit implements Runnable {
|
|||||||
|
|
||||||
for (int i = 0; i < exploits.length; i++) {
|
for (int i = 0; i < exploits.length; i++) {
|
||||||
try {
|
try {
|
||||||
exploits[i].trigger();
|
if (exploits[i].trigger()) {
|
||||||
if (System.getSecurityManager() == null) {
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -57,6 +57,6 @@ public class ExploitServiceProxyImpl implements ExploitSandboxInterface {
|
|||||||
Class payloadClass = urlClassLoader.loadClass(PAYLOAD_CLASS_NAME);
|
Class payloadClass = urlClassLoader.loadClass(PAYLOAD_CLASS_NAME);
|
||||||
payloadClass.newInstance();
|
payloadClass.newInstance();
|
||||||
|
|
||||||
return true;
|
return System.getSecurityManager() == null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@ public class ExploitUserPrefsImpl implements ExploitSandboxInterface {
|
|||||||
// Instantiate the payload class.
|
// Instantiate the payload class.
|
||||||
PayloadClassLoader.getInstance().newPayload();
|
PayloadClassLoader.getInstance().newPayload();
|
||||||
|
|
||||||
return true;
|
return System.getSecurityManager() == null;
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
// Restore userprefs file.
|
// Restore userprefs file.
|
||||||
|
Loading…
Reference in New Issue
Block a user