> 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/wifi-pineapple-commands/network_filter.md).

# NETWORK\_FILTER

`PINEAPPLE_NETWORK_FILTER_ADD` - add a SSID to a Pineapple network filter list

`PINEAPPLE_NETWORK_FILTER_ADD_FILE` - add a list of SSIDs from a file to a Pineapple network filter list

`PINEAPPLE_NETWORK_FILTER_DELETE` - delete a SSID from a Pineapple network filter list

`PINEAPPLE_NETWORK_FILTER_CLEAR` - clear a Pineapple network filter list

`PINEAPPLE_NETWORK_FILTER_LIST` - show a Pineapple network filter list

`PINEAPPLE_NETWORK_FILTER_MODE` - set the Pineapple network filter mode

{% hint style="info" %}
Previously, these commands were named `PINEAPPLE_SSID_FILTER_...`; they have been updated to match the terms used in the UI more consistently. The old commands still work, though!
{% endhint %}

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

The [Pineapple network filter](/wifi-pineapple-pager/pineapple-open-ap.md#pineapple-filters) system defines the scope of an engagement by controlling what SSIDs are impersonated by a Pineapple access point.

The `PINEAPPLE_NETWORK_FILTER_` commands provide a scriptable interface to manipulating the filter lists.

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

```none
PINEAPPLE_NETWORK_FILTER_ADD [list] [ssid] {ssid2 ... ssidN}
```

**list (allow or deny)**

Add a SSID to the `allow` or `deny` network filter list

**ssid**

One or more SSIDs to add to the filter list. If the SSID contains special characters or spaces, be sure to enclose it in quotes!

```none
PINEAPPLE_NETWORK_FILTER_ADD_FILE [list] [file]
```

**list (allow or deny)**

Add the SSIDs to the `allow` or `deny` network filter list

**file**

A file containing one or more SSIDs, one SSID per line.

```none
PINEAPPLE_NETWORK_FILTER_DELETE [list] [ssid] {ssid2 ... ssidN}
```

**list (allow or deny)**

Delete a SSID from the `allow` or `deny` network filter list

**ssid**

One or more SSIDs to delete from the filter list. If the SSID contains special characters or spaces, be sure to enclose it in quotes!

```none
PINEAPPLE_NETWORK_FILTER_CLEAR [list]
```

**list (allow or deny)**

Clear the specified network filter list (`allow` or `deny` list)

```none
PINEAPPLE_NETWORK_FILTER_LIST [list]
```

**list (allow or deny)**

Filter list to display the contents of (`allow` or `deny`)

```none
PINEAPPLE_NETWORK_FILTER_MODE [mode]
```

**mode (allow or deny)**

Set the operational mode of the network filter (`allow` or `deny`)

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

Changes to the Pineapple network filter list are enacted immediately.

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

```bash
PINEAPPLE_MIMIC_DISABLE # disable mimic mode while we change the lists
PINEAPPLE_NETWORK_FILTER_CLEAR allow
PINEAPPLE_NETWORK_FILTER_ADD allow "Free Wi-Fi"
PINEAPPLE_NETWORK_FILTER_ADD allow "HP Setup"
PINEAPPLE_NETWORK_FILTER_MODE allow
PINEAPPLE_MIMIC_ENABLE # enable mimic mode
```
