Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private onMessage = (message: frida.Message, data: Buffer | null): void => {
switch (message.type) {
case frida.MessageType.Send:
console.error(`[PID=${this.pid}]:`, message.payload);
break;
case frida.MessageType.Error:
console.error(`[PID=${this.pid}]:`, message.stack);
break;
default:
}
};
}
private onMessage = (message: frida.Message, data: Buffer | null): void => {
switch (message.type) {
case frida.MessageType.Send:
this.delegate.onEvent(message.payload, data);
break;
case frida.MessageType.Error:
const e = new Error(message.description);
e.stack = message.stack;
this.delegate.onError(e);
break;
default:
}
};
}