# 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

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

### Custom wordlist

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

### Test multiple cookies using batch mode

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

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

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

### Encode and sign a new cookie

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

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


---

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

```
GET https://blog.1nf1n1ty.team/hacktricks/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.
