Welcome to Airoscript-ng’s documentation!¶
Contents:
Airoscript-ng¶



Airoscript-ng python complete implementation
- Free software: GNU GENERAL PUBLIC LICENSE 2
- Documentation: http://airoscript-ng.readthedocs.org/en/master
Features¶
- Dynamic aircrack-ng API generation (under airoscriptng.aircrack)
- Threaded execution
- Hackability assesment
- Scanning provides a list of best wireless hacking techniques
- Session control (for better process control)
- Wireless monitor interfaces are nicely handled and reused if neccesary
- XMLRPC server implementation
TODO¶
- Better parameter parsing & format for aircrack-ng parameters file, read them from manpages
- Implement attacks on airoscript-ng class
- Implement cracking (and control of it, once cracked stop all attacks against that network)
- Build a user interface (probably more than one)
Installation¶
At the command line:
$ easy_install airoscriptng
Or, if you have virtualenvwrapper installed:
$ mkvirtualenv airoscriptng
$ pip install airoscriptng
Usage¶
To use Airoscript-ng in a project:
import airoscriptng
From there, you’ll have access to session managers and airoscript basic object.
You can also launch main airoscript-ng XMLRPC server just by executing airoscriptng script directly or calling the binary:
airoscriptngxmlrpc
Contributing¶
Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.
You can contribute in many ways:
Types of Contributions¶
Report Bugs¶
Report bugs at https://github.com/XayOn/airoscriptng/issues.
If you are reporting a bug, please include:
- Your operating system name and version.
- Any details about your local setup that might be helpful in troubleshooting.
- Detailed steps to reproduce the bug.
Fix Bugs¶
Look through the GitHub issues for bugs. Anything tagged with “bug” is open to whoever wants to implement it.
Implement Features¶
Look through the GitHub issues for features. Anything tagged with “feature” is open to whoever wants to implement it.
Write Documentation¶
Airoscript-ng could always use more documentation, whether as part of the official Airoscript-ng docs, in docstrings, or even on the web in blog posts, articles, and such.
Submit Feedback¶
The best way to send feedback is to file an issue at https://github.com/XayOn/airoscriptng/issues.
If you are proposing a feature:
- Explain in detail how it would work.
- Keep the scope as narrow as possible, to make it easier to implement.
- Remember that this is a volunteer-driven project, and that contributions are welcome :)
Get Started!¶
Ready to contribute? Here’s how to set up airoscriptng for local development.
Fork the airoscriptng repo on GitHub.
Clone your fork locally:
$ git clone git@github.com:your_name_here/airoscriptng.git
Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development:
$ mkvirtualenv airoscriptng $ cd airoscriptng/ $ python setup.py develop
Create a branch for local development:
$ git checkout -b name-of-your-bugfix-or-feature
Now you can make your changes locally.
When you’re done making changes, check that your changes pass flake8 and the tests, including testing other Python versions with tox:
$ flake8 airoscriptng tests $ python setup.py test $ tox
To get flake8 and tox, just pip install them into your virtualenv.
Commit your changes and push your branch to GitHub:
$ git add . $ git commit -m "Your detailed description of your changes." $ git push origin name-of-your-bugfix-or-feature
Submit a pull request through the GitHub website.
Pull Request Guidelines¶
Before you submit a pull request, check that it meets these guidelines:
- The pull request should include tests.
- If the pull request adds functionality, the docs should be updated. Put your new functionality into a function with a docstring, and add the feature to the list in README.rst.
- The pull request should work for Python 2.7. Check https://travis-ci.org/XayOn/airoscriptng/pull_requests and make sure that the tests pass for all supported Python versions.
Credits¶
Development Lead¶
- David Francos Cuartero <me@davidfrancos.net>
Contributors¶
None yet. Why not be the first?
History¶
0.0.4 (2015-09-01)¶
- Bugfix on target handling
- Bugfix on basic cracking
- First attack (deauth) implemented
- Added lots of parameters to parameter json file
0.0.3 (2015-09-01)¶
- Improved parameter handling
- Implemented basic cracking
- First attack scheduled for v0.4
0.0.2 (2015-08-01)¶
- First usable thing, still no attacks
- “Hackability” property for aps
- Integrated clients on AP object
- External plugin support
- Reaver support
- XMLRPC Working
- General cleanup
0.0.1 (2014-12-26)¶
- First release, monitor mode and scanning working
airoscriptng¶
airoscriptng package¶
Subpackages¶
Submodules¶
airoscriptng.aircrack module¶
- class airoscriptng.aircrack.Aircrack(attributes={})[source]¶
Bases: object
Exports a method foreach aircrack-ng binary that gets an OrderedDict with the desired parameters as argument.
Those parameters must match the ones specified in the json parameter file
- exception airoscriptng.aircrack.AircrackError[source]¶
Bases: exceptions.Exception
Base aircrack exception
- class airoscriptng.aircrack.AircrackSession(attributes={})[source]¶
Bases: airoscriptng.aircrack.Aircrack
Each session should have one or many aircrack-ng objects. An aircrack-ng object should be able to execute ONE of EACH aircrack-ng suite processes.
TODO: - Add some exceptions, there are processes of what we might
want to have multiple instances running
- callback(result)[source]¶
- Remove the finished process from self.executing.
- Then execute the user-defined callback if exists.
- Otherwise just log output
- execute(*args, **kwargs)[source]¶
Execute aircrack-ng command.
- Parse parameters
- Set up default callback
- Check that proccess is not executing already
- Then execute launch method.
- executing = {}¶
- class airoscriptng.aircrack.Executor(command='airmon-ng', _parameters={}, callback=False, shell=False, direct=False)[source]¶
Bases: object
Executor objects gets created to manage aircrack-ng execution.
It’s called from a threadpoolexecutor, this way the future returns this as result, having control of the commands called and callback.
- airoscriptng.aircrack.parse_parameters(attributes, _parameters={}, command='airodump-ng')[source]¶
Main aircrack-ng parameter parsing from the json file is done here.
TODO: - Automatically generate the json this feeds on
Parameter format is as follows:
{ 'main_command': { 'name_in_airoscript' : ['--flag_in_aircrack', "default_value"] } }
If default_value is True, it’ll be assumed that is a flag that dont require an argument, and we want it by default enabled.
If it’s false, the same will be assumed, but will by default disabled.
All parameters can be overriden
airoscriptng.airoscriptng module¶
- class airoscriptng.airoscriptng.Airoscript[source]¶
Bases: object
Main airoscript object. Contains not-that-direct aircrack-ng interaction methods and attacks
- crack()[source]¶
Launches aircrack-ng in infinite mode against current target. :TODO: This should probably be better managed by set_target.
- do_automated_hacking()[source]¶
Tries every possible tech reported to work by hackability status.
This means that every tech must be part of THIS class. External modules (capabilities) loaded in extra_capabilities will need to have a “crack” function that will be invoked when session._capability_name_ is invoked
- end_scan()[source]¶
We send a kill signal to airodump-ng As aircrack object is not aware of this, we must manually change the status
- generic_dissasociation()[source]¶
This does a generic dissasociation attack. Meaning that this attack is both useful on WEP and WPA.
This can be used both to get ARP replays and WPA handshake.
See : http://www.aircrack-ng.org/doku.php?id=deauthentication
- get_wpa_handshake()[source]¶
Get WPA handshake, this right now is an alias for generic_dissasociation.
- on_scan_bumped(pid)[source]¶
Callback to execute each time we rebump on scan(). This schedulles a re-rebump so it’s made periodically. That’s how we’ll get periodically (each second) updated csv files
This implements the plugin system, calling on_after_scan
- pids = {}¶
- class airoscriptng.airoscriptng.AiroscriptSession(config={})[source]¶
Bases: airoscriptng.airoscriptng.Airoscript
Basic airoscriptng session object. This is the basic airoscriptng object. Handles network interfaces. Main interaction with outer world will be here.
- get_current_targets()[source]¶
Parses airodump-ng’s output file, creating a Target object for each AP found, with its currently detected clients.
- set_mon_iface(result)[source]¶
Sets monitor interface. Checks that final monitor interface is really what it should be.
- class airoscriptng.airoscriptng.AiroscriptSessionManager(wifi_iface)[source]¶
Bases: object
Airoscript-ng session manager.
We can have multiple airoscript-ng sessions running on different interfaces
Each one will have an aircrack-ng session so we can execute only one process of each kind in each interface, to avoid collisions.
A session manager object should be used on xmlrpc sessions (but a airoscript session alone can be used too)
- create_session(name=False, sleep_time=2, scan_time=2)[source]¶
Create a AiroscriptSession object and assigns it to session_list
If no name provided it will take current time (used to create monitor wireless interface)
Note that this does not setup monitor mode so we have to call the session’s setup_wifi method each time.
- class airoscriptng.airoscriptng.Target(parent=False)[source]¶
Bases: object
Target object, this represents an access point
- from_dict(dict_, clients=[])[source]¶
Do some magic, get only its clients from the client list, strip extra whitespace in properties, and get its hackability
- get_hackability()[source]¶
This assets a network hackability based on:
- Network power
- Network encryption
- WPS availability
- Dictionary availability
- is_attack_finished()[source]¶
Return if the attack is finished. This is a more complete check that is_attack_running, it has in account if the network has been cracked and if the attack has actually started.
- is_attack_running()[source]¶
Returns True if the ALL the attack processes are still executing This means that:
If part of the attack (I.E replaying) has stopped, will consider the attack finished.
If the processes don’t die after the attack is successful, it wont consider the attack finished.
That’s why we’ll combine it with is_cracked and key
airoscriptng.broken module¶
airoscriptng.pluginmanager module¶
- airoscriptng.pluginmanager.load_plugins(config_file)[source]¶
This reads a config file of a list of plugins to load. It ignores empty lines or lines beginning with a hash mark (#). It is so plugin imports are more dynamic and you don’t need to continue appending import statements to the top of a file.