- August
- 8th
- 2008
LPT Wireless Print Server Hacked –> 8bits output
Posted by MaEl in: Bits-and-Bytes, Code-Programming, Do-it-Yourself Comments
LPT port pinouts
| Pin No. | Signal Name | Pin No. | Signal Name | |
| 1 | Strobe | 14 | Auto Feed | |
| 2 - 9 | Data 0 - Data 7 | 15 | Error | |
| 10 | Acknowledge | 16 | Initialize | |
| 11 | Busy | 17 | Select In | |
| 12 | Paper Out | 18 - 25 | Ground | |
| 13 | Select |
Wiring
Tricks to fool the print server to believe that a printer is connected and alive.
1.Connect Pin 11 and Pin 12 to Pin 25 (GND)
2.Connect Pin 13 and Pin 15 to Pin 16 (+5v)
3.Connect Pin 10 to Pin 1
Test
?php
// The raw port number for the print server
$service_port = "9100";
// The network address of the print server.
$address = gethostbyname('192.168.1.210');
//Creating socket...
$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
//Connecting to print server
$result = socket_connect($socket, $address, $service_port);
//send data
$out=255;
socket_write($socket, chr($out), strlen(chr($out)));
//pause
sleep(1);
// close the socket
socket_close($socket);
?
References
Print Server Power Control Hack
How Parallel Ports Work
Ethernet Relay Control
Leave a Reply

