Hello !
I need to obtain a unique hardware ID from Apple OSX machines using squeak. ¿Any hint?
Thanks in advance,
Javier
El 4/23/08 9:18 AM, "Javier Reyes" jreyes@gmail.com escribió:
Hello !
I need to obtain a unique hardware ID from Apple OSX machines using squeak. ¿Any hint?
Thanks in advance,
Javier
I don't know your need for this, except for some validation purpose. If so, each Squeak image on each machine could generate UUIC , you could validate this .
Edgar
Hi Edgar,
It's for a licensing server. I think I've found a way to do it using the ethernet physical ID trough:
Applescript doIt: 'do shell script "ifconfig en0"'.
And then filtering the physical address.
Thx, Javier
On Wed, Apr 23, 2008 at 2:27 PM, Edgar J. De Cleene < edgardec2001@yahoo.com.ar> wrote:
El 4/23/08 9:18 AM, "Javier Reyes" jreyes@gmail.com escribió:
Hello !
I need to obtain a unique hardware ID from Apple OSX machines using
squeak.
¿Any hint?
Thanks in advance,
Javier
I don't know your need for this, except for some validation purpose. If so, each Squeak image on each machine could generate UUIC , you could validate this .
Edgar
On Wed, 2008-04-23 at 15:00 +0200, Javier Reyes wrote:
Hi Edgar,
It's for a licensing server. I think I've found a way to do it using the ethernet physical ID trough:
Applescript doIt: 'do shell script "ifconfig en0"'.
And then filtering the physical address.
This won't work. Usually the MAC address shown is only a copy of the number stored on the device. You can alter this address easily. Under linux this would be
ifconfig eth0 hw ether 00:11:22:33:44:55
If you're after licenses you may do some poor microsoft style checking. I quick search on google showed the pendant for lspci on linux is called pciconf on bsd-like systems. There you get the real device ids of all devices attached.
Norbert
On 23-Apr-08, at 10:35 AM, Norbert Hartl wrote:
On Wed, 2008-04-23 at 15:00 +0200, Javier Reyes wrote:
Hi Edgar,
It's for a licensing server. I think I've found a way to do it using the ethernet physical ID trough:
Applescript doIt: 'do shell script "ifconfig en0"'.
And then filtering the physical address.
This won't work. Usually the MAC address shown is only a copy of the number stored on the device. You can alter this address easily.
I assume simply replacing the ethernet card - or even just adding one and reassigning which is en0 - would mess it up pretty badly.
Many CPus have an actual unique ID that is findable somewhere. Even there you're in trouble if the cpu has to be replaced due to failure of upgrade.
tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim The next generation of computers will have a "Warranty Expired" interrupt.
if you're willing to write a plugin here's a native snippet of C/ObjC you can use to get the serial number.
io_service_t platformExpert = IOServiceGetMatchingService( kIOMasterPortDefault, IOServiceMatching("IOPlatformExpertDevice"));
if (platformExpert) { CFTypeRef serialNumberAsCFString = IORegistryEntryCreateCFProperty(platformExpert,
CFSTR(kIOPlatformSerialNumberKey), kCFAllocatorDefault, 0); IOObjectRelease(platformExpert); }
hth,
--Marc
On Apr 23, 2008, at 11:28 AM, tim Rowledge wrote:
On 23-Apr-08, at 10:35 AM, Norbert Hartl wrote:
On Wed, 2008-04-23 at 15:00 +0200, Javier Reyes wrote:
Hi Edgar,
It's for a licensing server. I think I've found a way to do it using the ethernet physical ID trough:
Applescript doIt: 'do shell script "ifconfig en0"'.
And then filtering the physical address.
This won't work. Usually the MAC address shown is only a copy of the number stored on the device. You can alter this address easily.
I assume simply replacing the ethernet card - or even just adding one and reassigning which is en0 - would mess it up pretty badly.
Many CPus have an actual unique ID that is findable somewhere. Even there you're in trouble if the cpu has to be replaced due to failure of upgrade.
tim
tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim The next generation of computers will have a "Warranty Expired" interrupt.
Try (in 10.5):
ioreg -l -w 0 | grep IOPlatformSerialNumber
but what about other OS versions?
On 23/04/2008, at 13:35, Marc Nijdam wrote:
if you're willing to write a plugin here's a native snippet of C/ ObjC you can use to get the serial number.
io_service_t platformExpert = IOServiceGetMatchingService( kIOMasterPortDefault, IOServiceMatching("IOPlatformExpertDevice"));
if (platformExpert) { CFTypeRef serialNumberAsCFString = IORegistryEntryCreateCFProperty(platformExpert,
CFSTR(kIOPlatformSerialNumberKey), kCFAllocatorDefault, 0); IOObjectRelease(platformExpert); }
hth,
--Marc
On Apr 23, 2008, at 11:28 AM, tim Rowledge wrote:
On 23-Apr-08, at 10:35 AM, Norbert Hartl wrote:
On Wed, 2008-04-23 at 15:00 +0200, Javier Reyes wrote:
Hi Edgar,
It's for a licensing server. I think I've found a way to do it using the ethernet physical ID trough:
Applescript doIt: 'do shell script "ifconfig en0"'.
And then filtering the physical address.
This won't work. Usually the MAC address shown is only a copy of the number stored on the device. You can alter this address easily.
I assume simply replacing the ethernet card - or even just adding one and reassigning which is en0 - would mess it up pretty badly.
Many CPus have an actual unique ID that is findable somewhere. Even there you're in trouble if the cpu has to be replaced due to failure of upgrade.
tim
tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim The next generation of computers will have a "Warranty Expired" interrupt.
Wow Javier,
That's another good one.You're wise men ;-)
-Javier (bis)
On Wed, Apr 23, 2008 at 9:09 PM, Javier Diaz-Reinoso javier_diaz_r@mac.com wrote:
Try (in 10.5):
ioreg -l -w 0 | grep IOPlatformSerialNumber
but what about other OS versions?
On 23/04/2008, at 13:35, Marc Nijdam wrote:
if you're willing to write a plugin here's a native snippet of C/ObjC you
can use to get the serial number.
io_service_t platformExpert = IOServiceGetMatchingService( kIOMasterPortDefault, IOServiceMatching("IOPlatformExpertDevice"));
if (platformExpert) { CFTypeRef serialNumberAsCFString = IORegistryEntryCreateCFProperty(platformExpert,
CFSTR(kIOPlatformSerialNumberKey), kCFAllocatorDefault, 0); IOObjectRelease(platformExpert); }
hth,
--Marc
On Apr 23, 2008, at 11:28 AM, tim Rowledge wrote:
On 23-Apr-08, at 10:35 AM, Norbert Hartl wrote:
On Wed, 2008-04-23 at 15:00 +0200, Javier Reyes wrote:
Hi Edgar,
It's for a licensing server. I think I've found a way to do it using the ethernet physical ID trough:
Applescript doIt: 'do shell script "ifconfig en0"'.
And then filtering the physical address.
This won't work. Usually the MAC address shown is only a copy
of the number stored on the device. You can alter this address easily.
I assume simply replacing the ethernet card - or even just adding one and reassigning which is en0 - would mess it up pretty badly.
Many CPus have an actual unique ID that is findable somewhere. Even there you're in trouble if the cpu has to be replaced due to failure of upgrade.
tim
tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim The next generation of computers will have a "Warranty Expired" interrupt.
Marc,
Thanks a lot for that. it think combining several "signatures" of the hardware could work fine. Certainly the machine serial number is one. Thanks again
Javier
On Wed, Apr 23, 2008 at 8:35 PM, Marc Nijdam marc_nijdam@mac.com wrote:
if you're willing to write a plugin here's a native snippet of C/ObjC you can use to get the serial number.
io_service_t platformExpert = IOServiceGetMatchingService( kIOMasterPortDefault, IOServiceMatching("IOPlatformExpertDevice"));
if (platformExpert) { CFTypeRef serialNumberAsCFString = IORegistryEntryCreateCFProperty(platformExpert,
CFSTR(kIOPlatformSerialNumberKey), kCFAllocatorDefault, 0); IOObjectRelease(platformExpert); }
hth,
--Marc
On Apr 23, 2008, at 11:28 AM, tim Rowledge wrote:
On 23-Apr-08, at 10:35 AM, Norbert Hartl wrote:
On Wed, 2008-04-23 at 15:00 +0200, Javier Reyes wrote:
Hi Edgar,
It's for a licensing server. I think I've found a way to do it using the ethernet physical ID trough:
Applescript doIt: 'do shell script "ifconfig en0"'.
And then filtering the physical address.
This won't work. Usually the MAC address shown is only a copy
of the number stored on the device. You can alter this address easily.
I assume simply replacing the ethernet card - or even just adding one and reassigning which is en0 - would mess it up pretty badly.
Many CPus have an actual unique ID that is findable somewhere. Even there you're in trouble if the cpu has to be replaced due to failure of upgrade.
tim
tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim The next generation of computers will have a "Warranty Expired" interrupt.
Hi Norbert.
I think you're right. I'll try to combine more than one hardware signature in the combo. Thanks.
-Javier
On Wed, Apr 23, 2008 at 7:35 PM, Norbert Hartl norbert@hartl.name wrote:
On Wed, 2008-04-23 at 15:00 +0200, Javier Reyes wrote:
Hi Edgar,
It's for a licensing server. I think I've found a way to do it using the ethernet physical ID trough:
Applescript doIt: 'do shell script "ifconfig en0"'.
And then filtering the physical address.
This won't work. Usually the MAC address shown is only a copy of the number stored on the device. You can alter this address easily. Under linux this would be
ifconfig eth0 hw ether 00:11:22:33:44:55
If you're after licenses you may do some poor microsoft style checking. I quick search on google showed the pendant for lspci on linux is called pciconf on bsd-like systems. There you get the real device ids of all devices attached.
Norbert
squeak-dev@lists.squeakfoundation.org