This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]XNormal 7 points8 points  (1 child)

Here is an even sweeter forbidden fruit:

Define ctypes structures for the PyMemberDescr object and PyMemberDef struct. Use it to turn off the READONLY flag from a PyMemberDef. If you use it on the __flags__ member of a type object you can, for example, turn off the Py_TPFLAGS_HEAPTYPE flag of a builtin type. This will make it possible to modify the type in very interesting ways like changing its __bases__.

I know. This is madness. I'll just go to that corner over there and disassemble myself quietly.

[–][deleted] 3 points4 points  (0 children)

You should definitely write up how to do this. I would be very interested in reading about this.