Re:Critical vulnerability of NPM package macaddress
by koolba on Monday June 11, 2018 @10:48AM
(#17284677)
I think the Windows code may be broken as well though for entirely different reason. It doesn't handle overlapping names of network interfaces. It searches for the first occurrence of the text of iface[1] in the output and then returns the next macaddress-ish text it finds.
That means "Local Area Connection" will also match "Local Area Connection 2", "Local Area Connection 3", etc and the sort order of the ipconfig command will determine which one you will return.
That means "Local Area Connection" will also match "Local Area Connection 2", "Local Area Connection 3", etc and the sort order of the ipconfig command will determine which one you will return.
[1]: https://github.com/scravy/node-macaddress/blob/dd079620d11c9...