Skip to content

Instantly share code, notes, and snippets.

@jjsdub556
Created July 23, 2022 10:00
Show Gist options
  • Select an option

  • Save jjsdub556/aed79f230817296e8e9785567e1a229f to your computer and use it in GitHub Desktop.

Select an option

Save jjsdub556/aed79f230817296e8e9785567e1a229f to your computer and use it in GitHub Desktop.
iOS WebView analysis JS
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!');
}
});
@jjsdub556
Copy link
Copy Markdown
Author

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