🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

oicq

Package Overview
Dependencies
Maintainers
1
Versions
176
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oicq - npm Package Compare versions

Comparing version
2.2.0
to
2.2.1
+1
-1
lib/common.js

@@ -165,3 +165,3 @@ "use strict";

exports.PB_CONTENT = core_1.pb.encode({ 1: 1, 2: 0, 3: 0 });
exports.IS_WIN = os.platform().includes("win");
exports.IS_WIN = os.platform() === "win32";
/** 系统临时目录,用于临时存放下载的图片等内容 */

@@ -168,0 +168,0 @@ exports.TMP_DIR = os.tmpdir();

@@ -187,3 +187,3 @@ "use strict";

tokenLogin(token) {
if (token.length !== 152)
if (![144, 152].includes(token.length))
throw new Error("bad token");

@@ -194,4 +194,4 @@ this.sig.session = (0, crypto_1.randomBytes)(4);

this.sig.d2key = token.slice(0, 16);
this.sig.d2 = token.slice(16, 80);
this.sig.tgt = token.slice(80, 152);
this.sig.d2 = token.slice(16, token.length - 72);
this.sig.tgt = token.slice(token.length - 72);
this.sig.tgtgt = (0, constants_1.md5)(this.sig.d2key);

@@ -906,3 +906,3 @@ const t = tlv.getPacker(this);

return this.emit("internal.verbose", "已向密保手机发送短信验证码", VerboseLevel.Mark);
let phone;
let phone = "";
if (t[0x174] && t[0x178]) {

@@ -909,0 +909,0 @@ this.sig.t104 = t[0x104];

@@ -108,12 +108,12 @@ "use strict";

id: "com.tencent.mobileqq",
name: "A8.8.68.7265",
version: "8.8.68.7265",
ver: "8.8.68",
name: "A8.8.80.7400",
version: "8.8.80.7400",
ver: "8.8.80",
sign: Buffer.from([166, 183, 69, 191, 36, 162, 194, 119, 82, 119, 22, 246, 243, 110, 182, 141]),
buildtime: 1642742430,
buildtime: 1640921786,
appid: 16,
subid: 537112589,
subid: 537113159,
bitmap: 184024956,
sigmap: 34869472,
sdkver: "6.0.0.2487",
sdkver: "6.0.0.2494",
display: "Android",

@@ -120,0 +120,0 @@ };

@@ -84,3 +84,3 @@ "use strict";

catch (e) {
this.logger.debug(e);
this.logger.trace(e);
}

@@ -87,0 +87,0 @@ }

@@ -323,2 +323,3 @@ "use strict";

});
this.gl.get(gid).owner_id = user_id;
this.gml.get(gid).get(user_id).role = "owner";

@@ -325,0 +326,0 @@ this.gml.get(gid).get(operator_id).role = "member";

@@ -409,4 +409,6 @@ "use strict";

const tmp = this.brief;
this.at({ type: "at", qq: source.user_id });
this.elems.unshift(this.elems.pop());
if (!this.ext?.dm) {
this.at({ type: "at", qq: source.user_id });
this.elems.unshift(this.elems.pop());
}
this.elems.unshift({

@@ -413,0 +415,0 @@ 45: {

@@ -151,3 +151,3 @@ "use strict";

}
else if (proto[12]) {
else if (proto[12] && !proto[12][1]) {
// 频道中的AT

@@ -154,0 +154,0 @@ elem = {

{
"name": "oicq",
"version": "2.2.0",
"upday": "2021/2/14",
"version": "2.2.1",
"upday": "2021/3/16",
"description": "QQ protocol!",

@@ -6,0 +6,0 @@ "main": "lib/index.js",

+21
-16

@@ -59,5 +59,9 @@ # oicq

> 使用 createClient() 或 new Client 创建实例
| Method | Description |
| -------------------- | ------------------------- |
| login() | 登录 |
| logout() | 登出 |
| queryQrcodeResult() | 获取扫码结果 |
| submitSlider() | 提交滑动验证码 |

@@ -152,3 +156,4 @@ | sendSmsCode() | 发短信 |

> 所有的`notice.group`和`message.group`事件的上报数据中含有此实例 (`e.group`访问)
> 群。 `notice.group` 和 `message.group` 相关事件中含有此实例 ( `e.group` 访问)
> 或者使用 `client.pickGroup()` 获得群实例

@@ -218,4 +223,5 @@ | Method | Description |

> 继承 [User](#class-user) 的所有方法和属性
> 所有的`notice.friend`和`message.private`事件中含有此实例 (`e.friend`访问)
> 好友。继承 [User](#class-user) 的所有方法和属性
> `notice.friend` 和 `message.private` 相关事件中含有此实例 ( `e.friend` 访问)
> 或者使用 `client.pickFriend()` 获得好友实例

@@ -242,4 +248,5 @@ | Method | Description |

> 继承 [User](#class-user) 的所有方法和属性
> 所有的`message.group`事件中含有此实例 (`e.member`访问)
> 群成员。继承 [User](#class-user) 的所有方法和属性
> `message.group` 相关事件中含有此实例 ( `e.member` 访问)
> 或者使用 `client.pickMember()` 获得群成员实例

@@ -284,7 +291,7 @@ | Method | Description |

| -------- | ----------- |
| client | 所在客户端对象 |
| client | [所在客户端对象](#class-client) |
### Class: Gfs
> 群文件系统
> 群文件系统,通过 `group.fs` 获取

@@ -308,7 +315,8 @@ | Method | Description |

| group | [所在群对象](#class-group) |
| client | 所在客户端对象 |
| client | [所在客户端对象](#class-client) |
### Class: Message
> 拥有子类: PrivateMessage, GroupMessage, DiscussMessage
> 拥有子类: `PrivateMessage`, `GroupMessage`, `DiscussMessage`
> 对应的消息事件中含有这些实例中的一个

@@ -345,9 +353,6 @@ | Method | Description |

### Class: ForwardMessage
> 基本同 `Message`
### Namespace: segment
> const { segment } = require("oicq)
> 用于创建可发送的消息元素类型
> `const { segment } = require("oicq")`

@@ -373,4 +378,4 @@ | Method | Description |

首次登录建议使用扫码,因为使用密码可能需要处理滑动验证码,目前非手机环境的滑动无法通过。
登录几天后不会再弹出滑动验证码,此时建议改用密码登录,更加稳定。
首次登录推荐使用扫码,但是可能会出现掉线后需要重新扫码的情况。
登录一段时间后,不会再弹出滑动验证码,此时建议改用密码登录,更加稳定。

@@ -377,0 +382,0 @@ ```js