Skip to content

Commit 0ff5076

Browse files
author
Ch0pin
committed
add/improve modules
1 parent 0013987 commit 0ff5076

2 files changed

Lines changed: 34 additions & 6 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"Name": "cordova/system_exposed_js_api",
3+
"Description": "The SystemExposedJsApi class Contains APIs that the JS can call.",
4+
"Help": "The core Cordova Android component that exposes a JavaScript-to-native bridge to the WebView. It allows JavaScript running inside the WebView to invoke native Cordova plugins and represents a critical trust boundary between web content and native application functionality.",
5+
"Code": "{
6+
7+
8+
const SystemExposedJsApi_1766332424 = Java.use('org.apache.cordova.engine.SystemExposedJsApi');
9+
10+
colorLog('\\nTracing SystemExposedJsApi.exec', { c: Color.Green });
11+
12+
SystemExposedJsApi_1766332424['exec'].implementation = function(bridgeSecret, service, action, callbackId, args) {
13+
14+
let retval = this['exec'].apply(this, arguments);
15+
styleLog('[i] SystemExposedJsApi.exec ( action: '+action + ', args: '+args +' )', filterKeyWords, StyleLogColorset.red, StyleLogColorset.black);
16+
if(retval)
17+
console.log('\\t\\\\─➤Return val: ' + retval);
18+
console.log();
19+
return retval;
20+
}
21+
22+
}"
23+
}

modules/webviews/hook_webviews.med

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,18 @@
8383

8484

8585
webView.evaluateJavascript.implementation = function(script, resultCallback){
86-
colorLog('WebView Client: '+this.getWebViewClient(),{c:Color.Blue});
87-
let tmp_output = script;
88-
if(!__verbose__){
89-
tmp_output = 'deducted';
86+
if(this.getWebViewClient().toString().startsWith('com.google.ads'))
87+
this.evaluateJavascript(script,resultCallback);
88+
else
89+
{
90+
colorLog('WebView Client: '+this.getWebViewClient(),{c:Color.Blue});
91+
let tmp_output = script;
92+
if(!__verbose__){
93+
tmp_output = 'deducted';
94+
}
95+
console.log('[i] evaluateJavascript called with the following script: '+tmp_output);
96+
this.evaluateJavascript(script,resultCallback);
9097
}
91-
console.log('[i] evaluateJavascript called with the following script: '+tmp_output);
92-
this.evaluateJavascript(script,resultCallback);
9398
}
9499

95100
webView.getOriginalUrl.implementation = function(){

0 commit comments

Comments
 (0)