Path: blob/master/payloads/examples/Conditions/Conditions-example2.txt
2968 views
REM The ELSE statement is an optional component of the IF statement which will only execute when the IF statement condition is FALSE. One way to interpret an ELSE statement is to read it as "IF this condition is true, THEN do this thing, or ELSE do another thing".123REM Example IF THEN ELSE45IF ( $_CAPSLOCK_ON == TRUE ) THEN6STRING Capslock is on!7ELSE IF ( $_CAPSLOCK_ON == FALSE ) THEN8STRING Capslock is off!9END_IF101112REM The condition of the capslock key, as determined by the target operating system, is checked.13REM If the caps lock key state has been reported by the target as ON, the string "Capslock is on" will be typed.14REM Otherwise, if the capslock key state has not been reported by the target (or it has been reported as not being on), the string "Capslock is off" will be typed.1516