• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Checking for Hackintosh
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Checking for Hackintosh


  • Subject: Re: Checking for Hackintosh
  • From: Matt Burnett <email@hidden>
  • Date: Wed, 30 Jul 2008 19:06:16 -0500

The OP needs to get off his high horse and come to the realization that some people are a bit more clever than him (or Apple). But anyways you guys all forgot something big, virtualization. Can't OS X Server 10.5 be (legally) virtualized? Any hardware checks will either break in a virtualized environment, or a hackintosh will pretend to be virtualized, either way you lose. I bet the OP is the type of guy who thinks fighting piracy makes business sense too.

On Jul 30, 2008, at 1:34 PM, Scott Lahteine wrote:

Hi,

There are a couple of ways to definitively test for a hackintosh. You could look at the IO Registry for unusual hardware configurations. But as it happens, the latest Hackintosh kernels all use custom Machine Type strings. So you can test to see if it's one of the known Mac models, and if it isn't you can assume it's probably a Hackintosh.

Unfortunately, this breaks if future Macs introduce new Machine Type strings, which is almost certain. You'll notice I'm not testing for AppleTV, for example, because I don't happen to know its string.

The following is what I use in "TabletMagic" to detect a TabletPC :


- (BOOL)detectHackintosh
{
SInt32 gestaltReturnValue;
BOOL is_known_mac = NO;
if (!Gestalt(gestaltUserVisibleMachineName, &gestaltReturnValue))
{
char *known_machines[] = {"AAPL","iMac","PowerBook","PowerMac","RackMac",
"Macmini","MacPro","MacBookPro","MacBook"};
StringPtr pmach = (StringPtr)gestaltReturnValue;
int i, len = pmach[0];
char *machine_string = (char*)malloc(len+2);
strncpy(machine_string, (char*)&pmach[1], len+1);


for (i=sizeof(known_machines)/sizeof(known_machines[0]); i--;)
if (!strncmp(machine_string, known_machines[i], strlen(known_machines[i]))) { is_known_mac = YES; break; }


   free(machine_string);
 }

if (is_known_mac)
{
// delete the tab having identifier "6"
[ tabview removeTabViewItem: [ tabview tabViewItemAtIndex: [ tabview indexOfTabViewItemWithIdentifier: @"6" ] ] ];
}


 return !is_known_mac;
}



--
 Scott Lahteine          Thinkyhead Software
 email@hidden    http://www.thinkyhead.com/


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • [Moderator] Re: Checking for Hackintosh
      • From: CocoaDev Admins <email@hidden>
    • Re: Checking for Hackintosh
      • From: "I. Savant" <email@hidden>
References: 
 >Re: Checking for Hackintosh (From: Scott Lahteine <email@hidden>)

  • Prev by Date: Re: NSTextFieldCell - Kidnapped Focus Ring!
  • Next by Date: Re: Checking for Hackintosh
  • Previous by thread: Re: Checking for Hackintosh
  • Next by thread: Re: Checking for Hackintosh
  • Index(es):
    • Date
    • Thread