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" <[hidden email]> 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 <[hidden email]> 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 |
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. 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; [hidden email]; http://www.rowledge.org/tim The next generation of computers will have a "Warranty Expired" interrupt. |
In reply to this post by NorbertHartl
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; [hidden email]; 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; [hidden email]; http://www.rowledge.org/tim >> The next generation of computers will have a "Warranty Expired" >> interrupt. >> >> >> > > |
In reply to this post by timrowledge
On Wed, 2008-04-23 at 11:28 -0700, 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. > > companies still use some sort of dongle. Norbert |
In reply to this post by Marc Nijdam
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 <[hidden email]> 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. |
In reply to this post by NorbertHartl
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 <[hidden email]> wrote:
|
In reply to this post by Javier Diaz-Reinoso
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 <[hidden email]> wrote: Try (in 10.5): |
In reply to this post by NorbertHartl
Hi Norbert,
You are absolutely right. In my case though, I am protecting a small application with a small number of users. More than a bullet proof system, a deterrant is enough. I could even feel flatered if someone took seriously cracking it ;-) All the best, Javier On Wed, Apr 23, 2008 at 10:03 PM, Norbert Hartl <[hidden email]> wrote:
|
Free forum by Nabble | Edit this page |