diff --git a/py/Airmon.py b/py/Airmon.py index 2480ace..f12706c 100644 --- a/py/Airmon.py +++ b/py/Airmon.py @@ -246,14 +246,19 @@ class Airmon(object): continue match = re.search('^[ \t]*(\d+)[ \t]*([a-zA-Z0-9_\-]+)[ \t]*$', line) if match: - # Found process to kill + # Found process pid = match.groups()[0] pname = match.groups()[1] - Color.pl('{!} {R}terminating {O}conflicting process' + - ' {R}%s{O} (PID {R}%s{O})' % (pname, pid)) - os.kill(int(pid), signal.SIGTERM) - if pname == 'NetworkManager': - Airmon.killed_network_manager= True + if Configuration.kill_conflicting_processes: + Color.pl('{!} {R}terminating {O}conflicting process {R}%s{O} (PID {R}%s{O})' % (pname, pid)) + os.kill(int(pid), signal.SIGTERM) + if pname == 'NetworkManager': + Airmon.killed_network_manager= True + else: + Color.pl('{!} {O}conflicting process: {R}%s{O} (PID {R}%s{O})' % (pname, pid)) + + if not Configuration.kill_conflicting_processes: + Color.pl('{!} {O}if you have problems, try killing these processes ({R}kill -9 PID{O}){W}') @staticmethod def put_interface_up(iface): diff --git a/py/Arguments.py b/py/Arguments.py index 36ece63..3fb6b2e 100644 --- a/py/Arguments.py +++ b/py/Arguments.py @@ -17,65 +17,67 @@ class Arguments(object): # Global variables glob = parser.add_argument_group('SETTINGS') + glob.add_argument('-i', action='store', dest='interface', metavar='[interface]', type=str, help=Color.s('Wireless interface to use (default: {G}ask{W})')) + + glob.add_argument('--kill', + action='store_true', + dest='kill_conflicting_processes', + help=Color.s('Kill processes that conflict with Airmon/Airodump (default: {G}off{W})')) + + glob.add_argument('--channel', help=argparse.SUPPRESS, action='store', dest='channel', type=int) glob.add_argument('-c', action='store', dest='channel', metavar='[channel]', type=int, help=Color.s('Wireless channel to scan (default: {G}all channels{W})')) - glob.add_argument('--channel', help=argparse.SUPPRESS, action='store', dest='channel', type=int) + glob.add_argument('-mac', '---random-mac', action='store_true', dest='random_mac', help=Color.s('Randomize wireless card MAC address (default: {G}off{W})')) + glob.add_argument('-5', '--5ghz', action='store_true', dest='five_ghz', help=Color.s('Include 5Ghz channels (default: {G}off{W})')) + + glob.add_argument('--bssid', help=argparse.SUPPRESS, action='store', dest='target_bssid', type=str) glob.add_argument('-b', action='store', dest='target_bssid', metavar='[bssid]', type=str, help=Color.s('BSSID (e.g. {GR}AA:BB:CC:DD:EE:FF{W}) of access point to attack')) - glob.add_argument('--bssid', help=argparse.SUPPRESS, action='store', dest='target_bssid', type=str) + + glob.add_argument('--essid', help=argparse.SUPPRESS, action='store', dest='target_essid', type=str) glob.add_argument('-e', action='store', dest='target_essid', metavar='[essid]', type=str, help=Color.s('ESSID (e.g. {GR}NETGEAR07{W}) of access point to attack')) - glob.add_argument('--essid', help=argparse.SUPPRESS, action='store', dest='target_essid', type=str) + glob.add_argument('--showb', action='store_true', dest='show_bssids', help=Color.s('Show BSSIDs of targets while scanning')) - glob.add_argument('-v', - '--verbose', - action='count', - default=0, - dest='verbose', - help=Color.s('Verbose mode, prints more lines (default: {G}quiet{W})')) + glob.add_argument('--nodeauths', action='store_true', dest='no_deauth', help=Color.s('Do not deauthenticate clients *EVER* (default: {G}off{W})')) - glob.add_argument('--no-deauths', - action='store_true', - dest='no_deauth', - help=argparse.SUPPRESS) - glob.add_argument('-nd', - action='store_true', - dest='no_deauth', - help=argparse.SUPPRESS) + glob.add_argument('--no-deauths', action='store_true', dest='no_deauth', help=argparse.SUPPRESS) + glob.add_argument('-nd', action='store_true', dest='no_deauth', help=argparse.SUPPRESS) + glob.add_argument('--num-deauths', action='store', type=int, @@ -83,6 +85,8 @@ class Arguments(object): metavar="[num]", default=None, help=Color.s('Number of deauth packets to send (default: {G}%d{W})' % Configuration.num_deauths)) + + glob.add_argument('--pillage', help=argparse.SUPPRESS, action='store', dest='scan_time', nargs='?', const=10, type=int) glob.add_argument('-p', action='store', dest='scan_time', @@ -91,7 +95,13 @@ class Arguments(object): metavar='scantime', type=int, help=Color.s('{G}Pillage{W}: Attack all targets after {C}scantime{W} seconds')) - glob.add_argument('--pillage', help=argparse.SUPPRESS, action='store', dest='scan_time', nargs='?', const=10, type=int) + + glob.add_argument('-v', + '--verbose', + action='count', + default=0, + dest='verbose', + help=Color.s('Verbose mode, prints more lines (default: {G}quiet{W})')) # WEP wep = parser.add_argument_group('WEP-RELATED') diff --git a/py/Configuration.py b/py/Configuration.py index 5c07ebe..bcdb54f 100644 --- a/py/Configuration.py +++ b/py/Configuration.py @@ -28,6 +28,8 @@ class Configuration(object): Configuration.verbose = 0 # Verbosity level. + Configuration.kill_conflicting_processes = False + Configuration.scan_time = 0 # Time to wait before attacking all targets Configuration.all_targets = False # Run attacks against all targets automatically @@ -149,7 +151,9 @@ class Configuration(object): if args.verbose: Configuration.verbose = args.verbose Color.pl('{+} {C}option:{W} verbosity level {G}%d{W}' % args.verbose) - + if args.kill_conflicting_processes: + Configuration.kill_conflicting_processes = True + Color.pl('{+} {C}option:{W} kill conflicting processes {G}enabled{W}') # WEP if args.wep_filter: