hackerterminal/Printer.md

29 lines
861 B
Markdown
Raw Permalink Normal View History

2022-02-03 21:52:44 +00:00
# Password-Printer
``printer.sh``
This script prints out a random passoword on a thermal printer upon button press.
## Device
We use a Card Start 8010 thermal printer. With the USB adaptor, you can simply send text via echo to the /dev/usb/lp1 device. It is printed if the line is full (24 characters) or when a "\r" sequence is sent.
## Commands
### Wanted Output:
+---------------------+
| Dein Passwort: |
| 0123456789 |
+---------------------+
### Test Output:
echo -e "\r\r+---------------------+\r| Dein Passwort: |\r| 0123456789 |\r+---------------------+\r\r\r" > /dev/usb/lp1
### Final command:
#!/bin/sh
echo "\r\r+----------------------+| Dein Passwort lautet || " > /dev/usb/lp1
pwgen -N1 10 > /dev/usb/lp1
echo " |+----------------------+\r\r" > /dev/usb/lp1