> For the complete documentation index, see [llms.txt](https://documentation.hak5.org/key-croc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.hak5.org/key-croc/writing-payloads/ducky-script-commands.md).

# Ducky Script Commands

## BASICS

* `MATCH` – specifies a pattern that must be typed to trigger payload execution
* `SAVEKEYS` – saves next or last typed keys to a specified file when a MATCH is found
* `QUACK` – injects keystrokes using Ducky Script 2.0<br>
* `QUACKFILE` – injects keystrokes from specified file
* `ATTACKMODE` – specifies which device type to emulate
* `LED` – controls the multi-color LED
* `GET_VARS` – returns useful variables for use in payload

## PAYLOAD CONTROL & DEVELOPMENT

* `RELOAD_PAYLOADS` – instructs the payload framework to reingest payloads from disk
* `CHECK_PAYLOADS` – checks the `MATCH` and `SAVEKEYS` syntax of the loaded payloads
* `RECORD_PAYLOAD` – interactive payload recorder
* `ENABLE_PAYLOAD` – enables payload
* `DISABLE_PAYLOAD` – disables payload<br>

## EXTRAS

* `INSTALL_EXTRAS` – installs optional third party tools
* `KEYBOARD` – reports if a keyboard is present or missing
* `udisk` – mount, unmount and format the udisk partition\ <br>

## WAIT COMMANDS

* `WAIT_FOR_KEYBOARD_ACTIVITY` – halts payload until keyboard activity is detected
* `WAIT_FOR_KEYBOARD_INACTIVITY` – halts payload until keyboard is inactive for specified time
* `WAIT_FOR_LOOT` – halts payload until specified loot is received\ <br>

## CLOUD C2 COMMANDS

* `C2NOTIFY` – sends a notification to the configured Cloud C2 server
* `C2EXFIL` – sends a file to the configured Cloud C2 server
