Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
hak5
GitHub Repository: hak5/usbrubberducky-payloads
Path: blob/master/payloads/examples/Variables/VAR-example1.txt
2968 views
1
REM In DuckyScript, variables are initiated using the VAR command.
2
3
REM Example Integer Variable
4
VAR $SPEED = 2000
5
6
REM Example Boolean (TRUE/FALSE or 1/0)
7
VAR $BLINK = TRUE
8
VAR $BLINK = 1
9
10
REM Unlike a constant (declared by DEFINE), a variable is appended with the dollar sign ("$") sigil.
11
12
REM Constant string which may not change
13
REM throughout the payload
14
DEFINE FOO Hello, World!
15
16
REM Variable integer which may change
17
REM throughout the payload
18
VAR $BAR = 1337
19
20
REM The constant FOO will always be replaced with the string "Hello, World!" throughout the payload.
21
REM While the variable $BAR currently holds the value 1337, this may change throughout the payload — which will be detailed shortly by using operators.
22