From df7b021ea000cbb124be5a0920e94ece24248572 Mon Sep 17 00:00:00 2001 From: wangsiyuan <2392948297@qq.com> Date: Mon, 6 Nov 2023 17:02:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=20hook=5Fqqmusic.js?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hook_qqmusic.js | 40 ---------------------------------------- 1 file changed, 40 deletions(-) delete mode 100644 hook_qqmusic.js diff --git a/hook_qqmusic.js b/hook_qqmusic.js deleted file mode 100644 index 6b93754..0000000 --- a/hook_qqmusic.js +++ /dev/null @@ -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; - }; - }); -} \ No newline at end of file