usbrubberducky-payloads/payloads/examples/Button/Button-example9.txt

1 line
878 B
Plaintext

REM The ENABLE_BUTTON command allows pressing the button to call the BUTTON_DEF.
BUTTON_DEF
STRINGLN The button was pressed!
STRINGLN Continuing the payload...
END_BUTTON
WHILE TRUE
DISABLE_BUTTON
STRING The button is disabled for the next
STRINGLN 5 seconds...
STRINGLN Pressing the button will do nothing...
DELAY 5000
ENABLE_BUTTON
STRING The button is enabled for the next
STRINGLN 5 seconds...
STRING Pressing the button will execute
STRINGLN the button definition...
DELAY 5000
END_WHILE
REM The payload will alternate between the button being enabled and disabled.
REM If the button is pressed within the 5 second disabled window, nothing will happen.
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.
REM The payload will loop forever.