You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constfrida=require('frida');letdevice;asyncfunctionmain(){constcancellable=newfrida.Cancellable();setTimeout(()=>{console.log('Cancelling');device.spawnAdded.disconnect((...args)=>console.log("spawn", ...args));cancellable.cancel();},2000);device=awaitfrida.getDevice('92fa9259',{timeout: 10000},cancellable);device.spawnAdded.connect((...args)=>onProcessAdded("spawn", ...args));device.enableSpawnGating()console.log('[*] Device:',device);}asyncfunctiononProcessAdded(type,spawn){console.log("[*] onSpawnAdded:",spawn," of type ",type);awaitdevice.resume(spawn.pid);}main().catch(e=>{console.error(e);});
Expected behavior
Program prints device
Program prints any spawned process
Cancellation triggers
Program stops
Environment data
Running on an ArchLinux frida-node bindings version 16.5.2
Frida server is on a Fairphone 4 rooted with magisk version 16.5.2
Tested code
The following code is based on https://github.com/frida/frida-node/blob/main/examples/cancellation.js, with added spawn gating.
Expected behavior
Program prints device
Program prints any spawned process
Cancellation triggers
Program stops
Actual behavior
Program prints device
Program prints any spawned process
Cancellation triggers
Program continues printing spawned processes without stopping
Cancellation does work without "device.spawnAdded.connect"
Cancellation does not work even if "device.enableSpawnGating()" is not called.
The text was updated successfully, but these errors were encountered: