airoscriptng package


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


Plain aircrack-ng just logs the output and calls custom user callback (hence this callback).

An aircrack-ng session handler can be used to extend this class to avoid having multiple aircrack-ng processes loose

launch(*args, **kwargs)[source]

Launch a new pool with one thread for that one process. Then we call the callback.

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.

  • Add some exceptions, there are processes of what we might

    want to have multiple instances running

  • 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.

  • 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


Launches aircrack-ng in infinite mode against current target. :TODO: This should probably be better managed by set_target.


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


We send a kill signal to airodump-ng As aircrack object is not aware of this, we must manually change the status


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 :


Get WPA handshake, this right now is an alias for generic_dissasociation.


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 = {}

Launches sigint to a process. In airodump-ng this means updating the csv contents


Main scanning function. Launches airodump-ng, saves its pid, and makes itself xmlrpc representable.

This implements the plugin system, calling on_before_scan

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.


Returns current targets (getter)


Deletes own monitor interface from system (cleanup)


Parses airodump-ng’s output file, creating a Target object for each AP found, with its currently detected clients.


Return mac address of the interface


Returns currently selected target, clean to send it via xmlrpc


Hack to return public methods of this object via XMLRPC

  • Make this work

Returns a list of all the available wireless networks


Return current monitor interface name


Sets monitor interface. Checks that final monitor interface is really what it should be.


This way we only have to do something like = current_targets[10] and it’ll automatically make an object from it.


Starts monitor mode interface and checks it’s ok.

  • Injection test.

Returns currently selected target (getter)

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.


XMLRPC method returning a specific session object.

class airoscriptng.airoscriptng.Target(parent=False)[source]

Bases: object

Target object, this represents an access point


kill all related PIDS and clean them.

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


This assets a network hackability based on:

  • Network power
  • Network encryption
  • WPS availability
  • Dictionary availability

XMLRPC function for key()


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.


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


If the network has been cracked we’ll save the key to a key file for that specific target. This function just asks if the network has been cracked. Possibly not going to be used as network_key returns False if not cracked.


Return network key or False if network has not been cracked.


Simple xmlrpc server for airoscriptsession. :TODO: - Make it multisession

airoscriptng.airoscriptng.clean_to_xmlrpc(element, to_clean)[source]

Cleans certain properties from dict representation of given object

airoscriptng.broken module


Return a more human-understandable name for a hackability statistic

airoscriptng.pluginmanager module


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.


This decorator is to be used for registering a function as a plugin for a specific event or list of events.

airoscriptng.pluginmanager.trigger_event(event, *args, **kwargs)[source]

Call this function to trigger an event. It will run any plugins that have registered themselves to the event. Any additional arguments or keyword arguments you pass in will be passed to the plugins.

Module contents