frida-objc-bridge icon indicating copy to clipboard operation
frida-objc-bridge copied to clipboard

Proxy methodSignatureForSelector: ignore implemented protocols

Open tux-mind opened this issue 2 years ago • 0 comments

I was wondering if registering a proxy that implements a protocol that the target does not would incur some troubles. It seems that the methodSignatureForSelector: is forwarded to the target, the implemented protocols are not used to look up the method signature.

https://github.com/frida/frida-objc-bridge/blob/4fe30910c1af32b2220c09b64dc4340f9132fc64/index.js#L1431

I find this helpful if you want to proxy a delegate that implements a protocol out of many others you might want to intercept. e.g. the proxy implements NSURLSessionDataDelegate in addition to the target's only protocol NSURLSessionTaskDelegate.

Do you think that is a good idea to look up the method signature in the protocols as well?

Thank you again for this amazing framework!

tux-mind avatar Apr 11 '22 11:04 tux-mind