node-dbus-next
node-dbus-next copied to clipboard
Add support for peer-to-peer DBus
Thanks for this awesome library! ❤️
With these small changes, plus the tiny tweak in #71, I was able to communicate with a Frida server from a web browser:
import dbus from 'dbus-next';
import websocket from 'websocket-stream';
async function start() {
const ws = websocket(`ws://${location.host}/ws`);
const bus = dbus.peerBus(ws, {
authMethods: ['ANONYMOUS'],
});
const hostSessionObj = await bus.getProxyObject('re.frida.HostSession14', '/re/frida/HostSession');
const hostSession = hostSessionObj.getInterface('re.frida.HostSession14');
const processes = await hostSession.EnumerateProcesses();
console.log('Got processes:', processes);
}
start().catch(e => {
console.error(e);
});
(I'm basically using a dead simple gateway that proxies the WebSocket to a running frida-server.)
Is it possible to add tests for this?
@acrisci Will do!