cortico-world-hands 0.20.32 → 0.20.34

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.
Files changed (2) hide show
  1. package/dist/index.js +13 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2705,12 +2705,24 @@ ${lines.join("\n")}
2705
2705
  return;
2706
2706
  }
2707
2707
  if (!ui || !ui.ok) return;
2708
+ const pkg = (ui.pkg || "").toLowerCase();
2709
+ const sensitivePkg = /bank|pay|alipay|wallet|icbc|cmb|spdb|ccb|boc|abc|unionpay|passport|keystore|password|vault|authenticator|com\.eg\.android|com\.tencent\.mm|com\.tencent\.mobileqq|com\.icbc|com\.chinamworld/.test(pkg);
2710
+ if (sensitivePkg) {
2711
+ if (this.lastScreenKey === "private|" + pkg) return;
2712
+ this.lastScreenKey = "private|" + pkg;
2713
+ await this.pushEvent(
2714
+ `[\u9690\u79C1] \u73B0\u5728\u524D\u53F0\u662F ${ui.pkg}\u3002\u8FD9\u79CD\u753B\u9762\u6211\u4E0D\u770B\u3001\u4E5F\u4E0D\u8BB0\u2014\u2014\u4E3B\u4EBA\u7EE7\u7EED\u5C31\u884C\u3002`,
2715
+ "hands.screen.privacy",
2716
+ "hands:screen"
2717
+ );
2718
+ return;
2719
+ }
2708
2720
  const texts = ui.items.map((i) => (i.text || "").trim()).filter((t) => t.length > 1).slice(0, 25);
2709
2721
  const key = ui.pkg + "|" + texts.slice(0, 8).join("\xA6");
2710
2722
  if (key === this.lastScreenKey) return;
2711
2723
  this.lastScreenKey = key;
2712
2724
  const blob = texts.slice(0, 10).map((t) => `\u300C${t.slice(0, 20)}\u300D`).join(" ");
2713
- const secret = /密码|验证码|支付|银行卡|身份证|转账|付款/.test(blob) || /bank|pay|alipay|wallet|icbc|cmb|spdb|passport/.test(ui.pkg.toLowerCase());
2725
+ const secret = /密码|验证码|支付|银行卡|身份证|转账|付款/.test(blob);
2714
2726
  if (secret) {
2715
2727
  await this.pushEvent(
2716
2728
  `[\u9690\u79C1] \u73B0\u5728\u524D\u53F0\u662F ${ui.pkg}\uFF0C\u770B\u7740\u50CF\u5BC6\u7801/\u652F\u4ED8/\u8BC1\u4EF6\u8FD9\u7C7B\u753B\u9762\u3002\u6211\u4E0D\u7EC6\u770B\u3001\u4E5F\u4E0D\u8BB0\u2014\u2014\u4E3B\u4EBA\u7EE7\u7EED\u5C31\u884C\u3002`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cortico-world-hands",
3
- "version": "0.20.32",
3
+ "version": "0.20.34",
4
4
  "type": "module",
5
5
  "description": "Cortico World: hands for the desktop pet — looks at the phone screen, then taps, swipes, pinches, drags, types and presses keys through whatever actuator the device actually has",
6
6
  "license": "MIT",