4 ms·
Getting CPUID info in pure Ruby
- revelation 13y agoTheres nothing pure about this. You are calling external functions that make none of the guarantees of Ruby. You might also want to fill the newly allocated memory with int3 (0xcc) instead of nops, that way you will notice if things are wrong and not slide into whereever.
- toxik 13y agoThis is a good demonstration of FFI, but sadly not at all what the title implies! Good job though.
- greenyoda 13y agoThey really mean "pure Ruby except for the hand-written machine code that does the real work". A better title for this article would be: "An exploit for executing arbitrary machine instructions from Ruby".