Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
hak5
GitHub Repository: hak5/usbrubberducky-payloads
Path: blob/master/payloads/examples/Button/Button-example6.txt
2968 views
1
BUTTON_DEF
2
REM This is the first button definition
3
STRINGLN The button was pressed once!
4
BUTTON_DEF
5
REM This second button definition
6
REM overwrites the first
7
STRINGLN The button was pressed twice!
8
END_BUTTON
9
END_BUTTON
10
11
STRING Press the button twice to see
12
STRING how nested button definitions work!
13
ENTER
14
15
WHILE TRUE
16
STRING .
17
DELAY 1000
18
END_WHILE
19
20
21
REM If the button is pressed once at any point in the payload it will stop typing “.” and the first button definition will be executed.
22
REM When the first button definition is executed, a secondary button definition will be implemented.
23
REM If the button pressed a second time, the newly implement second button definition will execute.
24
25