# NodeJS Express

## Cookie Signature

The tool <https://github.com/DigitalInterruption/cookie-monster> 是一个用于自动化测试和重新签名 Express.js cookie secrets 的实用工具。

### 具有特定名称的单个 cookie

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

### 自定义字典

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

### 使用批处理模式测试多个Cookie

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

### 使用自定义字典批量测试多个cookie

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

### 编码并签署一个新的cookie

如果你知道密钥，你可以签署这个cookie。

```bash
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://hacktricks.xsx.tw/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.
