(iface)
return True
Attempts to solve "Unknown error 132" common with RTL8187 devices.
        Puts down interface, unloads/reloads driver module, then puts iface back up.
        Returns True if fix was attempted, False otherwise.
Attempts to solve "Unknown error 132" common with RTL8187 devices.
        Puts down interface, unloads/reloads driver module, then puts iface back up.
        Returns True if fix was attempted, False otherwise.
Attempts to solve Unknown error 132 common with RTL8187 devices . Puts down interface unloads / reloads driver module then puts iface back up . Returns True if fix was attempted False otherwise .
def rtl8187_fix(iface):
    """
        Attempts to solve "Unknown error 132" common with RTL8187 devices.
        Puts down interface, unloads/reloads driver module, then puts iface back up.
        Returns True if fix was attempted, False otherwise.
    """
    # Check if current interface is using the RTL8187 chipset
    proc_airmon = Popen(['airmon-ng'], stdout=PIPE, stderr=DN)
    proc_airmon.wait()
    using_rtl8187 = False
    for line in proc_airmon.communicate()[0].split():
        line = line.upper()
        if line.strip() == '' or line.startswith('INTERFACE'): continue
        if line.find(iface.upper()) and line.find('RTL8187') != -1: using_rtl8187 = True
    
    if not using_rtl8187: 
        # Display error message and exit
        print R+' [!]'+O+' unable to generate airodump-ng CSV file'+W
        print R+' [!]'+O+' you may want to disconnect/reconnect your wifi device'+W
        exit_gracefully(1)
    
    print O+" [!]"+W+" attempting "+O+"RTL8187 'Unknown Error 132'"+W+" fix..."
    
    original_iface = iface
    # Take device out of monitor mode
    airmon = Popen(['airmon-ng', 'stop', iface], stdout=PIPE, stderr=DN)
    airmon.wait()
    for line in airmon.communicate()[0].split('\n'):
        if line.strip() == '' or \
           line.startswith("Interface") or \
           line.find('(removed)') != -1:
            continue
        original_iface = line.split()[0] # line[:line.find('\t')]
    
    # Remove drive modules, block/unblock ifaces, probe new modules.
    print_and_exec(['ifconfig', original_iface, 'down'])
    print_and_exec(['rmmod', 'rtl8187'])
    print_and_exec(['rfkill', 'block', 'all'])
    print_and_exec(['rfkill', 'unblock', 'all'])
    print_and_exec(['modprobe', 'rtl8187'])
    print_and_exec(['ifconfig', original_iface, 'up'])
    print_and_exec(['airmon-ng', 'start', original_iface])
    
    print '\r                                                        \r',
    print O+' [!] '+W+'restarting scan...\n'
    
    return True
def rtl8187_fix ( iface ) : # Check if current interface is using the RTL8187 chipset proc_airmon = Popen ( [ 'airmon-ng' ] , stdout = PIPE , stderr = DN ) proc_airmon . wait ( ) using_rtl8187 = False for line in proc_airmon . communicate ( ) [ 0 ] . split ( ) : line = line . upper ( ) if line . strip ( ) == '' or line . startswith ( 'INTERFACE' ) : continue if line . find ( iface . upper ( ) ) and line . find ( 'RTL8187' ) != - 1 : using_rtl8187 = True if not using_rtl8187 : # Display error message and exit print R + ' [!]' + O + ' unable to generate airodump-ng CSV file' + W print R + ' [!]' + O + ' you may want to disconnect/reconnect your wifi device' + W exit_gracefully ( 1 ) print O + " [!]" + W + " attempting " + O + "RTL8187 'Unknown Error 132'" + W + " fix..." original_iface = iface # Take device out of monitor mode airmon = Popen ( [ 'airmon-ng' , 'stop' , iface ] , stdout = PIPE , stderr = DN ) airmon . wait ( ) for line in airmon . communicate ( ) [ 0 ] . split ( '\n' ) : if line . strip ( ) == '' or line . startswith ( "Interface" ) or line . find ( '(removed)' ) != - 1 : continue original_iface = line . split ( ) [ 0 ] # line[:line.find('\t')] # Remove drive modules, block/unblock ifaces, probe new modules. print_and_exec ( [ 'ifconfig' , original_iface , 'down' ] ) print_and_exec ( [ 'rmmod' , 'rtl8187' ] ) print_and_exec ( [ 'rfkill' , 'block' , 'all' ] ) print_and_exec ( [ 'rfkill' , 'unblock' , 'all' ] ) print_and_exec ( [ 'modprobe' , 'rtl8187' ] ) print_and_exec ( [ 'ifconfig' , original_iface , 'up' ] ) print_and_exec ( [ 'airmon-ng' , 'start' , original_iface ] ) print '\r                                                        \r' , print O + ' [!] ' + W + 'restarting scan...\n' return True