mirror of https://github.com/TheOfficialFloW/bd-jb
Use list of exploit classes and instantiate them later.
This commit is contained in:
parent
036746d7da
commit
8f0fc0d578
|
@ -20,19 +20,23 @@ import java.net.ServerSocket;
|
|||
import java.net.Socket;
|
||||
|
||||
class Exploit implements Runnable {
|
||||
private static final Class[] sandboxExploits =
|
||||
new Class[] {
|
||||
ExploitDefaultImpl.class, ExploitUserPrefsImpl.class, ExploitServiceProxyImpl.class
|
||||
};
|
||||
|
||||
private static final Class[] kernelExploits = new Class[] {};
|
||||
|
||||
static void init() {
|
||||
Screen.println("[+] bd-jb by theflow");
|
||||
|
||||
Screen.println("[*] Escaping Java Sandbox...");
|
||||
|
||||
ExploitSandboxInterface[] exploits =
|
||||
new ExploitSandboxInterface[] {
|
||||
new ExploitDefaultImpl(), new ExploitUserPrefsImpl(), new ExploitServiceProxyImpl()
|
||||
};
|
||||
|
||||
for (int i = 0; i < exploits.length; i++) {
|
||||
for (int i = 0; i < sandboxExploits.length; i++) {
|
||||
try {
|
||||
if (exploits[i].trigger()) {
|
||||
ExploitSandboxInterface exploit =
|
||||
(ExploitSandboxInterface) sandboxExploits[i].newInstance();
|
||||
if (exploit.trigger()) {
|
||||
break;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
@ -56,11 +60,10 @@ class Exploit implements Runnable {
|
|||
|
||||
Screen.println("[*] Exploiting kernel...");
|
||||
|
||||
ExploitKernelInterface[] exploits = new ExploitKernelInterface[] {};
|
||||
|
||||
for (int i = 0; i < exploits.length; i++) {
|
||||
for (int i = 0; i < kernelExploits.length; i++) {
|
||||
try {
|
||||
if (exploits[i].trigger()) {
|
||||
ExploitKernelInterface exploit = (ExploitKernelInterface) kernelExploits[i].newInstance();
|
||||
if (exploit.trigger()) {
|
||||
break;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
|
Loading…
Reference in New Issue