Skip to content

Instantly share code, notes, and snippets.

@kmaglione

kmaglione/stdin.js

Created Sep 23, 2011
Embed
What would you like to do?
let libc = ctypes.open("libc.so.6");
let write = libc.declare("write", ctypes.default_abi, ctypes.int, ctypes.int, ctypes.char.ptr, ctypes.int)
write(2, "foo\n", 4);
Function.prototype.apply.call(write, null, [2, "foo\n", 4]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.