Skip to content

Commit c584aa8

Browse files
authored
Merge pull request #1767 from adafruit/ducky
Added rubber ducky code
2 parents 929c9eb + ec4c571 commit c584aa8

2 files changed

Lines changed: 74 additions & 0 deletions

File tree

Trinkey_Rubber_Ducky/code.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2021 Dylan Herrada for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: Unlicense
4+
import time
5+
import usb_hid
6+
from adafruit_hid.keyboard import Keyboard
7+
from adafruit_hid.keyboard_layout_us import KeyboardLayoutUS
8+
import adafruit_ducky
9+
10+
time.sleep(1) # Sleep for a bit to avoid a race condition on some systems
11+
keyboard = Keyboard(usb_hid.devices)
12+
keyboard_layout = KeyboardLayoutUS(keyboard) # We're in the US :)
13+
14+
duck = adafruit_ducky.Ducky("duckyscript.txt", keyboard, keyboard_layout)
15+
16+
result = True
17+
while result is not False:
18+
result = duck.loop()
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
REM ChromeBook Keyboard Key Sequence
2+
REM Part One: Wifi Setup
3+
DELAY 1000
4+
DELAY 1000
5+
TAB
6+
TAB
7+
TAB
8+
TAB
9+
ENTER
10+
DELAY 1000
11+
TAB
12+
TAB
13+
TAB
14+
ENTER
15+
DELAY 500
16+
STRING WiFi SSID
17+
DELAY 500
18+
TAB
19+
DELAY 500
20+
DOWN
21+
DOWN
22+
DELAY 500
23+
TAB
24+
STRING WiFi Password
25+
DELAY 500
26+
ENTER
27+
REM Long Pause while Connection is established.
28+
DELAY 9000
29+
REM Part One and One half: Go through First run Setup.
30+
TAB
31+
TAB
32+
ENTER
33+
DELAY 500
34+
TAB
35+
TAB
36+
TAB
37+
ENTER
38+
DELAY 500
39+
CTRL ALT E
40+
TAB
41+
TAB
42+
TAB
43+
TAB
44+
TAB
45+
ENTER
46+
REM Part Two: Enrollment (Long Pauses in case it's having issues with wifi or render)
47+
DELAY 4000
48+
STRING Google Account
49+
ENTER
50+
DELAY 5000
51+
STRING Google Account Password
52+
DELAY 500
53+
ENTER
54+
REM Long Pause while device is enrolled.
55+
DELAY 8000
56+
ENTER

0 commit comments

Comments
 (0)