2381 字
12 分钟
记录华为云获得1000元云资源券

起因#

在论坛里看到了华为云新手福利?正巧我没入手过华为云。曾经注册过,为了看看有没有学生福利。像是阿里云和腾讯云的那样,那时候没找到,所以注销了。现在重新注册,不知是否算新号。

活动#

云学堂集证有礼·码力全开#

活动里做任务获得积分。

积分数奖品(2选1)-奖品限量,必须足够积分再填写兑换问卷
4分200元云资源券/
8分400元云资源券/
12分600元云资源券400元云资源券+开发者定制帆布包
14分700元云资源券1099元工作级开发者认证券—限量50
16分800元云资源券600元云资源券+云宝盲盒—限量100
20分1000元云资源券700元云资源券+开发者定制双肩包—限量50
50分1200云资源券900元云资源券+开发者定制水杯—限量50
积分榜二(且≥100分)1500元云资源券1200元云资源券+1个华为耳机freebuds SE2
积分榜一(且≥200分)2000元云资源券1500元云资源券+1个华为手环9
序号部分认证名称(含购买入口)考试通过可获得积分数价格
1ModelArts实现零售商客户分群228
2实现图片压缩及水印添加228
3基于鲲鹏搭建zabbix分布式监控系统228
4听歌识曲-抖音小视频背景音乐识别228
5华为云数据库服务实践228
6华为云计算服务实践228
7点击了解更多认证(考取同样可以积分)—免费激活微认证不算积分2/
8任意1门HCCDA入门级开发者认证(除大数据外)4分/个700
9任意1门HCCDP工作级开发者认证1100

20积分还是好拿的,报名活动之后会获得6张微认证代金券,花6块考完试得到证书,就获得了12积分

通过4门考试之后还可以**点此申请1张699元开发者认证代金券+任选3张微认证代金券(27元/37元/47元/57元)**。微认证最高获得18积分,所以还必须通过一门开发者认证,就比如华为云欧拉(HCE OS)操作系统入门级开发者认证,获得4积分,再选择2个微认证

12+4+4=20,就完成了。

ps:#

在中途我还报名了华为云微认证专场。为了得到120元云资源代金券

后面我才发现若在通过认证期间,领取了其他云学堂活动的微认证福利,则无法领取本活动福利。

而在集证有礼里也有相关的提示

若在通过认证期间,领取了其他云学堂活动的微认证福利,则无法领取本活动福利。

我只是报名了华为云微认证专场的活动,还没获得福利。而且这个奖励如果在我拿到1000券之后发放,或者不发,我的1000应该不会泡汤。只能希望这个华为云微认证专场发的**120元云资源代金券**可以慢一点了,下一次公示在9.22,应该来得及。

考试过程#

微认证都还是比较简单的,期间要需要摄像头、切屏检测。不过摄像头可以使用obs的虚拟摄像头,防切屏检测也有相应的脚本。

//通用阻止切屏检测
// ==UserScript==
// @name 通用阻止切屏检测
// @namespace http://tampermonkey.net/
// @version 0.1.0
// @description 尝试阻止各类网站的切屏、焦点丢失等检测
// @author nodeseek@小号 && Gemini
// @match http://*/*
// @match https://*/*
// @run-at document-start
// @grant unsafeWindow
// @license GPL-3.0
// ==/UserScript==
(function () {
'use strict';
const window = unsafeWindow; // 使用原始 window 对象
// 黑名单事件,这些事件的监听器将被阻止
const blackListedEvents = new Set([
"visibilitychange", // 页面可见性改变
"blur", // 元素或窗口失去焦点
"focus", // 元素或窗口获得焦点 (某些检测可能反向利用focus)
"pagehide", // 页面隐藏(例如导航到其他页面)
"freeze", // 页面被冻结 (较新的事件)
"resume", // 页面从冻结状态恢复 (较新的事件)
"mouseleave", // 鼠标移出元素(通常是 document 或 body)
"mouseout", // 鼠标移出元素(更通用的移出,但要小心副作用)
// "focusout", // 元素将要失去焦点(与blur类似,但更通用,看情况添加)
// "focusin", // 元素将要获得焦点(与focus类似,看情况添加)
]);
// 白名单属性,这些属性在 document 对象上将被伪造
const spoofedDocumentProperties = {
hidden: { value: false, configurable: true },
mozHidden: { value: false, configurable: true }, // Firefox (旧版)
msHidden: { value: false, configurable: true }, // Internet Explorer
webkitHidden: { value: false, configurable: true }, // Chrome, Safari, Opera (旧版 Blink/WebKit)
visibilityState: { value: "visible", configurable: true },
hasFocus: { value: () => true, configurable: true }
};
// 需要清空/置空的事件处理器属性 (on-event handlers)
const eventHandlersToNullifyDocument = [
"onvisibilitychange",
"onblur",
"onfocus",
"onmouseleave",
"onmouseout",
// "onfocusout",
// "onfocusin",
"onpagehide",
"onfreeze",
"onresume"
];
const eventHandlersToNullifyWindow = [
"onblur",
"onfocus",
"onpagehide",
"onpageshow", // 有些检测可能通过 pageshow 结合 persisted 属性判断
"onfreeze",
"onresume",
"onmouseleave", // window 也有 onmouseleave
"onmouseout"
];
const isDebug = false; // 设置为 true 以启用调试日志
const scriptPrefix = "[通用阻止切屏检测]";
const log = console.log.bind(console, `%c${scriptPrefix}`, 'color: #4CAF50; font-weight: bold;');
const warn = console.warn.bind(console, `%c${scriptPrefix}`, 'color: #FFC107; font-weight: bold;');
const error = console.error.bind(console, `%c${scriptPrefix}`, 'color: #F44336; font-weight: bold;');
const debug = isDebug ? log : () => { };
/**
* 伪装函数的 toString 方法,使其看起来像原始函数。
* @param {Function} modifiedFunction 被修改的函数
* @param {Function} originalFunction 原始函数
*/
function patchToString(modifiedFunction, originalFunction) {
if (typeof modifiedFunction !== 'function' || typeof originalFunction !== 'function') {
warn("patchToString: 传入的参数不是函数。", modifiedFunction, originalFunction);
return;
}
try {
const originalToStringSource = Function.prototype.toString.call(originalFunction);
modifiedFunction.toString = () => originalToStringSource;
// 进一步伪装 toString.toString
const originalToStringToStringSource = Function.prototype.toString.call(originalFunction.toString);
Object.defineProperty(modifiedFunction.toString, 'toString', {
value: () => originalToStringToStringSource,
enumerable: false,
configurable: true, // 保持可配置,以防万一
writable: false
});
debug(`patchToString applied for: ${originalFunction.name || 'anonymous function'}`);
} catch (e) {
error("patchToString failed:", e, "for function:", originalFunction.name);
}
}
/**
* 劫持并修改对象的 addEventListener 方法。
* @param {EventTarget} targetObject 要劫持的对象 (window, document, Element)
* @param {string} objectName 用于日志记录的对象名称
*/
function patchAddEventListener(targetObject, objectName) {
if (!targetObject || typeof targetObject.addEventListener !== 'function') {
warn(`Cannot patch addEventListener for invalid target: ${objectName}`);
return;
}
const originalAddEventListener = targetObject.addEventListener;
targetObject.addEventListener = function (type, listener, optionsOrCapture) {
if (blackListedEvents.has(type.toLowerCase())) {
log(`BLOCKED ${objectName}.addEventListener: ${type}`);
return undefined; // 阻止添加黑名单中的事件监听器
}
debug(`ALLOWED ${objectName}.addEventListener: ${type}`, listener, optionsOrCapture);
return originalAddEventListener.call(this, type, listener, optionsOrCapture);
};
patchToString(targetObject.addEventListener, originalAddEventListener);
log(`${objectName}.addEventListener patched.`);
}
/**
* 劫持并修改对象的 removeEventListener 方法 (可选,但建议一起修改)。
* @param {EventTarget} targetObject 要劫持的对象
* @param {string} objectName 用于日志记录的对象名称
*/
function patchRemoveEventListener(targetObject, objectName) {
if (!targetObject || typeof targetObject.removeEventListener !== 'function') {
warn(`Cannot patch removeEventListener for invalid target: ${objectName}`);
return;
}
const originalRemoveEventListener = targetObject.removeEventListener;
targetObject.removeEventListener = function (type, listener, optionsOrCapture) {
if (blackListedEvents.has(type.toLowerCase())) {
log(`Original call to ${objectName}.removeEventListener for blacklisted event '${type}' would have been ignored by our addEventListener patch anyway. Allowing native call if needed.`);
// 即使我们阻止了 addEventListener,原始的 removeEventListener 仍然应该能安全调用
// 因为如果监听器从未被添加,调用 remove 也无害。
}
debug(`PASSTHROUGH ${objectName}.removeEventListener: ${type}`, listener, optionsOrCapture);
return originalRemoveEventListener.call(this, type, listener, optionsOrCapture);
};
patchToString(targetObject.removeEventListener, originalRemoveEventListener);
log(`${objectName}.removeEventListener patched.`);
}
/**
* 修改对象上的属性,使其返回伪造的值。
* @param {object} targetObject 目标对象 (e.g., document)
* @param {object} propertiesToSpoof 属性描述对象
* @param {string} objectName 对象名称
*/
function spoofProperties(targetObject, propertiesToSpoof, objectName) {
if (!targetObject) {
warn(`Cannot spoof properties for invalid target: ${objectName}`);
return;
}
for (const prop in propertiesToSpoof) {
if (Object.prototype.hasOwnProperty.call(propertiesToSpoof, prop)) {
try {
Object.defineProperty(targetObject, prop, propertiesToSpoof[prop]);
debug(`Spoofed ${objectName}.${prop}`);
} catch (e) {
error(`Failed to spoof ${objectName}.${prop}:`, e);
}
}
}
log(`${objectName} properties spoofed.`);
}
/**
* 清空或置空对象上的事件处理器属性。
* @param {object} targetObject 目标对象
* @param {string[]} eventHandlerNames 事件处理器名称数组
* @param {string} objectName 对象名称
*/
function nullifyEventHandlers(targetObject, eventHandlerNames, objectName) {
if (!targetObject) {
warn(`Cannot nullify event handlers for invalid target: ${objectName}`);
return;
}
eventHandlerNames.forEach(handlerName => {
try {
Object.defineProperty(targetObject, handlerName, {
get: () => {
debug(`Access to ${objectName}.${handlerName} (get), returning undefined.`);
return undefined;
},
set: (newHandler) => {
log(`Attempt to set ${objectName}.${handlerName} blocked.`);
if (typeof newHandler === 'function') {
// 可以选择性地调用 newHandler,或者完全阻止
// debug(`(Blocked) Handler function was:`, newHandler);
}
},
configurable: true // 保持可配置,以便脚本可以多次运行或被其他脚本修改
});
debug(`Nullified ${objectName}.${handlerName}`);
} catch (e) {
error(`Failed to nullify ${objectName}.${handlerName}:`, e);
}
});
log(`${objectName} on-event handlers nullified.`);
}
// --- 开始执行 ---
log("Script starting...");
// 1. 劫持 window 和 document 的 addEventListener/removeEventListener
patchAddEventListener(window, "window");
patchRemoveEventListener(window, "window"); // 也 patch removeEventListener 以保持一致性
patchAddEventListener(document, "document");
patchRemoveEventListener(document, "document");
// 2. 修改 document 的属性
spoofProperties(document, spoofedDocumentProperties, "document");
// 3. 置空 document 和 window 上的事件处理器
nullifyEventHandlers(document, eventHandlersToNullifyDocument, "document");
nullifyEventHandlers(window, eventHandlersToNullifyWindow, "window");
// 4. 对于 document.body,需要等待 DOMContentLoaded
// 使用 MutationObserver 确保 body 存在时立即 patch,比 DOMContentLoaded 更早且更可靠
const observer = new MutationObserver((mutations, obs) => {
if (document.body) {
patchAddEventListener(document.body, "document.body");
patchRemoveEventListener(document.body, "document.body");
// 对于 document.body,也可以考虑 nullify onmouseleave, onmouseout 等
nullifyEventHandlers(document.body, ["onmouseleave", "onmouseout", "onblur", "onfocus"], "document.body");
log("document.body patched via MutationObserver.");
obs.disconnect(); // 完成任务后断开观察者
}
});
if (document.body) { // 如果 body 已经存在 (不太可能在 document-start,但以防万一)
patchAddEventListener(document.body, "document.body");
patchRemoveEventListener(document.body, "document.body");
nullifyEventHandlers(document.body, ["onmouseleave", "onmouseout", "onblur", "onfocus"], "document.body");
log("document.body patched directly.");
} else {
observer.observe(document.documentElement || document, { childList: true, subtree: true });
}
// 5. 调试:劫持计时器 (如果 isDebug 为 true)
if (isDebug) {
const originalSetInterval = window.setInterval;
window.setInterval = function(...args) {
const id = originalSetInterval.apply(this, args);
debug("calling window.setInterval", id, args);
return id;
};
patchToString(window.setInterval, originalSetInterval);
const originalSetTimeout = window.setTimeout;
window.setTimeout = function(...args) {
const id = originalSetTimeout.apply(this, args);
debug("calling window.setTimeout", id, args);
return id;
};
patchToString(window.setTimeout, originalSetTimeout);
log("Timer functions (setInterval, setTimeout) wrapped for debugging.");
}
log("Script execution finished. Monitoring active.");
})();

尾声#

配合ai应该算简单的。现在还等着开发者证书发下来。需要5个自然日证书才会生成,还需等待几天◐▽◑。1000元怎么使用还可以再水一篇,开发者入门认证的考试也可以再水一篇o( ̄┰ ̄*)ゞ。

记录华为云获得1000元云资源券
https://blog.xomoe.cn/posts/2025-08-31/get-huawei-cloud-1000/
作者
发布于
2025-08-31
许可协议
CC BY-NC-SA 4.0
页面浏览量:0

💡 评论需审核