MAC vendor lookup: Difference between revisions
→{{header|APL}}: Add implementation.
(→{{header|APL}}: Add implementation.) |
|||
Line 74:
vendorLookup1 ← { (HttpCommand.Get 'http://api.macvendors.com/',⍕⍵).Data }
⍝ define a traditional function to look up all the MAC addresses
⍝ a delay between calls
⍝ The header says that the function is named vendorLookup, it takes a single
⍝
⍝
∇ vendors ← vendorLookup macList
vendors ← ⊆vendorLookup1 macList[1] ⍝ look up the first vendor▼
⍝ look up the first vendor and put it into an array in our return var
⍝ Loop over the rest of the array (1↓ removes the first item)
:For burger :In 1↓macList
⎕DL 2
vendors ⍪←
:EndFor
</lang>▼
{{Out}}
<pre> macList ← '88:53:2E:67:07:BE' 'D4:F4:6F:C9:EF:8D' 'FC:FB:FB:01:FA:21'
macList ⍪← '4c:72:b9:56:fe:bc' '00-14-22-01-23-45'
vendorList ← vendorLookup macList
(⍴ vendorList)[1] 1⍴ vendorList
Intel Corporate
Apple, Inc.
Cisco Systems, Inc
PEGATRON CORPORATION
Dell Inc.
=={{header|AppleScript}}==
|