> For the complete documentation index, see [llms.txt](https://documentation.hak5.org/wifi-pineapple-pager/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/wifi-pineapple-pager/config.md).

# CONFIG

`PAYLOAD_GET_CONFIG` - Retrieve a payload configuration option

`PAYLOAD_SET_CONFIG` - Set a payload configuration option

`PAYLOAD_DEL_CONFIG` - Delete a payload configuration option

### When to use them <a href="#when-to-use-it" id="when-to-use-it"></a>

The `PAYLOAD_..._CONFIG` commands offer a convenient way to save payload options in the central system configuration store. Configuration options saved this way will persist across firmware upgrades.

### PAYLOAD\_GET\_CONFIG <a href="#payload_get_config" id="payload_get_config"></a>

#### Syntax <a href="#syntax" id="syntax"></a>

```none
PAYLOAD_GET_CONFIG [payload name] [value]
```

**payload name&#x20;*****required***

Simple name of the payload. This must not contain spaces, and should be unique. The payload name is used to distinguish between different payloads using the same variable names, and should be a variation of your payloads name.

**value&#x20;*****required***

Variable name to fetch

### PAYLOAD\_SET\_CONFIG <a href="#payload_set_config" id="payload_set_config"></a>

#### Syntax <a href="#syntax" id="syntax"></a>

```none
PAYLOAD_SET_CONFIG [payload name] [value] [value]
```

**payload name&#x20;*****required***

Simple name of the payload. This must not contain spaces, and should be unique. The payload name is used to distinguish between different payloads using the same variable names, and should be a variation of your payloads name.

**value&#x20;*****required***

Variable name to set

**value&#x20;*****required***

Value of variable

### PAYLOAD\_DEL\_CONFIG <a href="#payload_del_config" id="payload_del_config"></a>

#### Syntax <a href="#syntax" id="syntax"></a>

```none
PAYLOAD_DEL_CONFIG [payload name] [value]
```

**payload name&#x20;*****required***

Simple name of the payload. This must not contain spaces, and should be unique. The payload name is used to distinguish between different payloads using the same variable names, and should be a variation of your payloads name.

**value&#x20;*****required***

Variable name to set

### Results <a href="#results" id="results"></a>

`PAYLOAD_GET_CONFIG` returns the option value as the output of the command, and sets a return code of 0 on success and non-zero on failure.

`PAYLOAD_SET_CONFIG` sets a return code of 0 on success and non-zero on failure. The most common cause of a failure is an attempt to set a value for an illegal payload or variable name.

`PAYLOAD_DEL_CONFIG` will never return an error. In the event of an illegal payload or variable name, or if the config value is not found, it will simply be ignored.

### Examples <a href="#examples" id="examples"></a>

```bash
PAYLOAD_SET_CONFIG demopayload host "1.2.3.4"
```

```bash
# ignore an error, we don't care
__config_host=$(PAYLOAD_GET_CONFIG demopayload host)
__host=$(TEXT_PICKER "Hostname" "${__config_host}") || exit 0
```

{% hint style="info" %}
Remember to enclose your value in quotes!
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://documentation.hak5.org/wifi-pineapple-pager/config.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
