Skip to contentSkip to Content

Mantis STRINGLN Command

The Mantis STRINGLN command (String Line) types a sequence of characters through the USB HID interface and immediately follows it with an ENTER keypress.

It is a shorthand that combines STRING <text> and ENTER into a single concise instruction, making terminal automation and command-line payloads cleaner and more compact.


What It Does

  • Emulates keyboard typing for the specified string.
  • Automatically presses and releases the ENTER key after the final character.
  • Eliminates the need for a separate ENTER line after every command.

Syntax & Parameters

hello.mantis
1STRINGLN <text>

Parameters

  • <text> (required): The character string to be typed before submitting with Enter.

Examples & Payload Snippets

Terminal Automation Example

hello.mantis
1REM Open Terminal on Linux / macOS
2CTRL ALT t
3DELAY 1000
4
5REM Run system information commands
6STRINGLN whoami
7DELAY 500
8STRINGLN uname -a
9DELAY 500
10STRINGLN df -h

Comparison: STRING vs STRINGLN

hello.mantis
1REM Equivalent approaches:
2
3REM Approach 1: Using STRING + ENTER (2 lines)
4STRING powershell.exe
5ENTER
6
7REM Approach 2: Using STRINGLN (1 line)
8STRINGLN powershell.exe

Expected Behavior

  1. The target host receives each character sequentially at the configured typing pace.
  2. Immediately upon typing the last character, Mantis dispatches an ENTER HID scan code.
  3. If the host terminal requires processing time after receiving Enter, follow STRINGLN with a DELAY.

Common Mistakes & Troubleshooting

  • Immediate Submission on Form Fields: In web browsers or multi-field forms, STRINGLN will trigger form submission instead of tab navigation. For multi-field forms, use STRING combined with TAB.
  • Rapid Terminal Submissions: When executing consecutive STRINGLN statements, add a small DELAY 300 between lines to allow the target shell to finish processing the previous command.

  • STRING — Type text without pressing Enter.
  • FAST_STRING — Fast batched text injection.
  • ENTER — Standalone Enter keypress.
  • DELAY — Pause script execution.
Last updated on