Skip to contentSkip to Content
Payload examplesAdvanced Combinations

Mantis Advanced Conditional & Button Payload Examples

Combine button triggers, loops, and functions to create modular, interactive payloads.


Button-Armed Payload

hello.mantis
1REM Armed mode: Blink LED and wait for operator trigger
2LED_ON
3WAIT_FOR_BUTTON_PRESS
4LED_OFF
5
6REM Operator clicked button: Execute payload
7GUI r
8DELAY 500
9STRINGLN powershell
10DELAY 1200
11STRINGLN Write-Host 'Payload Triggered by Hardware Button!'

Reusable Subroutines with Functions

hello.mantis
1FUNCTION launch_shell(shell_name)
2 GUI r
3 DELAY 400
4 STRINGLN shell_name
5 DELAY 1000
6END_FUNCTION
7
8launch_shell("cmd")
9STRINGLN echo Command Prompt Ready.
10
11launch_shell("powershell")
12STRINGLN Write-Output "PowerShell Ready."

Last updated on