Path: blob/master/payloads/examples/Conditions/Conditions-example3.txt
2968 views
REM A nested IF statement is quite simply an IF statement placed inside another IF statement. Nested IF statements may be used when evaluating a combination of conditions.123REM Example nested IF statements45IF ( $_CAPSLOCK_ON == TRUE ) THEN6IF ( $_NUMLOCK_ON == TRUE ) THEN7STRING Both Capslock and Numlock are on!8END_IF9END_IF101112REM The condition of the first IF statement is evaluated — whether or not the target has reported that the caps lock key is on. If it is TRUE, then the nested IF statement will run.1314REM The second IF statement is evaluated much like the first, only this time checking the status of the num lock key.1516REM If both the capslock and numlock keys have been reported by the target as being on, then the string "Both Capslock and Numlock are on!" will be typed.1718