We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5581cfe commit 00f3e15Copy full SHA for 00f3e15
src/index.ts
@@ -139,10 +139,16 @@ export class FridaSession {
139
return this.bus.disconnect();
140
}
141
142
- private getHostSession() {
143
- return this.bus
144
- .getService('re.frida.HostSession16')
145
- .getInterface<HostSession>('/re/frida/HostSession', 're.frida.HostSession16');
+ private async getHostSession() {
+ const hostSession = await this.bus
+ .getService('re.frida.HostSession16')
+ .getInterface<HostSession | undefined>('/re/frida/HostSession', 're.frida.HostSession16');
146
+
147
+ if (!hostSession) {
148
+ throw new Error('Frida host does not support v16 API');
149
+ }
150
151
+ return hostSession;
152
153
154
private async getAgentSession(sessionId: string, pid: number, hostSession: HostSession) {
0 commit comments