Changeset 242

Show
Ignore:
Timestamp:
12/23/07 18:30:10 (11 months ago)
Author:
themacuser
Message:

(The beginnings of) Leopard AE passive mode. Seems to be fine on PowerPC, but reported not quite working on Intel. Try running the app as root.

This is the first Leopard-only release.

Location:
trunk
Files:
10 modified

Legend:

Unmodified
Added
Removed
  • trunk/Resources/Nibs/English.lproj/PrefsAdvanced.nib/classes.nib

    r233 r242  
    1 { 
    2     IBClasses = ( 
    3         {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },  
    4         { 
    5             ACTIONS = {setDefaults = id; };  
    6             CLASS = PrefsAdvanced;  
    7             LANGUAGE = ObjC;  
    8             OUTLETS = { 
    9                 "ac_ff" = id;  
    10                 "bf_interval" = id;  
    11                 bpfdevice = id;  
    12                 bpfloc = id;  
    13                 kismetserverip = id;  
    14                 kismetserverport = id;  
    15                 "pr_interval" = id;  
    16                 "show_debugmenu" = id;  
    17             };  
    18             SUPERCLASS = PrefsClient;  
    19         },  
    20         { 
    21             ACTIONS = {setValueForSender = id; };  
    22             CLASS = PrefsClient;  
    23             LANGUAGE = ObjC;  
    24             OUTLETS = {controlBox = NSView; };  
    25             SUPERCLASS = NSObject;  
    26         },  
    27         { 
    28             CLASS = PrefsDriver;  
    29             LANGUAGE = ObjC;  
    30             OUTLETS = {aDriver = id; };  
    31             SUPERCLASS = PrefsClient;  
    32         },  
    33         { 
    34             CLASS = PrefsMap;  
    35             LANGUAGE = ObjC;  
    36             OUTLETS = { 
    37                 "_areaColorBad" = NSColorWell;  
    38                 "_areaColorGood" = NSColorWell;  
    39                 "_areaQual" = NSTextField;  
    40                 "_areaSens" = NSTextField;  
    41                 "_cpColor" = NSColorWell;  
    42                 "_traceColor" = NSColorWell;  
    43                 "_wpColor" = NSColorWell;  
    44             };  
    45             SUPERCLASS = PrefsClient;  
    46         } 
    47     );  
    48     IBVersion = 1;  
    49 } 
     1<?xml version="1.0" encoding="UTF-8"?> 
     2<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> 
     3<plist version="1.0"> 
     4<dict> 
     5        <key>IBClasses</key> 
     6        <array> 
     7                <dict> 
     8                        <key>CLASS</key> 
     9                        <string>NSApplication</string> 
     10                        <key>LANGUAGE</key> 
     11                        <string>ObjC</string> 
     12                        <key>SUPERCLASS</key> 
     13                        <string>NSResponder</string> 
     14                </dict> 
     15                <dict> 
     16                        <key>CLASS</key> 
     17                        <string>FirstResponder</string> 
     18                        <key>LANGUAGE</key> 
     19                        <string>ObjC</string> 
     20                        <key>SUPERCLASS</key> 
     21                        <string>NSObject</string> 
     22                </dict> 
     23                <dict> 
     24                        <key>ACTIONS</key> 
     25                        <dict> 
     26                                <key>setValueForSender</key> 
     27                                <string>id</string> 
     28                        </dict> 
     29                        <key>CLASS</key> 
     30                        <string>PrefsClient</string> 
     31                        <key>LANGUAGE</key> 
     32                        <string>ObjC</string> 
     33                        <key>OUTLETS</key> 
     34                        <dict> 
     35                                <key>controlBox</key> 
     36                                <string>NSView</string> 
     37                        </dict> 
     38                        <key>SUPERCLASS</key> 
     39                        <string>NSObject</string> 
     40                </dict> 
     41                <dict> 
     42                        <key>ACTIONS</key> 
     43                        <dict> 
     44                                <key>setDefaults</key> 
     45                                <string>id</string> 
     46                        </dict> 
     47                        <key>CLASS</key> 
     48                        <string>PrefsAdvanced</string> 
     49                        <key>LANGUAGE</key> 
     50                        <string>ObjC</string> 
     51                        <key>OUTLETS</key> 
     52                        <dict> 
     53                                <key>ac_ff</key> 
     54                                <string>id</string> 
     55                                <key>bf_interval</key> 
     56                                <string>id</string> 
     57                                <key>bpfdevice</key> 
     58                                <string>id</string> 
     59                                <key>bpfloc</key> 
     60                                <string>id</string> 
     61                                <key>kismetserverip</key> 
     62                                <string>id</string> 
     63                                <key>kismetserverport</key> 
     64                                <string>id</string> 
     65                                <key>pr_interval</key> 
     66                                <string>id</string> 
     67                                <key>show_debugmenu</key> 
     68                                <string>id</string> 
     69                        </dict> 
     70                        <key>SUPERCLASS</key> 
     71                        <string>PrefsClient</string> 
     72                </dict> 
     73        </array> 
     74        <key>IBVersion</key> 
     75        <string>1</string> 
     76</dict> 
     77</plist> 
  • trunk/Resources/Nibs/English.lproj/PrefsAdvanced.nib/info.nib

    r233 r242  
    11<?xml version="1.0" encoding="UTF-8"?> 
    2 <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> 
     2<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> 
    33<plist version="1.0"> 
    44<dict> 
    5         <key>IBDocumentLocation</key> 
    6         <string>621 52 356 240 0 0 1024 746 </string> 
    7         <key>IBEditorPositions</key> 
    8         <dict> 
    9                 <key>109</key> 
    10                 <string>165 185 501 529 0 0 1024 746 </string> 
    11         </dict> 
    125        <key>IBFramework Version</key> 
    13         <string>446.1</string> 
     6        <string>629</string> 
     7        <key>IBLastKnownRelativeProjectPath</key> 
     8        <string>../../../../KisMAC.xcodeproj</string> 
     9        <key>IBOldestOS</key> 
     10        <integer>5</integer> 
    1411        <key>IBOpenObjects</key> 
    1512        <array> 
     
    1714        </array> 
    1815        <key>IBSystem Version</key> 
    19         <string>8P135</string> 
     16        <string>9B18</string> 
     17        <key>targetFramework</key> 
     18        <string>IBCocoaFramework</string> 
    2019</dict> 
    2120</plist> 
  • trunk/Resources/Nibs/English.lproj/PrefsDriver.nib/classes.nib

    r233 r242  
    1 { 
    2     IBClasses = ( 
    3         {CLASS = ColoredRowOutlineView; LANGUAGE = ObjC; SUPERCLASS = NSOutlineView; },  
    4         {CLASS = ColoredRowTableView; LANGUAGE = ObjC; SUPERCLASS = NSTableView; },  
    5         { 
    6             ACTIONS = {"" = id; };  
    7             CLASS = FirstResponder;  
    8             LANGUAGE = ObjC;  
    9             SUPERCLASS = NSObject;  
    10         },  
    11         { 
    12             ACTIONS = {setValueForSender = id; };  
    13             CLASS = PrefsClient;  
    14             LANGUAGE = ObjC;  
    15             OUTLETS = {controlBox = NSView; };  
    16             SUPERCLASS = NSObject;  
    17         },  
    18         { 
    19             ACTIONS = { 
    20                 enableAEForever = id;  
    21                 selAddDriver = id;  
    22                 selAll = id;  
    23                 selConfigure = id;  
    24                 selNone = id;  
    25                 selRemoveDriver = id;  
    26             };  
    27             CLASS = PrefsDriver;  
    28             LANGUAGE = ObjC;  
    29             OUTLETS = { 
    30                 "_aeForever" = NSButton;  
    31                 "_chanhop" = NSBox;  
    32                 "_channelSel" = NSMatrix;  
    33                 "_driver" = NSPopUpButton;  
    34                 "_driverTable" = NSTableView;  
    35                 "_dumpDestination" = NSTextField;  
    36                 "_dumpFilter" = NSMatrix;  
    37                 "_dumpFilterBox" = NSBox;  
    38                 "_firstChannel" = NSTextField;  
    39                 "_frequence" = NSTextField;  
    40                 "_globalsettings" = NSBox;  
    41                 "_injection" = NSBox;  
    42                 "_injectionDevice" = NSButton;  
    43                 "_kdrone_settings" = NSBox;  
    44                 "_kismet_host" = NSTextField;  
    45                 "_kismet_port" = NSTextField;  
    46                 "_removeDriver" = NSButton;  
    47                 "_savedumpsat" = NSBox;  
    48                 "_selAll" = NSButton;  
    49                 "_selNone" = NSButton;  
    50             };  
    51             SUPERCLASS = PrefsClient;  
    52         },  
    53         { 
    54             CLASS = PrefsMap;  
    55             LANGUAGE = ObjC;  
    56             OUTLETS = { 
    57                 "_cpColor" = NSColorWell;  
    58                 "_traceColor" = NSColorWell;  
    59                 "_wpColor" = NSColorWell;  
    60             };  
    61             SUPERCLASS = PrefsClient;  
    62         } 
    63     );  
    64     IBVersion = 1;  
    65 } 
     1<?xml version="1.0" encoding="UTF-8"?> 
     2<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> 
     3<plist version="1.0"> 
     4<dict> 
     5        <key>IBClasses</key> 
     6        <array> 
     7                <dict> 
     8                        <key>ACTIONS</key> 
     9                        <dict> 
     10                                <key>enableAEForever</key> 
     11                                <string>id</string> 
     12                                <key>selAddDriver</key> 
     13                                <string>id</string> 
     14                                <key>selAll</key> 
     15                                <string>id</string> 
     16                                <key>selConfigure</key> 
     17                                <string>id</string> 
     18                                <key>selNone</key> 
     19                                <string>id</string> 
     20                                <key>selRemoveDriver</key> 
     21                                <string>id</string> 
     22                        </dict> 
     23                        <key>CLASS</key> 
     24                        <string>PrefsDriver</string> 
     25                        <key>LANGUAGE</key> 
     26                        <string>ObjC</string> 
     27                        <key>OUTLETS</key> 
     28                        <dict> 
     29                                <key>_aeForever</key> 
     30                                <string>NSButton</string> 
     31                                <key>_chanhop</key> 
     32                                <string>NSBox</string> 
     33                                <key>_channelSel</key> 
     34                                <string>NSMatrix</string> 
     35                                <key>_driver</key> 
     36                                <string>NSPopUpButton</string> 
     37                                <key>_driverTable</key> 
     38                                <string>NSTableView</string> 
     39                                <key>_dumpDestination</key> 
     40                                <string>NSTextField</string> 
     41                                <key>_dumpFilter</key> 
     42                                <string>NSMatrix</string> 
     43                                <key>_dumpFilterBox</key> 
     44                                <string>NSBox</string> 
     45                                <key>_firstChannel</key> 
     46                                <string>NSTextField</string> 
     47                                <key>_frequence</key> 
     48                                <string>NSTextField</string> 
     49                                <key>_globalsettings</key> 
     50                                <string>NSBox</string> 
     51                                <key>_injection</key> 
     52                                <string>NSBox</string> 
     53                                <key>_injectionDevice</key> 
     54                                <string>NSButton</string> 
     55                                <key>_kdrone_settings</key> 
     56                                <string>NSBox</string> 
     57                                <key>_kismet_host</key> 
     58                                <string>NSTextField</string> 
     59                                <key>_kismet_port</key> 
     60                                <string>NSTextField</string> 
     61                                <key>_removeDriver</key> 
     62                                <string>NSButton</string> 
     63                                <key>_savedumpsat</key> 
     64                                <string>NSBox</string> 
     65                                <key>_selAll</key> 
     66                                <string>NSButton</string> 
     67                                <key>_selNone</key> 
     68                                <string>NSButton</string> 
     69                        </dict> 
     70                        <key>SUPERCLASS</key> 
     71                        <string>PrefsClient</string> 
     72                </dict> 
     73                <dict> 
     74                        <key>CLASS</key> 
     75                        <string>NSApplication</string> 
     76                        <key>LANGUAGE</key> 
     77                        <string>ObjC</string> 
     78                        <key>SUPERCLASS</key> 
     79                        <string>NSResponder</string> 
     80                </dict> 
     81                <dict> 
     82                        <key>CLASS</key> 
     83                        <string>ColoredRowTableView</string> 
     84                        <key>LANGUAGE</key> 
     85                        <string>ObjC</string> 
     86                        <key>SUPERCLASS</key> 
     87                        <string>NSTableView</string> 
     88                </dict> 
     89                <dict> 
     90                        <key>ACTIONS</key> 
     91                        <dict> 
     92                                <key></key> 
     93                                <string>id</string> 
     94                        </dict> 
     95                        <key>CLASS</key> 
     96                        <string>FirstResponder</string> 
     97                        <key>LANGUAGE</key> 
     98                        <string>ObjC</string> 
     99                        <key>SUPERCLASS</key> 
     100                        <string>NSObject</string> 
     101                </dict> 
     102                <dict> 
     103                        <key>ACTIONS</key> 
     104                        <dict> 
     105                                <key>setValueForSender</key> 
     106                                <string>id</string> 
     107                        </dict> 
     108                        <key>CLASS</key> 
     109                        <string>PrefsClient</string> 
     110                        <key>LANGUAGE</key> 
     111                        <string>ObjC</string> 
     112                        <key>OUTLETS</key> 
     113                        <dict> 
     114                                <key>controlBox</key> 
     115                                <string>NSView</string> 
     116                        </dict> 
     117                        <key>SUPERCLASS</key> 
     118                        <string>NSObject</string> 
     119                </dict> 
     120        </array> 
     121        <key>IBVersion</key> 
     122        <string>1</string> 
     123</dict> 
     124</plist> 
  • trunk/Resources/Nibs/English.lproj/PrefsDriver.nib/info.nib

    r233 r242  
    11<?xml version="1.0" encoding="UTF-8"?> 
    2 <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> 
     2<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> 
    33<plist version="1.0"> 
    44<dict> 
    5         <key>IBDocumentLocation</key> 
    6         <string>119 29 356 240 0 0 1024 746 </string> 
    7         <key>IBEditorPositions</key> 
    8         <dict> 
    9                 <key>109</key> 
    10                 <string>264 147 495 589 0 0 1024 746 </string> 
    11         </dict> 
    125        <key>IBFramework Version</key> 
    13         <string>446.1</string> 
     6        <string>629</string> 
     7        <key>IBLastKnownRelativeProjectPath</key> 
     8        <string>../../../../KisMAC.xcodeproj</string> 
     9        <key>IBOldestOS</key> 
     10        <integer>5</integer> 
    1411        <key>IBOpenObjects</key> 
    1512        <array> 
     
    1714        </array> 
    1815        <key>IBSystem Version</key> 
    19         <string>8P135</string> 
     16        <string>9B18</string> 
     17        <key>targetFramework</key> 
     18        <string>IBCocoaFramework</string> 
    2019</dict> 
    2120</plist> 
  • trunk/Sources/Controller/ScanController.m

    r238 r242  
    9595        [NSNumber numberWithInt:2], @"WaveNetAvgTime", 
    9696        [NSArray array], @"ActiveDrivers", 
    97         [NSNumber numberWithBool: NO], @"aeForever", 
    9897                [NSNumber numberWithBool: NO], @"useWebService", 
    9998        [NSNumber numberWithBool: NO], @"useWebServiceAutomatically", 
     
    101100        [NSNumber numberWithInt:2], @"ac_ff",  
    102101        [NSNumber numberWithFloat:0.1], @"bf_interval", 
    103         @"wlt1", @"bpfdevice",  
     102        @"en1", @"scandevice",  
    104103        @"/dev/bpf0", @"bpfloc", 
    105104        [NSNumber numberWithInt:100], @"pr_interval", 
  • trunk/Sources/Preferences/PreferencePanes/PrefsAdvanced.m

    r233 r242  
    1414    [ac_ff setIntValue:[[controller objectForKey:@"ac_ff"]intValue]]; 
    1515        [bf_interval setFloatValue:[[controller objectForKey:@"bf_interval"] intValue]]; 
    16         [bpfdevice setStringValue:[controller objectForKey:@"bpfdevice"]]; 
     16        [bpfdevice setStringValue:[controller objectForKey:@"scandevice"]]; 
    1717        [bpfloc setStringValue:[controller objectForKey:@"bpfloc"]]; 
    1818        [pr_interval setIntValue:[[controller objectForKey:@"pr_interval"] intValue]]; 
     
    2323        [controller setObject:[NSNumber numberWithInt:[ac_ff intValue]] forKey:@"ac_ff"]; 
    2424        [controller setObject:[NSNumber numberWithFloat:[bf_interval floatValue]] forKey:@"bf_interval"]; 
    25         [controller setObject:[bpfdevice stringValue] forKey:@"bpfdevice"]; 
     25        [controller setObject:[bpfdevice stringValue] forKey:@"scandevice"]; 
    2626        [controller setObject:[bpfloc stringValue] forKey:@"bpfloc"]; 
    2727        [controller setObject:[NSNumber numberWithInt:[pr_interval intValue]] forKey:@"pr_interval"]; 
     
    3636                [controller setObject:[NSNumber numberWithFloat:[bf_interval floatValue]] forKey:@"bf_interval"]; 
    3737    } else if(sender == bpfdevice) { 
    38                 [controller setObject:[bpfdevice stringValue] forKey:@"bpfdevice"]; 
     38                [controller setObject:[bpfdevice stringValue] forKey:@"scandevice"]; 
    3939    } else if(sender == bpfloc) { 
    4040                [controller setObject:[bpfloc stringValue] forKey:@"bpfloc"]; 
     
    5151        [ac_ff setIntValue:2]; 
    5252        [bf_interval setFloatValue:0.1]; 
    53         [bpfdevice setStringValue:@"wlt1"]; 
     53        [bpfdevice setStringValue:@"en1"]; 
    5454        [bpfloc setStringValue:@"/dev/bpf0"]; 
    5555        [pr_interval setIntValue:100]; 
  • trunk/Sources/Preferences/PreferencePanes/PrefsDriver.h

    r233 r242  
    3030        IBOutlet NSTextField    *_kismet_host; 
    3131        IBOutlet NSTextField    *_kismet_port; 
    32      
    33     IBOutlet NSButton       *_aeForever; 
    34          
     32         
    3533        IBOutlet NSBox                  *_chanhop; 
    3634        IBOutlet NSBox                  *_kdrone_settings; 
     
    4644- (IBAction)selAll:(id)sender; 
    4745- (IBAction)selNone:(id)sender; 
    48 - (IBAction)enableAEForever:(id)sender; 
    4946 
    5047@end 
  • trunk/Sources/Preferences/PreferencePanes/PrefsDriver.m

    r233 r242  
    7575    unsigned int x, y; 
    7676    int val, startCorrect = 0; 
    77         BOOL aeEnabledForever; 
    78      
    79         aeEnabledForever = [[controller objectForKey:@"aeForever"] boolValue] && [WaveDriverAirportExtreme monitorModeEnabled]; 
     77     
    8078    [_frequence     setFloatValue:  [[controller objectForKey:@"frequence"   ] floatValue]]; 
    81     [_aeForever     setState:       aeEnabledForever ? NSOnState : NSOffState];  
    8279 
    8380    if ([_driverTable numberOfSelectedRows]) { 
     
    175172         
    176173    [controller setObject:[NSNumber numberWithFloat: [_frequence     floatValue]]    forKey:@"frequence"]; 
    177     [controller setObject:[NSNumber numberWithBool: [_aeForever state] == NSOnState] forKey:@"aeForever"]; 
    178  
    179174    if (i < 0) return YES; 
    180175    d = [[self getCurrentSettings] mutableCopy]; 
     
    307302    [controller setObject:drivers forKey:@"ActiveDrivers"]; 
    308303     
    309         if (([_driver indexOfSelectedItem] == 2) && ![_aeForever state] && ![WaveHelper isServiceAvailable:"AirPort_Athr5424"]) { 
    310                 // user has chosen Airport Extreme - STRONGLY suggest enabling persistent passive mode 
    311                 result = NSRunAlertPanel(NSLocalizedString(@"Please enable persistent Airport Extreme passive.", "Persistent dialog title"), 
    312                                                                  NSLocalizedString(@"Airport Extreme passive may not work without persistent passive support enabled.  Some users have reported errors and even system crashes when attempting to use without persistent passive support.  Enable persistent passive support now?", "Persistent dialog description"), 
    313                                                                  NSLocalizedString(@"Yes please!","Yes button"), NSLocalizedString(@"No, I like kernel panics.","No button"), nil); 
    314                 if (result == 1) { 
    315                         [_aeForever setState:1]; 
    316                         [self enableAEForever:_aeForever]; 
    317                 } else { 
    318                         NSRunAlertPanel(NSLocalizedString(@"Don't say we didn't warn you!", "Persistent dialog title"), 
    319                                                         NSLocalizedString(@"There's just no helping some people.", "Persistent dialog description"), 
    320                                                         OK,nil, nil); 
    321                 } 
    322         } 
    323  
    324          
    325304    [_driverTable reloadData]; 
    326305    [_driverTable selectRow:[drivers count]-1 byExtendingSelection:NO]; 
     
    355334} 
    356335 
    357 - (IBAction)enableAEForever:(id)sender { 
    358     if (NSAppKitVersionNumber < 824.11) { 
    359                 NSLog(@"MacOS is not 10.4.2! AppKitVersion: %f < 824.11", NSAppKitVersionNumber); 
    360                  
    361                 NSRunCriticalAlertPanel( 
    362                                 NSLocalizedString(@"Could not enable Monitor Mode for Airport Extreme.", "Error dialog title"), 
    363                                 NSLocalizedString(@"Incompatible MacOS version! You will need at least MacOS 10.4.2!.", "Error dialog description"), 
    364                                 OK, nil, nil); 
    365         return; 
    366         } 
    367         if ([_aeForever state] == NSOnState && [WaveHelper isServiceAvailable:"AirPort_Athr5424"]) { 
    368                 [_aeForever setState:NSOffState]; 
    369                 NSRunCriticalAlertPanel( 
    370                                 NSLocalizedString(@"Not Needed.", "Error dialog title"), 
    371                                 NSLocalizedString(@"Atheros based Airport Extreme cards keep track of monitor mode themselves.", "Error dialog description"), 
    372                                 OK, nil, nil); 
    373         return; 
    374          
    375         } 
    376     [WaveDriverAirportExtreme setMonitorMode: [_aeForever state] == NSOnState]; 
    377     [self setValueForSender:sender]; 
    378     NSRunCriticalAlertPanel( 
    379                             NSLocalizedString(@"You Must Reboot.", "Error dialog title"), 
    380                             NSLocalizedString(@"You must reboot after changing this setting for it to take effect.", "Error dialog description"), 
    381                             OK, nil, nil); 
    382 } 
    383336 
    384337@end 
  • trunk/Sources/WaveDrivers/WaveDriverAirportExtreme.h

    r148 r242  
    3535}; 
    3636 
     37#define DLT_IEEE802_11_RADIO_AVS 163 
     38 
    3739@interface WaveDriverAirportExtreme : WaveDriver { 
    3840        pcap_t *_device; 
     
    4143 
    4244WIErr wlc_ioctl(int command, int bufsize, void* buffer, int outsize, void* out); 
    43 + (BOOL)monitorModeEnabled; 
    44 + (void)setMonitorMode:(BOOL)enable; 
    4545 
    4646@end 
  • trunk/Sources/WaveDrivers/WaveDriverAirportExtreme.m

    r239