Skip to content

Commit

Permalink
chore: [#9] Fixed badges, build and readme
Browse files Browse the repository at this point in the history
Added new badges to readme, fixed examples and PEP-8 and improved readme
itself with markdown.
  • Loading branch information
XayOn committed Sep 22, 2020
1 parent b9a6cfe commit 36eef41
Show file tree
Hide file tree
Showing 11 changed files with 768 additions and 317 deletions.
16 changes: 8 additions & 8 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Thank you for contributing pyrcrack
========================================================
# Coding styles and coverage

## If you are creating an issue:
- Yapf with default options must be run before submitting any PR
- A bug must exist on tracker, and it must be mentioned in each commit in the form \[4\] COMMIT\_MSG
- Use conventional commits ( https://www.conventionalcommits.org/en/v1.0.0-beta.2/ )
- You can use emojis on commits

Make sure to report wich specific commit did the issue ocurr on.
Make sure to run the software on a clean environment.
# Testing

## If you're creating pull request:

Please, run tox before.
Make sure you test anything before submitting a PR, and please, do not lower
the coverage levels
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!--- Provide a general summary of the issue in the Title above -->

## Detailed Description
<!--- Provide a detailed description of the change or addition you are proposing -->

## Context
<!--- Why is this change important to you? How would you use it? -->
<!--- How can it benefit other users? -->

## Possible Implementation
<!--- Not obligatory, but suggest an idea for implementing addition or change -->

## Your Environment
<!--- Include as many relevant details about the environment you experienced the bug in -->
* Python version used:
* Operating System:
5 changes: 5 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Before submitting your PR, please review the following checklist:

- [ ] I have passed apf with default options must be run before submitting any PR
- [ ] Tests pass
- [ ] Coverage hasn't lowered
50 changes: 0 additions & 50 deletions ChangeLog

This file was deleted.

160 changes: 160 additions & 0 deletions Changelog.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
Changelog
=========


(unreleased)
------------
- Updated pyproject with license information. [David Francos]
- Updated readme. [David Francos]
- Initial aireplay test. [David Francos]
- Merge branch 'master' of github.com:XayOn/pyrcrack. [David Francos]
- Removed old pipfile. [David Francos]
- Fixed test running. [David Francos]
- Fixed example's PEP8. [David Francos]
- PEP-8. [David Francos]
- Version bump. [David Francos]
- Added result helper for aireplay. [David Francos]
- Version bump. [David Francos]
- Updated to poetry. [David Francos]
- Merge pull request #7 from XayOn/develop. [David Francos]

Fixed setup.py
- Fixed setup.py. [David Francos]
- Added more tests. [David Francos]
- Trying deadsnakes ppa, travis still has problems with 3.7... [David
Francos]
- Fixed travis. [David Francos]


0.1.2 (2018-10-13)
------------------
- Merge branch 'develop' of https://github.com/XayOn/pyrcrack into
develop. [David Francos]
- Added documentation. [David Francos]
- Fixing readthedocs. [David Francos]
- Added most aircrack-ng suite commands. [David Francos]

- Airbase
- Airdecap
- Airdecloack
- Aireplay
- Airmon-ng and Airmon-zc
- Compatibility with all versions won't be a thing, sorry. [David
Francos]
- Updated readme. [David Francos]
- Added working ExecutorHelper and AircrackNg class. [David Francos]

Added a base working executor helper with 100% code coverage that would
construct a command class based on its output.

If customization is required (i.e the command does not follow docopt
specifications) you can subclass ExecutorHelper and append a custom
docstring to the class.
- Only python3.6 supported right now. [David Francos]
- Added fixmes to pyrcrack main lib and updated readme. [David Francos]

There's two major blocking problems with the docopt-based
runner right now.
- Added some base tests. [David Francos]
- Added pipenv to travis. [David Francos]
- Fixed readme. [David Francos]
- Merge branch 'master' into develop. [David Francos]
- Initial commit. [David Francos]
- Initial commit. [David Francos Cuartero]
- Initial commit. [David Francos Cuartero]
- Added a few more utilities and examples. [David Francos]
- Fixed TOX. [David Francos]
- Added score. [David Francos]
- Merge branch 'master' of https://github.com/XayOn/pyrcrack. [David
Francos]
- Updated readme. [David Francos]
- Added asynchronous result updater for airodump-ng. [David Francos]
- Added client list to AP automatically. [David Francos]
- Added models. [David Francos]
- Added scan example. [David Francos]
- Updated to aircrack-ng 1.3. [David Francos]
- Updated readme. [David Francos]
- Added asynchronous result updater for airodump-ng. [David Francos]
- Removed sync code. Everything is a coroutine now. [David Francos]
- Added airodump. [David Francos]
- Fixed tests. [David Francos]
- Removed unneded tempfile import. [David Francos]
- New API for async and sync requests, added context managers. [David
Francos]
- Added documentation. [David Francos]
- Fixing readthedocs. [David Francos]
- Added most aircrack-ng suite commands. [David Francos]

- Airbase
- Airdecap
- Airdecloack
- Aireplay
- Airmon-ng and Airmon-zc
- Compatibility with all versions won't be a thing, sorry. [David
Francos]
- Updated readme. [David Francos]
- Added working ExecutorHelper and AircrackNg class. [David Francos]

Added a base working executor helper with 100% code coverage that would
construct a command class based on its output.

If customization is required (i.e the command does not follow docopt
specifications) you can subclass ExecutorHelper and append a custom
docstring to the class.
- Only python3.6 supported right now. [David Francos]
- Added fixmes to pyrcrack main lib and updated readme. [David Francos]

There's two major blocking problems with the docopt-based
runner right now.
- Added some base tests. [David Francos]
- Added pipenv to travis. [David Francos]
- Fixed readme. [David Francos]
- Merge branch 'master' into develop. [David Francos]
- Initial commit. [David Francos]
- Initial commit. [David Francos]
- Initial commit. [David Francos]


0.1.1 (2016-01-20)
------------------
- Merge branch 'release/0.1.1' [David Francos Cuartero]
- Setup and history. [David Francos Cuartero]
- Improved readme. [David Francos Cuartero]
- Marked as todo remaining ones. [David Francos Cuartero]
- Airmon and airdecap docs. [David Francos Cuartero]
- Added wesside-ng docs. [David Francos Cuartero]
- Improved aircrack-ng docs. [David Francos Cuartero]
- Added moduleinfo. [David Francos Cuartero]
- Documented aircrack-ng class. [David Francos Cuartero]
- Merge tag '0.1.0' into develop. [David Francos Cuartero]

v0.1.0


0.1.0 (2016-01-19)
------------------
- Merge branch 'release/0.1.0' [David Francos Cuartero]
- Setup and history. [David Francos Cuartero]
- Added wesside-ng. [David Francos Cuartero]
- Added airdecap-ng. [David Francos Cuartero]
- Implemented aircrack-ng. [David Francos Cuartero]
- Moved ctx to parent. [David Francos Cuartero]
- Added aireplay-ng (quite basic, not yet parsing output for anything)
[David Francos Cuartero]
- Removed py35 toxenv. [David Francos Cuartero]
- Even empty tests where failing. [David Francos Cuartero]
- Nopy3.5 on travis seems. [David Francos Cuartero]
- Version stuff. [David Francos Cuartero]
- The template added literal ' there =P. [David Francos Cuartero]
- The template added literal ' there =P. [David Francos Cuartero]
- Psutil requirement. [David Francos Cuartero]
- Made csv parsing more clear. [David Francos Cuartero]
- Replaced aps for a tree. [David Francos Cuartero]
- Small fixes. [David Francos Cuartero]
- Improved documentation. [David Francos Cuartero]
- Fixed argument handling. [David Francos Cuartero]
- Sleeping first. [David Francos Cuartero]
- Fix. [David Francos Cuartero]
- Initial commit. [David Francos Cuartero]


77 changes: 77 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# pyrcrack

**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

<span style="display:block;text-align:center">![](https://img.shields.io/pypi/l/pyrcrack) ![](https://img.shields.io/librariesio/release/pypi/pyrcrack) ![](https://img.shields.io/pypi/dm/pyrcrack) ![](https://img.shields.io/pypi/pyversions/pyrcrack) ![](https://img.shields.io/pypi/v/pyrcrack) ![Coveralls github](https://img.shields.io/coveralls/github/XayOn/pyrcrack) ![Travis (.org)](https://img.shields.io/travis/XayOn/pyrcrack)</span>

# Installation

This library is available on [pypi](https://pypi.org/project/pyrcrack/), you can install it directly with pip

```bash
pip install pycrack
```

# Usage

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.

You can find some example usages in examples/ directory.

```python
async with pyrcrack.AircrackNg() as pcrack:
await pcrack.run(sys.argv[1])
# This also sets pcrack.proc as the running
# process, wich is a `Process` instance.

# get_result() is specific of AircrackNg class.
print(await pcrack.get_result())

# This will create temporary files needed, and
# cleanup process after if required.
```

There are some syntactic sugar methods, like "result_updater" on pyrcrack class.

The following example will automatically keep updating, for 10 seconds, a
meta["results"] property on pdump.

```python

import pyrcrack
import sys
import asyncio
from async_timeout import timeout

async def test(max_timeout):
async with pyrcrack.AirodumpNg() as pdump:
with suppress(asyncio.TimeoutError):
async with timeout(max_timeout):
await pdump.run(sys.argv[1])
while True:
await asyncio.sleep(1)
print(pdump.meta)
return await pdump.proc.terminate()


asyncio.run(test(10))
```


You can also list all available airmon interfaces, like so:

```python
async with pyrcrack.AirmonZc() as airmon:
print(await airmon.list_wifis())
```

This will return a nice dict with all information as is returned by airmon-zc

0 comments on commit 36eef41

Please sign in to comment.