[squeak-dev] Mac OSX ID

Javier Reyes jreyes at reyes-infografica.com
Thu Apr 24 00:15:44 UTC 2008


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 at 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 at rowledge.org; http://www.rowledge.org/tim
> > The next generation of computers will have a "Warranty Expired"
> > interrupt.
> >
> >
> >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20080424/10d55549/attachment.htm


More information about the Squeak-dev mailing list