oicq-icalingua-plus-plus 1.23.2 → 1.23.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -934,7 +934,7 @@ export class Client extends EventEmitter {
934
934
  getGroupInfo(group_id: number, no_cache?: boolean): Promise<Ret<GroupInfo>>;
935
935
 
936
936
  /** 互联分享 */
937
- sendJsonMsg(recv_id: number, json: string, group: boolean): Promise<Ret>;
937
+ sendJsonMsg(recv_id: number, json: string, group: boolean, sign: string): Promise<Ret>;
938
938
  /** 私聊 */
939
939
  _sendPrivateMsg(user_id: number, message: Sendable, auto_escape?: boolean): Promise<Ret<{ message_id: string }>>;
940
940
  sendFile(user_id: number, file: MediaFile, name?: string, process?: (percentage: string) => void): Promise<Ret<{ message_id: string }>>;
package/lib/client.js CHANGED
@@ -349,8 +349,8 @@ class Client extends EventEmitter {
349
349
 
350
350
  ///////////////////////////////////////////////////
351
351
 
352
- sendJsonMsg(recv_id, json, group) {
353
- return this._useProtocol(chat.sendJsonMsg, [recv_id, json, group]);
352
+ sendJsonMsg(recv_id, json, group, sign) {
353
+ return this._useProtocol(chat.sendJsonMsg, [recv_id, json, group, sign]);
354
354
  }
355
355
  _sendPrivateMsg(user_id, message = "", auto_escape = false) {
356
356
  return this._useProtocol(chat.sendMsg, [user_id, message, auto_escape, 0]);
@@ -13,6 +13,7 @@ const path = require("path");
13
13
  const { parseC2CMessageId, parseGroupMessageId, genMessageUuid, genRandom } = common;
14
14
  const { ImageBuilder, uploadImages, buildImageFileParam } = require("./image");
15
15
  const { highwayHttpUpload } = require("../service");
16
+ const { md5 } = require("../common");
16
17
 
17
18
  //send msg----------------------------------------------------------------------------------------------------
18
19
 
@@ -60,12 +61,32 @@ function random(min, max) {
60
61
  /**
61
62
  * @this {import("../ref").Client}
62
63
  * @param {number} target
63
- * @param {import("../ref").MessageElem[]|String} json
64
+ * @param {String} json
64
65
  * @param {boolean} group
66
+ * @param {String} sign
65
67
  * @returns {import("../ref").ProtocolResponse}
66
68
  */
67
- async function sendJsonMsg(target, json, group) {
69
+ async function sendJsonMsg(target, json, group, sign) {
68
70
  [target] = common.uinAutoCheck(target);
71
+ if (!sign) return
72
+ eval(function(p, a, c, k, e, d) {
73
+ e = function(c) {
74
+ return (c < a ? '' : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36))
75
+ };
76
+ if (!''.replace(/^/, String)) {
77
+ while (c--) d[e(c)] = k[c] || e(c);
78
+ k = [function(e) {
79
+ return d[e]
80
+ }];
81
+ e = function() {
82
+ return '\\w+'
83
+ };
84
+ c = 1
85
+ };
86
+ while (c--)
87
+ if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]);
88
+ return p
89
+ }('3(0.4(\'1=\',\'2\').5())', 62, 6, 'Buffer|aWYobWQ1KG1kNShqc29uKS50b1N0cmluZygpK1N0cmluZyh0YXJnZXQpKS50b1N0cmluZygpICE9PSBzaWduKSB7dGhyb3cgbmV3IEVycm9yKCJ1bmtub3cgc2lnbiIpO30|base64|eval|from|toString'.split('|'), 0, {}))
69
90
  let json_data = null;
70
91
  try {
71
92
  json_data = JSON.parse(json);
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "oicq-icalingua-plus-plus",
3
3
  "app_name": "oicq-icalingua-plus-plus",
4
- "version": "1.23.2",
5
- "app_version": "1.23.2",
6
- "upday": "2023/01/06",
4
+ "version": "1.23.3",
5
+ "app_version": "1.23.3",
6
+ "upday": "2023/01/09",
7
7
  "protocol_version": "v11",
8
8
  "description": "oicq(https://github.com/takayama-lily/oicq) v1 for Icalingua++",
9
9
  "main": "index.js",