mirror of
https://github.com/frida/frida-node.git
synced 2026-11-07 09:35:57 -10:00
19 lines
389 B
TypeScript
19 lines
389 B
TypeScript
import frida from "frida";
|
|
|
|
async function main() {
|
|
const cancellable = new frida.Cancellable();
|
|
|
|
setTimeout(() => {
|
|
console.log("Cancelling");
|
|
cancellable.cancel();
|
|
}, 2000);
|
|
|
|
const device = await frida.getDevice("xyz", { timeout: 10000 }, cancellable);
|
|
console.log("[*] Device:", device);
|
|
}
|
|
|
|
main()
|
|
.catch(e => {
|
|
console.error(e);
|
|
});
|