How michaelneu/pjl-honeypot works
PJL Honeypot is a standalone TCP printer-protocol simulator. A client connects to the listener, sends PJL commands or PCL data, and receives simulated printer responses; PCL jobs can be saved in a configured directory. The command dictionary supplies emulated responses, while a virtual filesystem supports file queries. The README documents PRET compatibility and logging configuration. The excerpts show the socket and command-handling pieces, but omit parts of the session loop and file-saving implementation, so those relationships are cited to the README.
Main entry points: jetdirect.py Session handler · send-file.py File sender
Components 10
Network Session
- TCP listener
jetdirect.py - PJL connection
jetdirect.py - Session handler
jetdirect.py
PJL Emulation
- Command parser
jetdirect.py - PJL responses
jetdirect.py
Files and Output
- Virtual filesystem
jetdirect.py - PCL output directory
- Log output
Other components
- PRET client
- File sender
send-file.py
Connections 11
- PRET client → TCP listener: connects
README.md - File sender → TCP listener: sends bytes
send-file.py - TCP listener → PJL connection: accepts connection
jetdirect.py - PJL connection → Session handler: receives commands
jetdirect.py - Session handler → Command parser: dispatches commands
jetdirect.py - Command parser → PJL responses: searches responses
README.md - PJL responses → Command parser: provides response
jetdirect.py - Command parser → Virtual filesystem: queries files
jetdirect.py - Session handler → PJL connection: sends replies
jetdirect.py - Session handler → PCL output directory: saves PCL jobs
README.md - Session handler → Log output: writes logs