diff -Naur aircrack-ng-1.1/src/airodump-ng.c aircrack-ng-1.1-patched/src/airodump-ng.c --- aircrack-ng-1.1/src/airodump-ng.c 2011-07-06 10:28:54.000000000 -0400 +++ aircrack-ng-1.1-patched/src/airodump-ng.c 2011-07-06 10:24:40.000000000 -0400 @@ -383,8 +383,11 @@ unsigned char c[2]; struct oui *oui_ptr = NULL, *oui_head = NULL; - if (!(fp = fopen(OUI_PATH, "r"))) - return NULL; + if (!(fp = fopen(OUI_PATH0, "r"))) { + if (!(fp = fopen(OUI_PATH1, "r"))) { + return NULL; + } + } memset(buffer, 0x00, sizeof(buffer)); while (fgets(buffer, sizeof(buffer), fp) != NULL) { @@ -3592,6 +3595,7 @@ #define OUI_STR_SIZE 8 #define MANUF_SIZE 128 char *get_manufacturer(unsigned char mac0, unsigned char mac1, unsigned char mac2) { + static char * oui_location = NULL; char oui[OUI_STR_SIZE + 1]; char *manuf; //char *buffer_manuf; @@ -3625,7 +3629,20 @@ } } else { // If the file exist, then query it each time we need to get a manufacturer. - fp = fopen(OUI_PATH, "r"); + if (oui_location == NULL) { + fp = fopen(OUI_PATH0, "r"); + if (fp == NULL) { + fp = fopen(OUI_PATH1, "r"); + if (fp != NULL) { + oui_location = OUI_PATH1; + } + } else { + oui_location = OUI_PATH0; + } + } else { + fp = fopen(oui_location, "r"); + } + if (fp != NULL) { memset(buffer, 0x00, sizeof(buffer)); diff -Naur aircrack-ng-1.1/src/airodump-ng.h aircrack-ng-1.1-patched/src/airodump-ng.h --- aircrack-ng-1.1/src/airodump-ng.h 2011-07-06 10:28:54.000000000 -0400 +++ aircrack-ng-1.1-patched/src/airodump-ng.h 2011-07-06 10:39:27.000000000 -0400 @@ -111,7 +111,8 @@ "\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00"; -#define OUI_PATH "/usr/local/etc/aircrack-ng/airodump-ng-oui.txt" +#define OUI_PATH0 "/etc/aircrack-ng/airodump-ng-oui.txt" +#define OUI_PATH1 "/usr/local/etc/aircrack-ng/airodump-ng-oui.txt" #define MIN_RAM_SIZE_LOAD_OUI_RAM 32768 int read_pkts=0;