(iface)
return RUN_CONFIG.IFACE_TO_TAKE_DOWN
Uses airmon-ng to put a device into Monitor Mode.
        Then uses the get_iface() method to retrieve the new interface's name.
        Sets global variable IFACE_TO_TAKE_DOWN as well.
        Returns the name of the interface in monitor mode.
Uses airmon-ng to put a device into Monitor Mode.
        Then uses the get_iface() method to retrieve the new interface's name.
        Sets global variable IFACE_TO_TAKE_DOWN as well.
        Returns the name of the interface in monitor mode.
Uses airmon - ng to put a device into Monitor Mode . Then uses the get_iface () method to retrieve the new interface s name . Sets global variable IFACE_TO_TAKE_DOWN as well . Returns the name of the interface in monitor mode .
def enable_monitor_mode(iface):
    """
        Uses airmon-ng to put a device into Monitor Mode.
        Then uses the get_iface() method to retrieve the new interface's name.
        Sets global variable IFACE_TO_TAKE_DOWN as well.
        Returns the name of the interface in monitor mode.
    """
    global RUN_CONFIG
    print GR+' [+]'+W+' enabling monitor mode on %s...' % (G+iface+W),
    stdout.flush()
    call(['airmon-ng', 'start', iface], stdout=DN, stderr=DN)
    print 'done'
    RUN_CONFIG.IFACE_TO_TAKE_DOWN = get_iface()
    if RUN_CONFIG.TX_POWER > 0:
        print GR+' [+]'+W+' setting Tx power to %s%s%s...' % (G, RUN_CONFIG.TX_POWER, W),
        call(['iw', 'reg', 'set', 'BO'], stdout=OUTLOG, stderr=ERRLOG)
        call(['iwconfig', iface, 'txpower', RUN_CONFIG.TX_POWER], stdout=OUTLOG, stderr=ERRLOG)
        print 'done'
    return RUN_CONFIG.IFACE_TO_TAKE_DOWN
def enable_monitor_mode ( iface ) : global RUN_CONFIG print GR + ' [+]' + W + ' enabling monitor mode on %s...' % ( G + iface + W ) , stdout . flush ( ) call ( [ 'airmon-ng' , 'start' , iface ] , stdout = DN , stderr = DN ) print 'done' RUN_CONFIG . IFACE_TO_TAKE_DOWN = get_iface ( ) if RUN_CONFIG . TX_POWER > 0 : print GR + ' [+]' + W + ' setting Tx power to %s%s%s...' % ( G , RUN_CONFIG . TX_POWER , W ) , call ( [ 'iw' , 'reg' , 'set' , 'BO' ] , stdout = OUTLOG , stderr = ERRLOG ) call ( [ 'iwconfig' , iface , 'txpower' , RUN_CONFIG . TX_POWER ] , stdout = OUTLOG , stderr = ERRLOG ) print 'done' return RUN_CONFIG . IFACE_TO_TAKE_DOWN