# NodeJS Express

## Cookie Signature

The tool <https://github.com/DigitalInterruption/cookie-monster> is a utility for automating the testing and re-signing of Express.js cookie secrets.

### Single cookie with a specific name

```
$ cookie-monster -c eyJmb28iOiJiYXIifQ== -s LVMVxSNPdU_G8S3mkjlShUD78s4 -n session
```

### Custom wordlist

```
$ cookie-monster -c eyJmb28iOiJiYXIifQ== -s LVMVxSNPdU_G8S3mkjlShUD78s4 -w custom.lst
```

### Test multiple cookies using batch mode

```
$ cookie-monster -b -f cookies.json
```

### Test multiple cookies using batch mode with a custom wordlist

```
$ cookie-monster -b -f cookies.json -w custom.lst
```

### Encode and sign a new cookie

if you know the secret you can sign a the cookie.

```
$ cookie-monster -e -f new_cookie.json -k secret
```


---

# Agent Instructions: 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:

```
GET https://breached.gitbook.io/dashboard/network-services-pentesting/pentesting-web/nodejs-express.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
