Skip to main content

Pythonic aircrack-ng bindings

Project description

CI/CD CI - Test CD - Build Package
Package PyPI - Version PyPI - Downloads PyPI - Python Version
Meta code style - yapf types - Mypy imports - isort

Python aircrack-ng bindings

PyrCrack is a Python API exposing a common aircrack-ng API. As AircrackNg will run in background processes, and produce parseable output both in files and stdout, the most pythonical approach are context managers, cleaning up after

This library exports a basic aircrack-ng API aiming to keep always a small readable codebase.

This has led to a simple library that executes each of the aircrack-ng's suite commands and auto-detects its usage instructions. Based on that, it dinamically builds classes inheriting that usage as docstring and a run() method that accepts keyword parameters and arguments, and checks them BEFORE trying to run them.

Some classes expose themselves as async iterators, as airodump-ng's wich returns access points with its associated clients.


The documentation is made with Material for MkDocs and is hosted by GitHub Pages.


Be sure to check the python notebook example

You can have also have a look at the examples/ folder for some usage examples, such as the basic "scan for targets", that will list available interfaces, let you choose one, put it in monitor mode, and scan for targets updating results each 2 seconds.

import asyncio

import pyrcrack

from rich.console import Console
from rich.prompt import Prompt

async def scan_for_targets():
    """Scan for targets, return json."""
    console = Console()
    airmon = pyrcrack.AirmonNg()

    interface = Prompt.ask(
	'Select an interface',
	choices=[a['interface'] for a in await airmon.interfaces])

    async with airmon(interface) as mon:
	async with pyrcrack.AirodumpNg() as pdump:
	    async for result in pdump(mon.monitor_interface):
		await asyncio.sleep(2)

This snippet of code will produce the following results:





Pyrcrack is distributed under the terms of the GPL2+ license.

v1.2.6 (2022-12-20)


  • Fixed small typing issue

v1.2.5 (2022-12-03)


  • Fixed CI badge on readme

v1.2.4 (2022-12-03)


  • Reorganized workflows

v1.2.3 (2022-12-03)


  • I was re-checking out the repo

v1.2.2 (2022-12-03)


  • Changed action for softprops/action-gh-release

v1.2.1 (2022-12-03)


  • Added missing commitizen dep

v1.2.0 (2022-12-03)



  • Added CI autorelease
  • Upgrading workflows
  • Migrating to hatch
  • :sparkles: Check correct aircrack version and root (#41)
  • :sparkles: #29 Improved airmon-ng interface
  • :sparkles: #37 Improved aireplay-ng usability (#38)
  • Added debug mode. Don't delete tempfiles
  • closes: #11 Added pypi to github flow


  • :bug: #29 Don't break on exit in most cases
  • Added run-as-root message
  • Fixed airmon test
  • [#10] Using codecov badge
  • [#10] Migrating to codecov

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyrcrack-1.2.6.tar.gz (67.4 kB view hashes)

Uploaded source

Built Distribution

pyrcrack-1.2.6-py3-none-any.whl (17.7 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page