[squeak-dev] Mac OSX ID
Javier Reyes
jreyes at gmail.com
Thu Apr 24 00:29:39 UTC 2008
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 at 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 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/1c662f09/attachment.htm
More information about the Squeak-dev
mailing list
|