Ruby: execute a binary file in memory?

Posted by John on Stack Overflow See other posts from Stack Overflow or by John
Published on 2010-04-01T15:30:28Z Indexed on 2010/04/01 15:33 UTC
Read the original article Hit count: 191

Filed under:
|
|
|

Is it possible to read binary in ruby file and execute it directly in memory?

for example something like this:

x = IO.read('/bin/ls') execute(x)

I tried system(x) but it doesn't work ArgumentError: string contains null byte

© Stack Overflow or respective owner

Related posts about ruby

Related posts about system