|
|
| laziness, impatience, and hubris | |
| PerlMonks |
Re: CPU IDby PetaMem (Priest) |
| on Apr 16, 2003 at 09:12 UTC ( #250816=note: print w/ replies, xml ) | Need Help?? |
|
I put the emphasis on other unic HW ID here: Under Linux (sorry, I don't have much knowledge with other OSes), you could do a quick&dirty trick by parsing the output of /sbin/ifconfig
wlan0 Protokoll:Ethernet Hardware Adresse 00:20:E0:8D:70:7DThis will give you the MAC adresses of any attached networking devices. Pretty unique (most of the time). But as you can see above: Be carefull of localized output just match the last (xx:xx:xx:xx:xx) sequence - if any - of the lines not starting with a whitespace. THe regexp is left as an exercise. ;-)
Bye
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||