非线性列车 - 列车中转站只允许移动端访问
非线性列车 - By. Juij 这个资源网站的行为很奇怪,默认下载链接会引导到 列车中转站 去,展示一个大大的 QR code。并且二维码内容中的 目标链接 还添加了移动端检测。
检测的原理是把 navigator.maxTouchPoints 发送到后台,如果数字大于 1 会 302 重定向到网盘地址。
fetch 响应里有段 set-cookie: _dv_data=1|true; Path=/; HttpOnly; Secure; 对应的就是这两个数值
const terminal = document.getElementById("terminal");
const info = {
hasTouch: 'ontouchstart'in window || navigator.maxTouchPoints > 0,
maxTouchPoints: navigator.maxTouchPoints || 0
};
const text = "访问验证中...";
const cursor = document.createElement("span");
cursor.className = "cursor";
cursor.textContent = " ";
terminal.appendChild(cursor);
let i = 0;
function type() {
if (i < text.length) {
cursor.insertAdjacentText("beforebegin", text[i]);
i++;
setTimeout(type, 80);
} else {
setTimeout(redirect, 500);
}
}
function redirect() {
fetch(window.location.href, {
method: "GET",
headers: {
"X-Device-Touch-Points": String(info.maxTouchPoints),
"X-Device-Has-Touch": String(info.hasTouch)
}
}).then(r => r.text()).then(html => {
document.open();
document.write(html);
document.close();
}
).catch( () => window.location.reload());
}
type();如果在移动端往 https://to.juij.fun/ 输入错误的链接,还会被封 IP 24 小时。
无法理解这样限制的目的是什么,毕竟在桌面端绕过这个检测很容易:
扫码可以用 PixPin 截图识别;模拟苹果设备刚好有 户晨风检测设备欺骗 这种脚本能借来使用(安装后改下激活域名列表);或者开发者工具断点修改内存的值。
除了强迫掏出手机扫码恶心人一下,我想不出别的意义。