根据流设置定义为目标访客且应被重定向到 black页面的访客,在 white页面上将为其设置一个带有流哈希值的 cookie。
在 hoax.tech 中实现了多种 black页面操作类型。
Set Cookie 操作类型并不用于自动重定向到 black页面,而是为目标访客设置 cookie,以便稍后分配相应操作,例如点击按钮、访问特定页面、下载文件等。
以下是使用 Set Cookie 操作类型在访客点击按钮时重定向到 black页面的示例。
创建一个流。
在集成参数中,将操作类型设置为 Set Cookie。

在 white页面 上集成脚本 (https://setcookie.hoax.tech)。
当流量导向 white页面 后,机器人和目标访客都会停留在 white页面,但目标访客会收到包含流哈希值的 cookie。
接下来的脚本将集成到 white页面 上的“租用”按钮中,用于检查点击该按钮的访客的 cookie。对于目标访客,将重定向到 black页面(在本例中为 https://black.hoax.tech),而对于机器人、审核员及其他访客,将重定向到备用安全页面(在本例中为 https://setcookie.hoax.tech/contact-us )

document.querySelector("#BUTTON").addEventListener("click", function() {
function getCookie(name) {
const matches = document.cookie.match(new RegExp(
"(?:^|; )" + name.replace(/([.$?*|{}()[]\/+^])/g, '\\$1') + "=([^;]*)"
));
return matches ? decodeURIComponent(matches[1]) : null;
}
if (getCookie("FLOW_HASH")) {
window.location.href = atob("BASE64_BLACK_PAGE");
} else {
window.location.href = atob("BASE64_WHITE_PAGE");
}
});
变量说明:
BUTTON — 触发事件的按钮 ID。
FLOW_HASH — 流的 hash,可在 https://hoax.tech/flows 获取。
BASE64_BLACK_PAGE — black页面 的 base64 示例。
BASE64_WHITE_PAGE — white页面 的 base64 示例。
找到 white页面 代码中按钮的 ID 并复制它。如果没有 ID,请为按钮分配一个,例如 "goldbutton"。

为了增强安全性,请使用如 base64decode.org 之类的服务将 white 页面和 black 页面 的链接进行 base64 编码。

将所有变量添加到代码中,代码将如下所示:
document.querySelector("#goldbutton").addEventListener("click", function() {
function getCookie(name) {
const matches = document.cookie.match(new RegExp(
"(?:^|; )" + name.replace(/([.$?*|{}()[]\/+^])/g, '\\$1') + "=([^;]*)"
));
return matches ? decodeURIComponent(matches[1]) : null;
}
if (getCookie("4126123ffb74b745e81c70f3bfb686df")) {
window.location.href = atob("aHR0cHM6Ly9ibGFjay5ob2F4LnRlY2g=");
} else {
window.location.href = atob("aHR0cHM6Ly9zZXRjb29raWUuaG9heC50ZWNoL2NvbnRhY3QtdXM=");
}
});
将生成的脚本插入到 white页面 的 index 文件(index2.php)底部的 <script></script> 标签之间。

然后保存该文件。
您还可以对 JS 脚本进行混淆,以防广告网络的爬虫识别其用途。您可以使用此服务:https://obfuscator.io/
结果:
function _0x44c4(){const _0xe4c0fc=['403347WWuKVP','8fEDpfp','27072aUCRWv','aHR0cHM6Ly9ibGFjay5ob2F4LnRlY2g=','addEventListener','9391824hodZYU','3726506YANKlF','4126123ffb74b745e81c70f3bfb686df','aHR0cHM6Ly9zZXRjb29raWUuaG9heC50ZWNoL2NvbnRhY3QtdXM=','768945BCWBCp','#goldbutton','1460530wQGfLy','8pIPjbO','href','click','(?:^|;\x20)','3695868Lymavf','location','replace','querySelector'];_0x44c4=function(){return _0xe4c0fc;};return _0x44c4();}function _0x21a8(_0x3ae868,_0x451a7c){const _0x44c499=_0x44c4();return _0x21a8=function(_0x21a859,_0xadcba8){_0x21a859=_0x21a859-0x18e;let _0x236e1f=_0x44c499[_0x21a859];return _0x236e1f;},_0x21a8(_0x3ae868,_0x451a7c);}const _0xed30a5=_0x21a8;(function(_0x37da8d,_0x52157d){const _0x4c2e78=_0x21a8,_0x43e449=_0x37da8d();while(!![]){try{const _0xda49f9=-parseInt(_0x4c2e78(0x19b))/0x1+parseInt(_0x4c2e78(0x19d))/0x2+parseInt(_0x4c2e78(0x190))/0x3*(parseInt(_0x4c2e78(0x193))/0x4)+parseInt(_0x4c2e78(0x192))/0x5+-parseInt(_0x4c2e78(0x197))/0x6+parseInt(_0x4c2e78(0x1a1))/0x7*(-parseInt(_0x4c2e78(0x19c))/0x8)+parseInt(_0x4c2e78(0x1a0))/0x9;if(_0xda49f9===_0x52157d)break;else _0x43e449['push'](_0x43e449['shift']());}catch(_0x107c00){_0x43e449['push'](_0x43e449['shift']());}}}(_0x44c4,0x4bb6d),document[_0xed30a5(0x19a)](_0xed30a5(0x191))[_0xed30a5(0x19f)](_0xed30a5(0x195),function(){const _0x8a7688=_0xed30a5;function _0x4d91d4(_0x1cc909){const _0x113a72=_0x21a8,_0x31c119=document['cookie']['match'](new RegExp(_0x113a72(0x196)+_0x1cc909[_0x113a72(0x199)](/([.$?*|{}()[]\/+^])/g,'\x5c$1')+'=([^;]*)'));return _0x31c119?decodeURIComponent(_0x31c119[0x1]):null;}_0x4d91d4(_0x8a7688(0x18e))?window[_0x8a7688(0x198)][_0x8a7688(0x194)]=atob(_0x8a7688(0x19e)):window[_0x8a7688(0x198)][_0x8a7688(0x194)]=atob(_0x8a7688(0x18f));}));
设置完成。
以下是一个示例脚本,目标访客将被重定向到 black页面,而对于爬虫和审核人员,按钮将无法使用。在这种情况下,不需要第二个 white页面。
document.querySelector("#BUTTON").addEventListener("click", function() {
function getCookie(name) {
const matches = document.cookie.match(new RegExp(
"(?:^|; )" + name.replace(/([.$?*|{}()[]\/+^])/g, '\\$1') + "=([^;]*)"
));
return matches ? decodeURIComponent(matches[1]) : null;
}
if (getCookie("FLOW_HASH")) {
window.location.href = atob("BASE64_BLACK_PAGE");
}
});