删除 hook_qqmusic.js
parent
86f1a339d0
commit
df7b021ea0
|
|
@ -1,40 +0,0 @@
|
||||||
log_info("Script loaded successfully");
|
|
||||||
if (Java.available) {
|
|
||||||
hook_json()
|
|
||||||
Java.perform(function () {
|
|
||||||
log_info("start hook java.net.URL");
|
|
||||||
var URL = Java.use('java.net.URL');
|
|
||||||
URL.$init.overload('java.lang.String').implementation = function (spec) {
|
|
||||||
log_info("URL request: " + spec)
|
|
||||||
return this.$init(spec);
|
|
||||||
};
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function log_info(messages) {
|
|
||||||
const now = new Date();
|
|
||||||
const year = now.getFullYear();
|
|
||||||
const month = String(now.getMonth() + 1).padStart(2, '0'); // Months are 0-based
|
|
||||||
const day = String(now.getDate()).padStart(2, '0');
|
|
||||||
const hours = String(now.getHours()).padStart(2, '0');
|
|
||||||
const minutes = String(now.getMinutes()).padStart(2, '0');
|
|
||||||
const seconds = String(now.getSeconds()).padStart(2, '0');
|
|
||||||
const milliseconds = String(now.getMilliseconds()).padStart(3, '0');
|
|
||||||
|
|
||||||
const timestamp = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}:${milliseconds}`;
|
|
||||||
|
|
||||||
console.log(`${timestamp} - ${messages}`);
|
|
||||||
send(`${timestamp} - ${messages}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
function hook_json() {
|
|
||||||
Java.perform(function () {
|
|
||||||
var JSONObject = Java.use('org.json.JSONObject');
|
|
||||||
JSONObject.toString.overload().implementation = function () {
|
|
||||||
var result = this.toString.call(this);
|
|
||||||
// get_conversions(result)
|
|
||||||
log_info("Serialized JSONObject: " + result)
|
|
||||||
return result;
|
|
||||||
};
|
|
||||||
});
|
|
||||||
}
|
|
||||||
Reference in New Issue