public static void main(String[] args) throws Exception { // Applet a = getApplet(29); // Thread.sleep(5000); // ClassLoader d = a.getComponentAt(1, 1).getClass().getClassLoader(); ToMessup = new LinkedList(); BCClass StringWrapper = null; Set> clases = unpackRunescape(getCacheDir()) .entrySet(); String mousex = null; String mousey = null; long currenttime = System.currentTimeMillis(); for (Entry s : clases) { BCClass c = s.getValue(); if (c.getDeclaredInterfaceNames().length > 0) { if (c.getDeclaredMethod("toString") != null) { StringWrapper = c; } BCMethod m = c.getDeclaredMethod("mouseMoved"); if (m != null) { Instruction[] instructions = m.getCode(false) .getInstructions(); for (int j = 0; j < instructions.length; j++) { Instruction i = instructions[j]; if (i instanceof PutFieldInstruction) { PutFieldInstruction put = (PutFieldInstruction) i; Instruction previous = instructions[j - 1]; if (previous instanceof MethodInstruction) { MethodInstruction call = (MethodInstruction) previous; if (call.getMethodName().equals("getX")) { mousex = put.getFieldDeclarerName() + "." + put.getFieldName(); } if (call.getMethodName().equals("getY")) { mousey = put.getFieldDeclarerName() + "." + put.getFieldName(); } } } } } } if (c.getName().equalsIgnoreCase("client")) { int index = 0; Instruction[] instructions = null; // these are reserved for when we find it for (BCMethod m : c.getDeclaredMethods()) { instructions = m.getCode(false).getInstructions(); for (int j = 0; j < instructions.length; j++) { Instruction i = instructions[j]; if (i instanceof ConstantInstruction) { ConstantInstruction ldc = (ConstantInstruction) i; if (ldc.getType() == String.class && ldc.getStringValue() .equals("js5connect")) { index = j; break; } } } if (index != 0) break; } for (int i = index; i < instructions.length; i++) { if (instructions[i] instanceof PutFieldInstruction) { index = i; break; } } PutFieldInstruction loginIndexCaller = (PutFieldInstruction) instructions[index]; System.out.println("the login index is " + loginIndexCaller.getFieldDeclarerName() + "." + loginIndexCaller.getFieldName()); } } BCField bytes = null; for (BCField f : StringWrapper.getDeclaredFields()) { if (!f.isStatic()) if (f.getType().equals(byte[].class)) { System.out.println("Found the bytes of stringWrapper " + StringWrapper.getName() + "." + f.getName()); bytes = f; } } System.out.println("mouse x and y are " + mousex + " " + mousey); System.out .println("took " + (System.currentTimeMillis() - currenttime)); }