-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1428fd9
commit 2e0c191
Showing
16 changed files
with
25,297 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/usr/bin/perl -w | ||
# data files from https://regauth.standards.ieee.org/standards-ra-web/pub/view.html#registries | ||
use IO::Zlib; | ||
use Text::CSV_XS qw( csv ); | ||
|
||
open FILER, "> ../wiglewifiwardriving/src/main/assets/oui.properties"; | ||
binmode FILER, ":utf8"; | ||
|
||
my $csv = Text::CSV_XS->new ({ binary => 1, auto_diag => 1 }); | ||
|
||
for my $file (('oui.csv.gz','mam.csv.gz','oui36.csv.gz')) { | ||
print "file: $file\n"; | ||
my %header = (); | ||
$fh = IO::Zlib->new($file, "rb"); | ||
while (my $row = $csv->getline($fh)) { | ||
my @cols = @$row; | ||
if (not %header) { | ||
my $i = 0; | ||
for $col (@cols) { | ||
$header{$col} = $i; | ||
$i++; | ||
} | ||
} | ||
else { | ||
my $key = $cols[$header{'Assignment'}]; | ||
my $val = $cols[$header{'Organization Name'}]; | ||
$val =~ s/"/\\"/g; | ||
print FILER "$key=$val\n"; | ||
} | ||
} | ||
close $fh; | ||
} | ||
|
||
close FILER; |
Binary file not shown.
Binary file not shown.
Oops, something went wrong.