node-dbus-next icon indicating copy to clipboard operation
node-dbus-next copied to clipboard

Add support for peer-to-peer DBus

Open oleavr opened this issue 4 years ago • 2 comments

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.)

Screenshot

oleavr avatar Apr 21 '21 13:04 oleavr

Is it possible to add tests for this?

acrisci avatar May 20 '21 13:05 acrisci

@acrisci Will do!

oleavr avatar Jul 09 '21 02:07 oleavr