> 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/hacking-wifi/wpa-wpa2-psk-network-attacks/precomputed-attacks/cracking-with-airolib.md).

# Cracking with Airolib

Build an Airolib database and test a captured WPA/WPA2 handshake.

Airolib-ng stores password candidates and network names in an SQLite database.

### Import password candidates

Import the `passwords.txt` file:

{% code overflow="wrap" %}

```bash
airolib-ng password-airolib --import passwd passwords.txt
```

{% endcode %}

<figure><img src="https://131707722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2FC7KyojYOjAy3jAZTwBAb%2Fimage.png?alt=media&amp;token=0915931d-de1b-4b56-87a1-75cbb07a6e06" alt=""><figcaption></figcaption></figure>

This creates an SQLite database.

<figure><img src="https://131707722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fq7W9Eht0oceSLortjT9X%2Fimage.png?alt=media&amp;token=ee5dcacc-5144-46d0-9b6a-89b87079c830" alt=""><figcaption></figcaption></figure>

### Import the network name

Create an ESSID file with the access point name:

{% code overflow="wrap" %}

```bash
echo "jordan" > essid.lst
```

{% endcode %}

Import the ESSID file:

{% code overflow="wrap" %}

```bash
airolib-ng password-airolib --import essid essid.lst
```

{% endcode %}

<figure><img src="https://131707722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2FW3zoZ5ph64pno3eui3N8%2Fimage.png?alt=media&amp;token=d23a4432-9bd1-4fa6-b48b-0248db27ac29" alt=""><figcaption></figcaption></figure>

Check the database status:

{% code overflow="wrap" %}

```bash
airolib-ng password-airolib --stats
```

{% endcode %}

<figure><img src="https://131707722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2FrJh1zhmmOpFVzFmk2sc1%2Fimage.png?alt=media&amp;token=4a48f177-8a9c-492a-8e3c-1172f79c6460" alt=""><figcaption></figcaption></figure>

Clean the database before generating the values:

{% code overflow="wrap" %}

```bash
airolib-ng password-airolib --clean all
```

{% endcode %}

### Generate the database

Generate the precomputed values. This takes about 10 minutes.

{% code overflow="wrap" %}

```bash
airolib-ng password-airolib --batch
```

{% endcode %}

<figure><img src="https://131707722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2FI4tJtJw6azZtaHWGw3Hi%2Fimage.png?alt=media&amp;token=d2467f7a-8c05-4221-a91c-6d5c4dc95cdd" alt=""><figcaption></figcaption></figure>

### Test the capture

Use Aircrack-ng with the Airolib database:

{% code overflow="wrap" %}

```bash
aircrack-ng -r password-airolib Capture-01.cap
```

{% endcode %}

This takes less than 1.5 seconds.

<figure><img src="https://131707722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2FShRM9OONTWiaZ9gpCe1R%2Fimage.png?alt=media&amp;token=872ee0a8-5651-4a63-8b2e-773f6bb0f311" 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/hacking-wifi/wpa-wpa2-psk-network-attacks/precomputed-attacks/cracking-with-airolib.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.
