> For the complete documentation index, see [llms.txt](https://hacktricks.xsx.tw/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hacktricks.xsx.tw/network-services-pentesting/pentesting-web/nodejs-express.md).

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