MCPcopy
hub / github.com/CreditTone/hooker / methodInBeat

Function methodInBeat

js/cipher.js:13–25  ·  view source on GitHub ↗
(invokeId, timestamp, methodName, executor)

Source from the content-addressed store, hash-verified

11};
12
13function methodInBeat(invokeId, timestamp, methodName, executor) {
14 var startTime = timestamp;
15 var androidLogClz = Java.use("android.util.Log");
16 var exceptionClz = Java.use("java.lang.Exception");
17 var threadClz = Java.use("java.lang.Thread");
18 var currentThread = threadClz.currentThread();
19 var stackInfo = androidLogClz.getStackTraceString(exceptionClz.$new());
20 var str = ("------------startFlag:" + invokeId + ",objectHash:"+executor+",thread(id:" + currentThread.getId() +",name:" + currentThread.getName() + "),timestamp:" + startTime+"---------------\n");
21 str += methodName + "\n";
22 str += stackInfo.substring(20);
23 str += ("------------endFlag:" + invokeId + ",usedtime:" + (new Date().getTime() - startTime) +"---------------\n");
24 console.log(str);
25};
26
27function log(str) {
28 console.log(str);

Callers 1

cipher.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected