--- airodump-ng.c 2006-04-24 01:29:17.578125000 +0200 +++ airodump-ng-patched.c 2006-05-01 16:28:07.531250000 +0200 @@ -1690,37 +1690,54 @@ int pid, status; struct iwreq wrq; - if( G.is_wlanng ) - { - if( ( pid = fork() ) == 0 ) - { - close( 0 ); close( 1 ); close( 2 ); chdir( "/" ); - execlp( "wlanctl-ng", "wlanctl-ng", interface, - "lnxreq_wlansniff", "enable=true", - "prismheader=true", "wlanheader=false", - "stripfcs=true", "keepwepflags=true", NULL ); - exit( 1 ); - } - - waitpid( pid, &status, 0 ); - - if( WIFEXITED(status) ) - return( WEXITSTATUS(status) ); - return( 1 ); - } - - memset( &wrq, 0, sizeof( struct iwreq ) ); - strncpy( wrq.ifr_name, interface, IFNAMSIZ ); - wrq.u.mode = IW_MODE_MONITOR; - - if( ioctl( fd_raw, SIOCSIWMODE, &wrq ) < 0 ) - { - perror( "ioctl(SIOCSIWMODE) failed" ); - return( 1 ); - } - - set_channel( interface, fd_raw, 10 ); - + if( strcmp(interface,"prism0") == 0 ) + { + if( ( pid = fork() ) == 0 ) + { + close( 0 ); close( 1 ); close( 2 ); chdir( "/" ); + execlp( "wl", "wl", "monitor", "1", NULL); + exit( 1 ); + } + waitpid(pid, &status,0); + if( WIFEXITED(status) ) + return( WEXITSTATUS(status) ); + return( 1 ); + } + else + { + if( G.is_wlanng ) + { + if( ( pid = fork() ) == 0 ) + { + close( 0 ); close( 1 ); close( 2 ); chdir( "/" ); + execlp( "wlanctl-ng", "wlanctl-ng", interface, + "lnxreq_wlansniff", "enable=true", + "prismheader=true", "wlanheader=false", + "stripfcs=true", "keepwepflags=true", NULL ); + exit( 1 ); + } + + waitpid( pid, &status, 0 ); + + if( WIFEXITED(status) ) + return( WEXITSTATUS(status) ); + return( 1 ); + } + + memset( &wrq, 0, sizeof( struct iwreq ) ); + strncpy( wrq.ifr_name, interface, IFNAMSIZ ); + wrq.u.mode = IW_MODE_MONITOR; + + if( ioctl( fd_raw, SIOCSIWMODE, &wrq ) < 0 ) + { + perror( "ioctl(SIOCSIWMODE) failed" ); + return( 1 ); + } + + } + + set_channel( interface, fd_raw, 10 ); + return( 0 ); }