Skip to content

Conversation

@TheDauntless
Copy link
Contributor

The android sslpinning disable command fails if the class is found, but the target method is unavailable. This PR makes the hooks abort early if the target method isn't available. I've added it to all the ssl pinning hooks to be safe.

Error:

org.test.okhttp (run) on (Android: 14) [usb] # android sslpinning disable
(agent) Custom TrustManager ready, overriding SSLContext.init()
(agent) Found okhttp3.CertificatePinner, overriding CertificatePinner.check()
(agent) Found okhttp3.CertificatePinner, overriding CertificatePinner.check$okhttp()
A Frida agent exception has occurred.
TypeError: cannot read property 'overload' of undefined
    at <anonymous> (/src/index.js:20721)
    at <anonymous> (/src/index.js:13540)
    at <anonymous> (/src/index.js:2847)
    at perform (/src/index.js:13339)
    at <anonymous> (/src/index.js:13544)
    at Promise (native)
    at wrapJavaPerform (/src/index.js:13545)
    at okHttp3CertificatePinnerCheckOkHttp (/src/index.js:20735)
    at disable (/src/index.js:20846)

Alternatively I could update the catch() logic but that feels a bit weird since we would have to ignore type errors. Or I can throw a custom error, but that feels like overengineering.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant