Skip to content

Commit

Permalink
Added most aircrack-ng suite commands
Browse files Browse the repository at this point in the history
- Airbase
- Airdecap
- Airdecloack
- Aireplay
- Airmon-ng and Airmon-zc
  • Loading branch information
XayOn committed Feb 9, 2018
1 parent b98eec1 commit f77593a
Show file tree
Hide file tree
Showing 6 changed files with 221 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pyrcrack/__init__.py
Expand Up @@ -3,3 +3,8 @@
Aircrack-NG python bindings
"""
from .aircrack import AircrackNg # noqa
from .airdecap import AirdecapNg # noqa
from .aireplay import AireplayNg # noqa
from .airmon import AirmonNg, AirmonZc # noqa
from .airbase import AirbaseNg # noqa
from .airdecloack import AirdecloackNg # noqa
58 changes: 58 additions & 0 deletions pyrcrack/airbase.py
@@ -0,0 +1,58 @@
"""Airbase-ng."""

from .executor import ExecutorHelper


class AirbaseNg(ExecutorHelper):
"""Airbase-ng 1.2 beta3 - (C) 2008-2013 Thomas d'Otreppe.
Original work: Martin Beck
http://www.aircrack-ng.org
usage: airbase-ng <options> <replay interface>
Options:
-a bssid : set Access Point MAC address
-i iface : capture packets from this interface
-w WEP key : use this WEP key to en-/decrypt packets
-h MAC : source mac for MITM mode
-f disallow : disallow specified client MACs (default: allow)
-W 0|1 : [don't] set WEP flag in beacons 0|1 (default: auto)
-q : quiet (do not print statistics)
-v : verbose (print more messages)
-A : Ad-Hoc Mode (allows other clients to peer)
-Y in|out|both : external packet processing
-c channel : sets the channel the AP is running on
-X : hidden ESSID
-s : force shared key authentication (default: auto)
-S : set shared key challenge length (default: 128)
-L : Caffe-Latte WEP attack
(use if driver can't send frags)
-N : cfrag WEP attack (recommended)
-x nbpps : number of packets per second (default: 100)
-y : disables responses to broadcast probes
-0 : set all WPA,WEP,open tags.
can't be used with -z & -Z
-z type : sets WPA1 tags. 1=WEP40 2=TKIP 3=WRAP
4=CCMP 5=WEP104
-Z type : same as -z, but for WPA2
-V type : fake EAPOL 1=MD5 2=SHA1 3=auto
-F prefix : write all sent and received frames into pcap file
-P : respond to all probes, even when specifying ESSIDs
-I interval : sets the beacon interval value in ms
-C seconds : enables beaconing of probed ESSID values
(requires -P)
Filter options:
--bssid MAC : BSSID to filter/use
--bssids file : read a list of BSSIDs out of that file
--client MAC : MAC of client to filter
--clients file : read a list of MACs out of that file
--essid ESSID : specify a single ESSID (default: default)
--essids file : read a list of ESSIDs out of that file
--help : Displays this usage screen
"""
command = 'airbase-ng'
sync = True
25 changes: 25 additions & 0 deletions pyrcrack/airdecap.py
@@ -0,0 +1,25 @@
"""Airdecap-ng."""
from .executor import ExecutorHelper


class AirdecapNg(ExecutorHelper):
"""Airdecap-ng 1.2 beta3 - (C) 2006-2013 Thomas d'Otreppe
http://www.aircrack-ng.org
Usage: airdecap-ng [options] <pcap file>
Options:
-l : don't remove the 802.11 header
-b <bssid> : access point MAC address filter
-e <essid> : target network SSID
-w <key> : target network WEP key in hex
-p <pass> : target network WPA passphrase
-k <pmk> : WPA Pairwise Master Key in hex
--help : Displays this usage screen
"""

command = 'airdecap-ng'
sync = False
39 changes: 39 additions & 0 deletions pyrcrack/airdecloack.py
@@ -0,0 +1,39 @@
"""Airdecloack-ng."""

from .executor import ExecutorHelper


class AirdecloackNg(ExecutorHelper):
"""Airdecloak-ng 1.2 beta3 - (C) 2008-2013 Thomas d'Otreppe.
http://www.aircrack-ng.org
usage: airdecloak-ng -i=<file> [Options]
Options:
-i <file> : Input capture file
--ssid <ESSID> : ESSID of the network to filter
--bssid <BSSID> : BSSID of the network to filter
--filters <filters> : Apply filters (separated by a comma). Filters:
signal: Try to filter based on signal.
duplicate_sn: Remove all duplicate sequence numbers
for both the AP and the client.
duplicate_sn_ap: Remove duplicate sequence number for
the AP only.
duplicate_sn_client: Remove duplicate sequence number for the
client only.
consecutive_sn: Filter based on the fact that IV should
be consecutive (only for AP).
duplicate_iv: Remove all duplicate IV.
signal_dup_consec_sn: Use signal (if available), duplicate and
consecutive sequence number (filtering is
much more precise than using all these
filters one by one).
--null-packets : Assume that null packets can be cloaked.
--disable-base_filter : Do not apply base filter.
--drop-frag : Drop fragmented packets
--help : Displays this usage screen
"""
command = "airdecloack-ng"
sync = False
63 changes: 63 additions & 0 deletions pyrcrack/aireplay.py
@@ -0,0 +1,63 @@
"""Aireplay-ng"""

from .executor import ExecutorHelper


class AireplayNg(ExecutorHelper):
"""
Aireplay-ng 1.2 beta3 - (C) 2006-2013 Thomas d'Otreppe
http://www.aircrack-ng.org
Usage: aireplay-ng <options> <replay_interface>
Options:
-b bssid : MAC address, Access Point
-d dmac : MAC address, Destination
-s smac : MAC address, Source
-m len : minimum packet length
-n len : maximum packet length
-u type : frame control, type field
-v subt : frame control, subtype field
-t tods : frame control, To DS bit
-f fromds : frame control, From DS bit
-w iswep : frame control, WEP bit
-D : disable AP detection
-x nbpps : number of packets per second
-p fctrl : set frame control word (hex)
-a bssid : set Access Point MAC address
-c dmac : set Destination MAC address
-h smac : set Source MAC address
-g value : change ring buffer size (default: 8)
-F : choose first matching packet
-e essid : set target AP SSID
-o npckts : number of packets per burst (0=auto, default: 1)
-q sec : seconds between keep-alives
-Q : send reassociation requests
-y prga : keystream for shared key auth
-T n : exit after retry fake auth request n time
-j : inject FromDS packets
-k IP : set destination IP in fragments
-l IP : set source IP in fragments
-B : activates the bitrate test
-i iface : capture packets from this interface
-r file : extract packets from this pcap file
-R : disable /dev/rtc usage
--ignore-negative-one : if the interface's channel can't be determined
ignore the mismatch
--deauth count : deauthenticate 1 or all stations (-0)
--fakeauth delay : fake authentication with AP (-1)
--interactive : interactive frame selection (-2)
--arpreplay : standard ARP-request replay (-3)
--chopchop : decrypt/chopchop WEP packet (-4)
--fragment : generates valid keystream (-5)
--caffe-latte : query a client for new IVs (-6)
--cfrag : fragments against a client (-7)
--migmode : attacks WPA migration mode (-8)
--test : tests injection and quality (-9)
--help : Displays this usage screen
"""

command = 'aireplay-ng'
sync = True
31 changes: 31 additions & 0 deletions pyrcrack/airmon.py
@@ -0,0 +1,31 @@
from .executor import ExecutorHelper


class AirmonZc(ExecutorHelper):
""" Airmon-ZC
Usage: airmon-zc <start|stop|check> <interface> [channel or frequency]
"""

command = 'airmon-zc'
sync = False

def run(self, *args, **kwargs):
"""Check argument position. Forced for this one."""
assert any(a in args[0] for a in ('start', 'stop', 'check'))
assert len(args) > 1
return super().run(*args, **kwargs)


class AirmonNg(ExecutorHelper):
""" Airmon-ZC
Usage: airmon-zc <start|stop|check> <interface> [channel or frequency]
"""

command = 'airmon-ng'
sync = False

def run(self, *args, **kwargs):
"""Check argument position. Forced for this one."""
assert any(a in args[0] for a in ('start', 'stop', 'check'))
assert len(args) > 1
return super().run(*args, **kwargs)

0 comments on commit f77593a

Please sign in to comment.