Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Python Aircrack-ng bindings

NotificationsYou must be signed in to change notification settings

XayOn/pyrcrack

Repository files navigation

CI/CDCI - TestCD - Build Package
PackagePyPI - VersionPyPI - DownloadsPyPI - Python Version
Metacode style - yapftypes - Mypyimports - isort

Python aircrack-ng bindings

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

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

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

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

Documentation

Thedocumentation is made withMaterialfor MkDocs and is hosted byGitHub Pages.

Examples

Be sure to check the pythonnotebook 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, letyou choose one, put it in monitor mode, and scan for targets updating resultseach 2 seconds.

importasyncioimportpyrcrackfromrich.consoleimportConsolefromrich.promptimportPromptasyncdefscan_for_targets():"""Scan for targets, return json."""console=Console()console.clear()console.show_cursor(False)airmon=pyrcrack.AirmonNg()interface=Prompt.ask('Select an interface',choices=[a['interface']forainawaitairmon.interfaces])asyncwithairmon(interface)asmon:asyncwithpyrcrack.AirodumpNg()aspdump:asyncforresultinpdump(mon.monitor_interface):console.clear()console.print(result.table)awaitasyncio.sleep(2)asyncio.run(scan_for_targets())

This snippet of code will produce the following results:

scan

Contributors

contributors

License

Pyrcrack is distributed under the terms of theGPL2+ license.


[8]ページ先頭

©2009-2025 Movatter.jp