Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
hak5
GitHub Repository: hak5/usbrubberducky-payloads
Path: blob/master/payloads/examples/Button/Button-example9.txt
2968 views
1
REM The ENABLE_BUTTON command allows pressing the button to call the BUTTON_DEF.
2
3
BUTTON_DEF
4
STRINGLN The button was pressed!
5
STRINGLN Continuing the payload...
6
END_BUTTON
7
8
WHILE TRUE
9
DISABLE_BUTTON
10
STRING The button is disabled for the next
11
STRINGLN 5 seconds...
12
STRINGLN Pressing the button will do nothing...
13
DELAY 5000
14
15
ENABLE_BUTTON
16
STRING The button is enabled for the next
17
STRINGLN 5 seconds...
18
STRING Pressing the button will execute
19
STRINGLN the button definition...
20
DELAY 5000
21
END_WHILE
22
23
REM The payload will alternate between the button being enabled and disabled.
24
REM If the button is pressed within the 5 second disabled window, nothing will happen.
25
REM If the button is pressed within the 5 second enabled window, the button definition will be executed and "The button was pressed!" will be typed.
26
REM The payload will loop forever.
27