From: pete-cs Date: Sun, 16 Jun 2013 00:45:22 +0000 (+0000) Subject: explicitly specify python3; add preamble and debouncing to keyboard emulator to suppo... X-Git-Url: http://git.rot13.org/?p=goodfet;a=commitdiff_plain;h=9a322fed4cbb324c54b582672d05f575f49a41cc explicitly specify python3; add preamble and debouncing to keyboard emulator to support linux-3.8 git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@1600 12e2690d-a6be-4b82-a7b7-67c4a43b65c8 --- diff --git a/client/USBKeyboard.py b/client/USBKeyboard.py index 6e459e4..4dee1f9 100644 --- a/client/USBKeyboard.py +++ b/client/USBKeyboard.py @@ -45,14 +45,17 @@ class USBKeyboardInterface(USBInterface): descriptors ) - # "ls" - self.text = [ chr(x) for x in [ 0x0f, 0x16, 0x28, 0x00 ] ] + # "ls" + empty_preamble = [ 0x00 ] * 10 + text = [ 0x0f, 0x00, 0x16, 0x00, 0x28, 0x00 ] + + self.keys = [ chr(x) for x in empty_preamble + text ] def handle_buffer_available(self): - if not self.text: + if not self.keys: return - letter = self.text.pop(0) + letter = self.keys.pop(0) self.type_letter(letter) def type_letter(self, letter, modifiers=0): diff --git a/client/facedancer-keyboard.py b/client/facedancer-keyboard.py index 549d1b1..58b87d0 100755 --- a/client/facedancer-keyboard.py +++ b/client/facedancer-keyboard.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.2 +#!/usr/bin/env python3 # # usb-test.py diff --git a/client/facedancer-monitor.py b/client/facedancer-monitor.py index 1edc152..906c044 100755 --- a/client/facedancer-monitor.py +++ b/client/facedancer-monitor.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3.2 +#!/usr/bin/env python3 # # monitor-test.py