> For the complete documentation index, see [llms.txt](https://hacking-notes.jord4n.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hacking-notes.jord4n.pro/zh/hacking-wifi/wpa-wpa2-psk-network-attacks/precomputed-attacks/pyrit-database-attack-cracking.md).

# Pyrit 数据库攻击破解

在 Pyrit 数据库中预计算 WPA/WPA2 密钥并测试捕获到的握手。

Pyrit 数据库攻击会在测试抓包之前预先计算密钥。这使得最终查找非常快。

该工作流程导入密码候选项，添加目标 ESSID，并生成所需的值。

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2FgmwqtmKkrgGGVbZasqSH%2Fimage.png?alt=media&amp;token=0e8b5876-9c0b-4b2e-a2c9-b7fcad75f615" alt=""><figcaption></figcaption></figure>

### 导入密码候选项

将密码列表导入 Pyrit 数据库：

{% code overflow="wrap" %}

```bash
pyrit -i passwords.txt import_passwords
```

{% endcode %}

### 创建 ESSID

添加目标网络名称：

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2FNK6LX20afte1GR8Ne0wp%2Fimage.png?alt=media&amp;token=19e53b19-5b1d-4ebb-8b2b-2770645c967d" alt=""><figcaption></figcaption></figure>

{% code overflow="wrap" %}

```bash
pyrit -e jordan create_essid
```

{% endcode %}

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2FfXbe8TMVLoZWiVf8cL7h%2Fimage.png?alt=media&amp;token=0b62b893-6fff-47b7-a3bd-126e24bc5567" alt=""><figcaption></figcaption></figure>

### 预先计算密钥

为导入的密码和 ESSID 生成数据库值：

{% code overflow="wrap" %}

```bash
pyrit batch
```

{% endcode %}

### 测试抓包

针对捕获到的握手包运行数据库攻击：

{% code overflow="wrap" %}

```bash
pyrit -r Capture-01.cap attack_db
```

{% endcode %}

此测试耗时 0.0001 秒。Pyrit 每秒检查约 9300 万个密码。

预先计算的数据库避免了在最终查找时逐个计算每个密码。

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2FGNjJ9FPBTODpPuw1BRfR%2Fimage.png?alt=media&amp;token=d4bc6a51-2a61-4b23-8461-22a3040270bf" alt=""><figcaption></figcaption></figure>


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://hacking-notes.jord4n.pro/zh/hacking-wifi/wpa-wpa2-psk-network-attacks/precomputed-attacks/pyrit-database-attack-cracking.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
