Ticket #47: colors.patch
| File colors.patch, 2.3 KB (added by gkruse, 6 years ago) |
|---|
-
Sources/Controller/ScanController.m
257 257 258 258 - (id) tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *) aTableColumn row:(int) rowIndex { 259 259 WaveNet *net = [_container netAtIndex:rowIndex]; 260 260 if ([[aTableColumn identifier] isEqualToString: @"wep"]) { 261 NSLog(@"WEP!! "); 262 switch([net crackProb]) { 263 case 0: 264 [[aTableColumn dataCellForRow: rowIndex] setTextColor:[NSColor redColor]];//hahaha 265 break; 266 case 1: 267 [[aTableColumn dataCellForRow: rowIndex] setTextColor:[NSColor yellowColor]];//possible 268 break; 269 case 2: 270 [[aTableColumn dataCellForRow: rowIndex] setTextColor:[NSColor greenColor]];//good chance 271 break; 272 case 3: 273 [[aTableColumn dataCellForRow: rowIndex] setTextColor:[NSColor blueColor]];//cracked 274 break; 275 } 276 } 261 277 return [[net cache] objectForKey: [aTableColumn identifier]]; 262 278 } 263 279 -
Sources/Core/WaveNet.mm
1240 1240 return _password != nil; 1241 1241 } 1242 1242 1243 - (int)crackProb { 1244 if (_isWep <= 1 || _password != nil) { 1245 NSLog(@"Blue!!"); 1246 return 3; 1247 } 1248 if ((_isWep == 2 || _isWep == 3) && [self uniqueIVs] > 8) { 1249 return 1; 1250 } 1251 if ((_isWep == 2 || _isWep == 3) && [self uniqueIVs] > 250000) { 1252 return 2; 1253 } 1254 if (_isWep == 4 && [self capturedEAPOLKeys] != 0 ) { 1255 return 2; 1256 } 1257 1258 return 0; 1259 } 1260 1243 1261 #pragma mark - 1244 1262 1245 1263 - (NSDictionary*)cache { -
Sources/Core/WaveNet.h
156 156 - (NSDictionary*)coordinates; 157 157 - (WaveWeakContainer **)ivData; 158 158 - (BOOL)passwordAvailable; 159 - (int)crackProb; // 0=not possible, 1=possible but not likely, 2=you might have a chance 159 160 160 161 - (NSDictionary*)cache; 161 162
