MAC vendor lookup: Difference between revisions

no edit summary
m (Added language identifier.)
imported>Chinhouse
No edit summary
Line 854:
Examples:<syntaxhighlight lang="mathematica">macLookup["00-14-22-01-23-45"]</syntaxhighlight>
Outputs:<pre>Dell Inc.</pre>
 
=={{header|MiniScript}}==
This implementation is for use with the [http://miniscript.org/MiniMicro Mini Micro] version of MiniScript.
<syntaxhighlight lang="miniscript">
macList = ["88:53:2E:67:07:BE", "FC:FB:FB:01:FA:21", "00:02:55:00:00:00",
"D4:F4:6F:C9:EF:8D", "23:45:67", "18:93:D7", "1C:A6:81"]
 
for mac in macList
ret = http.get("http://api.macvendors.com/"+mac)
if ret == "HTTP/1.1 404 Not Found" then ret = "N/A"
print ret
wait 1
end for
</syntaxhighlight>
{{out}}
<pre>
Intel Corporate
Cisco Systems, Inc
IBM Corp
Apple, Inc.
N/A
Texas Instruments
HUAWEI TECHNOLOGIES CO.,LTD
</pre>
 
=={{header|Nim}}==
Anonymous user