Simon Willison’s Weblog

Subscribe

Fun with ctypes

31st October 2006

This probably only works on Intel-based OS X machines:

>>> import ctypes
>>> print ctypes.c_char_p(
    -16 * 4096 + 0x1600
).value
Your karma check for today:
There once was was a user that whined
his existing OS was so blind,
he'd do better to pirate
an OS that ran great
but found his hardware declined.
Please don't steal Mac OS!
Really, that's way uncool.
   (C) Apple Computer, Inc.U??VWS?5P

Adapted from dsmos.c in Understanding Apple’s Binary Protection in Mac OS X by Amit Singh.

This is Fun with ctypes by Simon Willison, posted on 31st October 2006.

Next: Tamarin

Previous: Graphing requests with Tamper Data

Previously hosted at http://simon.incutio.com/archive/2006/10/31/ctypes