Skip to content

Instantly share code, notes, and snippets.

@kmaglione
Created September 23, 2011 16:50
Show Gist options
  • Save kmaglione/1237848 to your computer and use it in GitHub Desktop.
Save kmaglione/1237848 to your computer and use it in GitHub Desktop.
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