Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
hak5
GitHub Repository: hak5/usbrubberducky-payloads
Path: blob/master/payloads/examples/Operators/Operators-example1.txt
2968 views
1
REM Assign $FOO to 42
2
VAR $FOO = 42
3
4
REM The variable is now 42.
5
REM Let’s add it by 1.
6
$FOO = ( $FOO + 1 )
7
8
REM The variable is now 43: the sum of 42 and 1.
9
REM Let’s subtract it by 1.
10
$FOO = ( $FOO - 1 )
11
12
REM The variable is now 42 (again):
13
REM the difference of 42 and 1.
14
REM Let’s multiply it by 2.
15
$FOO = ( $FOO * 2 )
16
17
REM The variable is now 84:
18
REM the product of 42 and 2.
19
REM Let’s divide it by 2.
20
$FOO = ( $FOO / 2 )
21
22
REM The variable is now 42 (again):
23
REM the quotient of 82 and 2.
24
REM Let’s modulus it by 4.
25
$FOO = ( $FOO % 4 )
26
27
REM The variable is now 2:
28
REM the signed remainder of 42 and 4.
29
REM Let’s raise it to the power of 6.
30
$FOO = ( $FOO ^ 6 )
31
32
REM Our variable is now 64:
33
REM the exponent of 2 and 6.
34
35