MCPcopy
hub / github.com/OWASP/mastg / hookNoArgString

Function hookNoArgString

demos/android/MASVS-RESILIENCE/MASTG-DEMO-0114/script.js:16–27  ·  view source on GitHub ↗
(clazz, methodName, label)

Source from the content-addressed store, hash-verified

14 }
15
16 function hookNoArgString(clazz, methodName, label) {
17 try {
18 const method = clazz[methodName].overload();
19 method.implementation = function () {
20 const result = method.call(this);
21 logIfApp(`[${label}] -> ${result}`);
22 return result;
23 };
24 } catch (err) {
25 console.log(`[-] Unable to hook ${label}: ${err}`);
26 }
27 }
28
29 function hookNoArgInt(clazz, methodName, label) {
30 try {

Callers 1

script.jsFile · 0.85

Calls 1

logIfAppFunction · 0.85

Tested by

no test coverage detected