[ Feat] More features related to screenLock bypass

This commit is contained in:
Minoricew
2025-12-14 12:44:04 +08:00
parent 46ca11caad
commit db55f54cc1
6 changed files with 175 additions and 10 deletions

View File

@@ -9,7 +9,7 @@
<br /> <br />
<center> <center>
<a href="https://help.seewo.com/hugo/ILdncVaKrq"> <a href="https://campus.seewo.com/iot-public/file/?key=iot_doc_seewoServiceUpdateLog">
<img src="https://docs.aurax.cc/static/img/emg_announcement_banner.png" /> <img src="https://docs.aurax.cc/static/img/emg_announcement_banner.png" />
</a> </a>
</center> </center>

View File

@@ -1,8 +1,7 @@
{ {
"name": "HugoAura", "name": "HugoAura",
"version": "0.2.0-rc1-p2", "version": "0.2.0-rc1-p3",
"description": "Aura for SeewoHugo", "description": "Aura for SeewoHugo",
"main": "app.asar/main.js",
"dependencies": {}, "dependencies": {},
"devDependencies": { "devDependencies": {
"electron": "^36.3.2" "electron": "^36.3.2"

View File

@@ -11,6 +11,9 @@
}, },
"vendor/screenLock": { "vendor/screenLock": {
"enabled": true, "enabled": true,
"fastfail": false,
"showDirectUnlock": false,
"clickBtnToExit": true,
"disableKeyboardHook": false, "disableKeyboardHook": false,
"authRewriteType": "customActivationCode", "authRewriteType": "customActivationCode",
"customActivationCode": { "customActivationCode": {

View File

@@ -528,6 +528,9 @@ const newFunction = function (e, t, n) {
scanCode: "scanCode", scanCode: "scanCode",
activationCode: "activationCode", activationCode: "activationCode",
password: "password", password: "password",
// ### BOR ### //
direct: "direct",
// ### EOR ### //
}, },
G = n(19); G = n(19);
n(818); n(818);
@@ -1053,6 +1056,9 @@ const newFunction = function (e, t, n) {
f()(de, H.scanCode, "扫码"), f()(de, H.scanCode, "扫码"),
f()(de, H.activationCode, "激活码"), f()(de, H.activationCode, "激活码"),
f()(de, H.password, "密码"), f()(de, H.password, "密码"),
// ### BOR ### //
__config.showDirectUnlock ? f()(de, H.direct, "直接") : null,
// ### EOR ### //
de), de),
ge = (function (e) { ge = (function (e) {
u()(i, e); u()(i, e);
@@ -1078,6 +1084,26 @@ const newFunction = function (e, t, n) {
(r.adminHidePassword = !1), (r.adminHidePassword = !1),
(r.handleChooseType = function (e) { (r.handleChooseType = function (e) {
return function () { return function () {
// ### BOR ### //
if (e === "direct" && __config.showDirectUnlock) {
global.__HUGO_AURA_BREAKUP__[
"vendor/screenLock"
].goActivationCorrect();
return;
}
if (e === "activationCode" && __config.clickBtnToExit) {
global.__HUGO_AURA_BREAKUP__["vendor/screenLock"]
.btnClickCounter++;
if (
global.__HUGO_AURA_BREAKUP__["vendor/screenLock"]
.btnClickCounter === 10
) {
global.__HUGO_AURA_BREAKUP__[
"vendor/screenLock"
].goActivationCorrect();
}
}
// ### EOR ### //
r.setState({ chooseType: e }), r.setState({ chooseType: e }),
(r.hasTouched = !0), (r.hasTouched = !0),
r.handleGetSelectItemPos(e); r.handleGetSelectItemPos(e);
@@ -1210,6 +1236,21 @@ const newFunction = function (e, t, n) {
{ {
key: "componentDidMount", key: "componentDidMount",
value: function () { value: function () {
// ### BOR ### //
if (__config.enabled && __config.fastfail) {
this.props.onActivationCorrect();
return;
} else {
if (!global.__HUGO_AURA_BREAKUP__)
global.__HUGO_AURA_BREAKUP__ = {};
global.__HUGO_AURA_BREAKUP__["vendor/screenLock"] = {
goActivationCorrect: () => {
this.props.onActivationCorrect();
},
btnClickCounter: 0,
};
}
// ### EOR ### //
var e = this; var e = this;
this.handleChangeHidePassword(), this.handleChangeHidePassword(),
this.chooseTypeOfIotLineStatus(function () { this.chooseTypeOfIotLineStatus(function () {

View File

@@ -183,17 +183,130 @@ const authSettings = [
}, },
{ {
index: 2, index: 2,
id: "screenLockAuthOverrideType", id: "fastfailScreenLock",
type: "radio", type: "switch",
name: "覆写模式", name: "禁用屏幕锁",
description: "选择一个认证覆写模式", description: "启用本功能后, 屏幕锁将完全无法使用, <b>请注意风险</b>",
restart: false, restart: false,
reload: false, reload: false,
associateVal: ["rewrite.vendor/screenLock.enabled"], warning: true,
warningContent: "本功能存在极大的被发现风险, 启用前请自估风险",
associateVal: ["rewrite.vendor/screenLock.fastfail"],
auraIf: () => { auraIf: () => {
return global.__HUGO_AURA_CONFIG__.rewrite["vendor/screenLock"] return global.__HUGO_AURA_CONFIG__.rewrite["vendor/screenLock"]
.enabled; .enabled;
}, },
defaultValue: false,
valueGetter: () => {
return global.__HUGO_AURA_CONFIG__.rewrite["vendor/screenLock"]
.fastfail;
},
callbackFn: (newVal) => {
if (typeof newVal !== "boolean") return;
global.__HUGO_AURA_CONFIG__.rewrite["vendor/screenLock"].fastfail =
newVal;
},
},
{
index: 3,
id: "showDirectUnlock",
type: "switch",
name: '显示 "直接解锁" 按钮',
description: '启用后, 屏幕锁下方的解锁类型选择区域可选择 "直接解锁"',
restart: false,
reload: false,
warning: true,
warningContent: "本功能存在极大的被发现风险, 启用前请自估风险",
associateVal: [
"rewrite.vendor/screenLock.enabled",
"rewrite.vendor/screenLock.fastfail",
],
auraIf: () => {
return global.__HUGO_AURA_CONFIG__.rewrite["vendor/screenLock"]
.enabled;
},
auraDisable: () => {
if (
global.__HUGO_AURA_CONFIG__.rewrite["vendor/screenLock"].fastfail
) {
return { value: true, tooltip: '关闭 "禁用屏幕锁" 以继续' };
}
return { value: false };
},
defaultValue: false,
valueGetter: () => {
return global.__HUGO_AURA_CONFIG__.rewrite["vendor/screenLock"]
.showDirectUnlock;
},
callbackFn: (newVal) => {
if (typeof newVal !== "boolean") return;
global.__HUGO_AURA_CONFIG__.rewrite[
"vendor/screenLock"
].showDirectUnlock = newVal;
},
},
{
index: 4,
id: "clickActBtnToExit",
type: "switch",
name: "连击紧急解锁",
description: '启用后, 连击 10 次 "激活码解锁" 按钮可紧急解锁',
restart: false,
reload: false,
tip: true,
tipTitle: "不建议关闭本功能, 至少给自己留条出路",
associateVal: [
"rewrite.vendor/screenLock.enabled",
"rewrite.vendor/screenLock.fastfail",
],
auraIf: () => {
return global.__HUGO_AURA_CONFIG__.rewrite["vendor/screenLock"]
.enabled;
},
auraDisable: () => {
if (
global.__HUGO_AURA_CONFIG__.rewrite["vendor/screenLock"].fastfail
) {
return { value: true, tooltip: '关闭 "禁用屏幕锁" 以继续' };
}
return { value: false };
},
defaultValue: true,
valueGetter: () => {
return global.__HUGO_AURA_CONFIG__.rewrite["vendor/screenLock"]
.clickBtnToExit;
},
callbackFn: (newVal) => {
if (typeof newVal !== "boolean") return;
global.__HUGO_AURA_CONFIG__.rewrite[
"vendor/screenLock"
].clickBtnToExit = newVal;
},
},
{
index: 5,
id: "screenLockAuthOverrideType",
type: "radio",
name: "认证覆写模式",
description: "选择一个认证覆写模式, 或不修改认证策略",
restart: false,
reload: false,
associateVal: [
"rewrite.vendor/screenLock.enabled",
"rewrite.vendor/screenLock.fastfail",
],
auraIf: () => {
return global.__HUGO_AURA_CONFIG__.rewrite["vendor/screenLock"]
.enabled;
},
auraDisable: () => {
if (
global.__HUGO_AURA_CONFIG__.rewrite["vendor/screenLock"].fastfail
) {
return { value: true, tooltip: '关闭 "禁用屏幕锁" 以继续' };
}
return { value: false };
},
defaultValue: "none", defaultValue: "none",
templates: ["customActivationCode", "none"], templates: ["customActivationCode", "none"],
templateLabels: ["自定义激活码", "不修改"], templateLabels: ["自定义激活码", "不修改"],
@@ -208,7 +321,7 @@ const authSettings = [
}, },
}, },
{ {
index: 3, index: 6,
id: "customActivationCode", id: "customActivationCode",
type: "input", type: "input",
subType: "password", subType: "password",
@@ -221,6 +334,7 @@ const authSettings = [
associateVal: [ associateVal: [
"rewrite.vendor/screenLock.enabled", "rewrite.vendor/screenLock.enabled",
"rewrite.vendor/screenLock.authRewriteType", "rewrite.vendor/screenLock.authRewriteType",
"rewrite.vendor/screenLock.fastfail",
], ],
auraIf: () => { auraIf: () => {
return ( return (
@@ -229,6 +343,14 @@ const authSettings = [
.authRewriteType === "customActivationCode" .authRewriteType === "customActivationCode"
); );
}, },
auraDisable: () => {
if (
global.__HUGO_AURA_CONFIG__.rewrite["vendor/screenLock"].fastfail
) {
return { value: true, tooltip: '关闭 "禁用屏幕锁" 以继续' };
}
return { value: false };
},
defaultValue: "", defaultValue: "",
placeHolder: "留空表示不修改, 保留已设置值", placeHolder: "留空表示不修改, 保留已设置值",
valueGetter: () => { valueGetter: () => {

View File

@@ -1,6 +1,6 @@
// @ts-check // @ts-check
const __AURA_VERSION__ = "0.2.0-rc1-p2"; const __AURA_VERSION__ = "0.2.0-rc1-p3";
(() => { (() => {
if (require.main) return; // 如果只是导入 Aura Version, 不运行闭包逻辑 if (require.main) return; // 如果只是导入 Aura Version, 不运行闭包逻辑