Skip to content

Instantly share code, notes, and snippets.

sc.killAutoHandle();
sc.getService("ns:am2", (hndle) => {
utils.log("got handle 0x" + hndle.toString(16));
// GetApplicationManagerInterface
var res = sc.ipcMsg(7996).data(0).sendTo(hndle).assertOk();
sc.withHandle(res.movedHandles[0], (amih) => {
utils.log("got handle 0x" + amih.toString(16));
// launch
struct bsd_pollfd {
int fd;
short events;
short revents;
};
#define BSD_POLLIN 0x0001
int bsd_poll(struct bsd_pollfd *fds, int nfds, int timeout) {
result_t r;
@kgsws
kgsws / sdbhax.js
Last active January 22, 2020 19:41
sc.killAutoHandle();
function c32to8(data)
{
var len = data.length;
var ret = new Uint8Array(len * 4);
var offs = 0;
for(i = 0; i < len; i++)
{