Mantis STRING Command
The Mantis STRING command instructs the Mantis USB hardware to type a sequence of characters through the standard USB HID keyboard interface.
When Mantis executes a STRING instruction, it translates each character in the provided text into standard USB HID keyboard scan codes (press and release events) and delivers them to the host operating system at the configured typing pace.
What It Does
- Emulates human or machine keyboard input on Windows, macOS, Linux, Android, and ChromeOS.
- Consumes all characters after the
STRINGkeyword until the end of the line. - Respects per-keystroke pacing configured by
SET_DELAYorSET_SPEED. - Does not automatically append an Enter / Return keystroke (use
STRINGLNif a newline is needed).
Syntax & Parameters
hello.mantis
1STRING <text>Parameters
<text>(required): The ASCII or UTF-8 character sequence to type. Leading whitespace immediately followingSTRINGis preserved.
Examples & Payload Snippets
Basic Text Injection
hello.mantis
1REM Set pacing and type a welcome string2SET_SPEED $Normal3STRING Hello from Karvi Mantis!Full Automation Payload Example
The following payload opens the Windows Run dialog, launches Notepad, and types a multiline note:
hello.mantis
1REM Open Windows Run Dialog2GUI r3DELAY 50045REM Open Notepad6STRING notepad7ENTER8DELAY 1000910REM Type message using STRING11STRING Welcome to Mantis USB HID Automation.12ENTER13STRING Designed and built in India.Expected Behavior
- The target host receives keypress events corresponding to each character in the string.
- Uppercase characters, punctuation marks, and symbols (e.g.
!,@,#) automatically trigger the appropriate internalSHIFTmodifier keystrokes. - Execution pauses briefly between each character according to the active
SET_SPEEDorSET_DELAYvalue.
Common Mistakes & Troubleshooting
- Missing Initial Delay: If Mantis starts typing before the target operating system has recognized the USB device, the first few characters may be lost. Always include an initial delay (e.g.,
DELAY 1000) at the start of your payload. - Forgetting Enter: If you expect the command to be submitted in a terminal or dialog, remember to either add an
ENTERcommand on the next line or useSTRINGLN. - Keyboard Layout Mismatch: Mantis emulates a standard US QWERTY keyboard layout by default. On host systems configured for different keyboard layouts (e.g. UK, AZERTY, QWERTZ), specific symbols (such as
@,",z,y) may map differently.
Related Commands
STRINGLN— Type text and automatically press Enter.FAST_STRING— Type text using batched HID reports at high WPM.ENTER— Press the Enter / Return key.DELAY— Pause script execution.SET_SPEED— Set typing pace presets ($Human, $Fastest, $Normal).
Last updated on