欢迎!
#include<bits/stdc++.h>
#define int long long
#define YUANSHEN ios_base::sync_with_stdio(0);
#define QIDONG cin.tie(0);
#define inf 1e18
#define endl '\n'
#define mod 998244353
#define frein freopen(".in","r",stdin);
#define freout freopen(".out","w",stdout);
#define pii pair<int,int>
#define pib pair<int,bool>
#define fi first
#define se second
using namespace std;
const int maxn=1e6+10;
signed main(){
YUANSHEN QIDONG
// frein freout
return 0;
}人机验证脚本
来自MrPython大神
// ==UserScript==
// @name Cloudflare 人机验证辅助脚本
// @namespace https://mrpython.top/
// @version 1.0
// @description 劫持 XMLHttpRequest,在 send 时对特定链接设置 timeout 为 undefined
// @match https://challenges.cloudflare.com/cdn-cgi/challenge-platform/*
// @run-at document-start
// @grant unsafeWindow
// ==/UserScript==
(function() {
'use strict';
// ================= 配置区 =================
// 设置你需要拦截的特定链接特征(可以是完整 URL,也可以是部分路径关键字)
const TARGET_URL_FEATURE = '';
// ==========================================
// 获取网页真实的 window 对象,防止沙盒隔离
const win = unsafeWindow || window;
const XHR = win.XMLHttpRequest;
if (!XHR) {
console.warn('[XHR Hook] 当前环境不支持 XMLHttpRequest');
return;
}
// 保存原生方法的引用,防止被覆盖后丢失
const originalOpen = XHR.prototype.open;
const originalSend = XHR.prototype.send;
/**
* 1. 劫持 open 方法
* 目的:在请求初始化时,捕获并记录请求的 URL 地址
*/
XHR.prototype.open = function(method, url, async, user, password) {
// 将 url 挂载到当前 XHR 实例的自定义属性上
// 使用 String() 是为了兼容某些库传入 URL 对象的情况
this._hook_url = url ? String(url) : '';
// 透传所有参数,调用原生 open 方法
return originalOpen.apply(this, arguments);
};
/**
* 2. 劫持 send 方法
* 目的:在请求真正发送前,检查 URL 并修改 timeout 属性
*/
XHR.prototype.send = function(body) {
const url = this._hook_url;
// 判断当前请求是否匹配目标链接
if (url && url.includes(TARGET_URL_FEATURE)) {
console.log(`%c[XHR Hook] 拦截到目标请求: ${url}`, 'color: #00ff00; font-weight: bold;');
console.log(`[XHR Hook] 修改前 timeout: ${this.timeout}`);
// 按照你的要求,将 timeout 设置为 undefined
this.timeout = undefined;
console.log(`[XHR Hook] 修改后 timeout: ${this.timeout}`);
}
// 透传参数,调用原生 send 方法真正发送请求
return originalSend.apply(this, arguments);
};
console.log('%c[XHR Hook] XMLHttpRequest 劫持已就绪!', 'color: #0088ff; font-weight: bold;');
})();