// ==UserScript== // @name 羊了个羊测试 // @namespace http://tampermonkey.net/ // @version 0.2 // @description 直接提交过关时间 // @author tfsn20 // @icon https://f.start.me/cat-match.easygame2021.com // @match cat-match.easygame2021.com // @grant GM_xmlhttpRequest // @grant GM_getValue // ==/UserScript== /* ==UserConfig== 必填: t: # 键值为group.config,例如本键为:group1.configA title: 请求头参数t # 配置的标题 description: 抓包获取 # 配置的描述内容 password: true # 设置为密码 --- 可选: rankTime: title: 过关耗时 description: 不要太短 default: 59 ua: title: UA description: 客户端或应用UA, 抓包获取 default: Mozilla/5.0 (Linux; Android 10; PACM00 Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/3262 MMWEBSDK/20211001 Mobile Safari/537.36 MMWEBID/1772 MicroMessenger/8.0.16.2040(0x2800103A) Process/appbrand1 WeChat/arm32 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android refer: title: 请求头参数refer description: 抓包获取 default: https://servicewechat.com/wx242cfu8c65w124d2/15/page-frame.html ==/UserConfig== */ (function () { function sheep() { return new Promise((resolve, reject) => { GM_xmlhttpRequest({ url: `https://cat-match.easygame2021.com/sheep/v1/game/game_over?rank_score=1&rank_state=1&rank_time=${GM_getValue('可选.rankTime')}&rank_role=1&skin=1`, method: 'get', anonymous: true, headers: { 'User-Agent': `${GM_getValue('可选.ua')}`, 'Accept-Encoding': 'gzip,compress,br,deflate', 'Content-Type': 'application/json', 'charset': 'utf-8', 'Host': `cat-match.easygame2021.com`, 'Referer': `${GM_getValue('可选.refer')}`, 't': `${GM_getValue('必填.t')}` }, onload: function (xhr) { let json = xhr.response console.info({ result: json }); console.info(json==`{"err_code":0,"err_msg":"","data":0}`?'成功':'失败') resolve(json) } }) }) }; sheep(); })();