Created
July 23, 2022 10:00
-
-
Save jjsdub556/aed79f230817296e8e9785567e1a229f to your computer and use it in GitHub Desktop.
iOS WebView analysis JS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ObjC.choose(ObjC.classes['UIWebView'], { | |
| onMatch: function (ui) { | |
| console.log('onMatch: ', ui); | |
| console.log('URL: ', ui.request().toString()); | |
| }, | |
| onComplete: function () { | |
| console.log('UIWebView search finished!'); | |
| } | |
| }); | |
| ObjC.choose(ObjC.classes['WKWebView'], { | |
| onMatch: function (wk) { | |
| console.log('onMatch: ', wk); | |
| console.log('URL: ', wk.URL().toString()); | |
| }, | |
| onComplete: function () { | |
| console.log('WKWebView search finished!'); | |
| } | |
| }); | |
| ObjC.choose(ObjC.classes['SFSafariViewController'], { | |
| onMatch: function (sf) { | |
| console.log('onMatch: ', sf); | |
| }, | |
| onComplete: function () { | |
| console.log('SFSafariViewController search finished!'); | |
| } | |
| }); | |
| ObjC.choose(ObjC.classes['WKWebView'], { | |
| onMatch: function (wk) { | |
| console.log('onMatch: ', wk); | |
| console.log('javaScriptEnabled:', wk.configuration().preferences().javaScriptEnabled()); | |
| }, | |
| onComplete: function () { | |
| console.log('JS Enabled finished!'); | |
| } | |
| }); | |
| ObjC.choose(ObjC.classes['WKWebView'], { | |
| onMatch: function (wk) { | |
| console.log('onMatch: ', wk); | |
| console.log('hasOnlySecureContent: ', wk.hasOnlySecureContent().toString()); | |
| }, | |
| onComplete: function () { | |
| console.log('OnlySecure finished!'); | |
| } | |
| }); |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Fixed version of https://book.hacktricks.xyz/mobile-pentesting/ios-pentesting/ios-webviews