Links in facedancer examples.
[goodfet] / client / facedancer-keyboard.py
1 #!/usr/bin/env python
2 #
3 # usb-test.py
4
5 from serial import Serial, PARITY_NONE
6
7 from Facedancer import *
8 from MAXUSBApp import *
9 from USBKeyboard import *
10
11 sp = Serial("/dev/ttyUSB0", 115200, parity=PARITY_NONE, timeout=2)
12 fd = Facedancer(sp, verbose=1)
13 u = MAXUSBApp(fd, verbose=1)
14
15 d = USBKeyboardDevice(u, verbose=4)
16
17 d.connect()
18
19 try:
20     d.run()
21 # SIGINT raises KeyboardInterrupt
22 except KeyboardInterrupt:
23     d.disconnect()
24