diff --git a/Create-OUIListFromWeb.ps1 b/Create-OUIListFromWeb.ps1 new file mode 100644 index 0000000..9fa1a6f --- /dev/null +++ b/Create-OUIListFromWeb.ps1 @@ -0,0 +1,15 @@ +#$LatestOUI = Get-Content -Path "$PSScriptRoot\oui_from_web.txt" +$LatestOUIs = (Invoke-WebRequest -Uri "https://standards-oui.ieee.org/oui/oui.txt").Content + +$Output = "" + +foreach($Line in $LatestOUIs -split '[\r\n]') +{ + if($Line -match "^[A-F0-9]{6}") + { + # Line looks like: 2405F5 (base 16) Integrated Device Technology (Malaysia) Sdn. Bhd. + $Output += ($Line -replace '\s+', ' ').Replace(' (base 16) ', '|').Trim() + "`n" + } +} + +Out-File -InputObject $Output -FilePath "$PSScriptRoot\Resources\oui.txt" \ No newline at end of file