├── dict.js ├── dongqiudi.js ├── response.json ├── nicegram_body.js ├── README.md ├── weibo_search_info.json ├── baishitv.js ├── cokemv.js ├── cupbox.js ├── 555.js ├── bdys.js ├── bimi.js ├── ddys.js ├── dsx.js ├── tkys.js ├── freeok.js ├── gimytv.js ├── libvio.js ├── qianoo.js ├── 18comic.js ├── netflix.js ├── ytg.js ├── lezhu.js ├── startup.js ├── zhihu.js ├── iqiyi_json.js ├── adguard.js ├── weibo_search_topic.json ├── ithome.js ├── hanglvzongheng.js ├── qidian.js ├── deleteHeader.js ├── pupumarket.js ├── deleteAeapi.js ├── amdc.js ├── clear_qxdns_cache.js ├── zhenbuka.js ├── shunfeng_json.js ├── jabi.js ├── bilibili_space_10.js ├── applet.js ├── bing.js ├── demo.js ├── sample.js ├── manhuatailite.js ├── nmtk.js ├── zhangshanggongjiao.js ├── stay.js ├── iqiyi_open_ads.js ├── v2ex.js ├── xiaodaka.js ├── pornhub.js ├── caixinads.js ├── fly.js ├── zhihu_openads.js ├── nivod.js ├── jd_json.js ├── 12306.js ├── 555Ad.js ├── bdcloud.js ├── ahfs.js ├── caiyun.js ├── one.js ├── bilibili_startup_direct.js ├── alidrive.js ├── tf.js ├── jianshu.js ├── ctripAds.js ├── setu.js ├── wechat_auto_read.js ├── keepStyle.js ├── cainiao_json.js ├── ximalaya_json.js ├── caiyun_json.js ├── smzdm_json.js ├── ForceInstall.js ├── pinganads.js ├── chelaile.js ├── endlessgoogle.js ├── bilibili_json.js ├── ali.js ├── reddit.js ├── liwo.js ├── bilibili_switch.js ├── shuxiangmendi.js ├── coolapk.js ├── Olympic2024.js ├── bilibili_cc.js ├── amap.js ├── block100.js ├── debao.js ├── tclx.js └── pushCode.js /dict.js: -------------------------------------------------------------------------------- 1 | $done({body:'{}'}) 2 | -------------------------------------------------------------------------------- /dongqiudi.js: -------------------------------------------------------------------------------- 1 | {"sdk":[],"addata":[]} 2 | -------------------------------------------------------------------------------- /response.json: -------------------------------------------------------------------------------- 1 | {"msg":"SUCESS","code":0} 2 | -------------------------------------------------------------------------------- /nicegram_body.js: -------------------------------------------------------------------------------- 1 | { 2 | "data": { 3 | "premiumAccess": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Hits](https://hits.sh/github.com/ddgksf2013.svg.svg?label=Visitor%20Count)](https://hits.sh/github.com/ddgksf2013.svg/) 2 | ### Scripts 3 | 4 | -------------------------------------------------------------------------------- /weibo_search_info.json: -------------------------------------------------------------------------------- 1 | $done({body:'{"data":{"expiration_time":"86400","cards":[{"tip":"\u641c\u7d22\u5fae\u535a","word":""}]},"info":"","retcode":0}'}) 2 | -------------------------------------------------------------------------------- /baishitv.js: -------------------------------------------------------------------------------- 1 | var obj=JSON.parse($response.body);obj.dt.data=Object.values(obj.dt.data).filter(a=>-1===a.jumpTypeString.indexOf("广告")),$done({body:JSON.stringify(obj)}); 2 | -------------------------------------------------------------------------------- /cokemv.js: -------------------------------------------------------------------------------- 1 | var body = $response.body 2 | .replace(//, ''); 3 | $done({ body }); 4 | -------------------------------------------------------------------------------- /cupbox.js: -------------------------------------------------------------------------------- 1 | var body = $response.body.replace(//, ''); 2 | $done({ body }); 3 | -------------------------------------------------------------------------------- /555.js: -------------------------------------------------------------------------------- 1 | /* 公众号墨鱼手记 crated by ddgksf2013 on 2022-05-28 */ 2 | var body = $response.body 3 | .replace(//, ''); 4 | $done({ body }); 5 | -------------------------------------------------------------------------------- /bdys.js: -------------------------------------------------------------------------------- 1 | /* 公众号墨鱼手记 crated by ddgksf2013 on 2022-05-28 */ 2 | var body = $response.body 3 | .replace(//, ''); 4 | $done({ body }); 5 | -------------------------------------------------------------------------------- /bimi.js: -------------------------------------------------------------------------------- 1 | /* 公众号墨鱼手记 crated by ddgksf2013 on 2022-05-28 */ 2 | var body = $response.body 3 | .replace(//, ''); 4 | $done({ body }); 5 | -------------------------------------------------------------------------------- /ddys.js: -------------------------------------------------------------------------------- 1 | /* 公众号墨鱼手记 crated by ddgksf2013 on 2022-05-28 */ 2 | var body = $response.body 3 | .replace(//, ''); 4 | $done({ body }); 5 | -------------------------------------------------------------------------------- /dsx.js: -------------------------------------------------------------------------------- 1 | /* 公众号墨鱼手记 crated by ddgksf2013 on 2022-08-14 */ 2 | var body = $response.body 3 | .replace(//, ''); 4 | $done({ body }); 5 | -------------------------------------------------------------------------------- /tkys.js: -------------------------------------------------------------------------------- 1 | /* 公众号墨鱼手记 crated by ddgksf2013 on 2022-05-28 */ 2 | var body = $response.body 3 | .replace(//, ''); 4 | $done({ body }); 5 | -------------------------------------------------------------------------------- /freeok.js: -------------------------------------------------------------------------------- 1 | /* 公众号墨鱼手记 crated by ddgksf2013 on 2023-07-08 */ 2 | 3 | var body = $response.body.replace(//, ''); 4 | $done({ body }); 5 | -------------------------------------------------------------------------------- /gimytv.js: -------------------------------------------------------------------------------- 1 | /* 公众号墨鱼手记 crated by ddgksf2013 on 2022-05-28 */ 2 | var body = $response.body 3 | .replace(//, ''); 4 | $done({ body }); 5 | -------------------------------------------------------------------------------- /libvio.js: -------------------------------------------------------------------------------- 1 | /* 公众号墨鱼手记 crated by ddgksf2013 on 2022-05-28 */ 2 | var body = $response.body 3 | .replace(//, ''); 4 | $done({ body }); 5 | -------------------------------------------------------------------------------- /qianoo.js: -------------------------------------------------------------------------------- 1 | /* 公众号墨鱼手记 crated by ddgksf2013 on 2022-05-28 */ 2 | var body = $response.body 3 | .replace(//, ''); 4 | $done({ body }); 5 | -------------------------------------------------------------------------------- /18comic.js: -------------------------------------------------------------------------------- 1 | /* 公众号墨鱼手记 crated by ddgksf2013 on 2022-05-28 */ 2 | var body = $response.body 3 | .replace(//, ''); 4 | $done({ body }); 5 | -------------------------------------------------------------------------------- /netflix.js: -------------------------------------------------------------------------------- 1 | 2 | /* 公众号墨鱼手记 crated by ddgksf2013 on 2022-10-30 */ 3 | var body = $response.body 4 | .replace(//, ''); 5 | $done({ body }); -------------------------------------------------------------------------------- /ytg.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | var wallpaperId = $request.url.match(/wallpaperId%22%3A%22(\w+)%22/)[1]; 5 | 6 | var openUrl = 'https://hwoss.ibzhi.com/wallpaper/'+wallpaperId+'.jpg'; 7 | 8 | $notify("墨鱼手记", "", "点击我",{"open-url":openUrl}); 9 | 10 | $done({}); 11 | -------------------------------------------------------------------------------- /lezhu.js: -------------------------------------------------------------------------------- 1 | /* 公众号墨鱼手记 crated by ddgksf2013 on 2022-05-28 */ 2 | var body = $response.body 3 | .replace(//, '') 4 | .replace(/jquerys.js\?v/g, "ddgksf2013.js?v"); 5 | $done({ body }); 6 | -------------------------------------------------------------------------------- /startup.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | let obj=JSON.parse($response.body); 6 | /*京喜APP*/ 7 | if (/^https?:\/\/api\.m\.jd\.com\/api\?functionId=delivery_show/.test($request.url)) { 8 | obj.data.materialList.startTime=3667476800000; 9 | obj.data.materialList.endTime =3667908800000; 10 | } 11 | $done({body:JSON.stringify(obj)}); 12 | -------------------------------------------------------------------------------- /zhihu.js: -------------------------------------------------------------------------------- 1 | /*********************************************** 2 | > 应用名称:墨鱼自用知乎去广告脚本 3 | > 脚本作者:@ddgksf2013 4 | > 微信账号:墨鱼手记 5 | > 更新时间:2023-02-21 6 | > 通知频道:https://t.me/ddgksf2021 7 | > 贡献投稿:https://t.me/ddgksf2013_bot 8 | > 问题反馈:ddgksf2013@163.com 9 | > 特别提醒:如需转载请注明出处,谢谢合作! 10 | ***********************************************/ 11 | -------------------------------------------------------------------------------- /iqiyi_json.js: -------------------------------------------------------------------------------- 1 | /*********************************************** 2 | > 应用名称:墨鱼自用爱奇艺去广告脚本 3 | > 脚本作者:@ddgksf2013 4 | > 微信账号:墨鱼手记 5 | > 更新时间:2023-02-21 6 | > 通知频道:https://t.me/ddgksf2021 7 | > 贡献投稿:https://t.me/ddgksf2013_bot 8 | > 问题反馈:ddgksf2013@163.com 9 | > 特别提醒:如需转载请注明出处,谢谢合作! 10 | ***********************************************/ 11 | -------------------------------------------------------------------------------- /adguard.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | var body = $response.body.replace( 4 | //, 5 | ` 6 | ` 15 | ); 16 | $done({ body }); 17 | -------------------------------------------------------------------------------- /weibo_search_topic.json: -------------------------------------------------------------------------------- 1 | $done({body:'{"data":[],"info":"","retcode":0,"ext":{"search_hot_simple":{"title":"\u70ed\u95e8\u641c\u7d22","desc":"","more":"\u66f4\u591a\u70ed\u641c"},"search_hot":{"title":"\u5fae\u535a\u70ed\u641c\u699c","desc":"\u5b9e\u65f6\u70ed\u70b9\uff0c\u6bcf\u5206\u949f\u66f4\u65b0\u4e00\u6b21","more":""},"search_city":{"title":"\u540c\u57ce\u70ed\u70b9","desc":"","more":""}}}'}) 2 | -------------------------------------------------------------------------------- /ithome.js: -------------------------------------------------------------------------------- 1 | /*********************************************** 2 | > 应用名称:ithome去除信息流广告 3 | > 脚本作者:@ddgksf2013 4 | > 微信账号:墨鱼手记 5 | > 更新时间:2024-10-12 6 | > 通知频道:https://t.me/ddgksf2021 7 | > 贡献投稿:https://t.me/ddgksf2013_bot 8 | > 问题反馈:ddgksf2013@163.com 9 | > 特别提醒:如需转载请注明出处,谢谢合作! 10 | ***********************************************/ 11 | 12 | const version = 'V1.0.1'; 13 | 14 | var obj=JSON.parse($response.body);obj.data.list=Object.values(obj.data.list).filter(a=>2!=a.feedContent.flag),$done({body:JSON.stringify(obj)}); 15 | -------------------------------------------------------------------------------- /hanglvzongheng.js: -------------------------------------------------------------------------------- 1 | /*********************************************** 2 | > 应用名称:墨鱼自用航旅纵横脚本 3 | > 脚本作者:@ddgksf2013 4 | > 微信账号:墨鱼手记 5 | > 更新时间:2022-10-26 6 | > 通知频道:https://t.me/ddgksf2021 7 | > 贡献投稿:https://t.me/ddgksf2013_bot 8 | > 问题反馈:ddgksf2013@163.com 9 | > 特别提醒:如需转载请注明出处,谢谢合作! 10 | ***********************************************/ 11 | 12 | 13 | const version = 'V1.0.2'; 14 | 15 | var ua=$request.headers.rpid||$request.headers.Rpid;ua.includes("10000012")||ua.includes("1000019")?$done({status:"HTTP/1.1 404 Not Found"}):$done({}); 16 | -------------------------------------------------------------------------------- /qidian.js: -------------------------------------------------------------------------------- 1 | /*********************************************** 2 | > 应用名称:墨鱼自用奇点阅读去广告脚本 3 | > 脚本作者:@ddgksf2013 4 | > 微信账号:墨鱼手记 5 | > 更新时间:2024-09-14 6 | > 通知频道:https://t.me/ddgksf2021 7 | > 贡献投稿:https://t.me/ddgksf2013_bot 8 | > 问题反馈:ddgksf2013@163.com 9 | > 特别提醒:如需转载请注明出处,谢谢合作! 10 | ***********************************************/ 11 | 12 | 13 | const version = 'V1.0.0'; 14 | 15 | 16 | var obj=JSON.parse($response.body);const propertiesToDelete=["ads2","adSource2","third"];for(const prop of propertiesToDelete)obj.data?.[prop]&&(obj.data[prop]={});$done({body:JSON.stringify(obj)}); 17 | -------------------------------------------------------------------------------- /deleteHeader.js: -------------------------------------------------------------------------------- 1 | /*********************************************** 2 | > 应用名称:墨鱼自用deleteHeader脚本 3 | > 脚本作者:@ddgksf2013 4 | > 微信账号:墨鱼手记 5 | > 更新时间:2024-02-03 6 | > 通知频道:https://t.me/ddgksf2021 7 | > 贡献投稿:https://t.me/ddgksf2013_bot 8 | > 问题反馈:ddgksf2013@163.com 9 | > 特别提醒:如需转载请注明出处,谢谢合作! 10 | ***********************************************/ 11 | 12 | const version = 'V1.0.2'; 13 | 14 | 15 | function setHeaderValue(e,a,d){var r=a.toLowerCase();r in e?e[r]=d:e[a]=d}var modifiedHeaders=$request.headers;setHeaderValue(modifiedHeaders,"X-RevenueCat-ETag",""),$done({headers:modifiedHeaders}); 16 | -------------------------------------------------------------------------------- /pupumarket.js: -------------------------------------------------------------------------------- 1 | /********************************************** 2 | > 应用名称:墨鱼自用朴朴超市去广告脚本 3 | > 脚本作者:@ddgksf2013 4 | > 微信账号:墨鱼手记 5 | > 更新时间:2023-11-19 6 | > 通知频道:https://t.me/ddgksf2021 7 | > 贡献投稿:https://t.me/ddgksf2013_bot 8 | > 问题反馈:ddgksf2013@163.com 9 | > 特别提醒:如需转载请注明出处,谢谢合作! 10 | > 脚本说明:去除开屏广告、搜索轮播填充 11 | **********************************************/ 12 | 13 | 14 | const version = 'V1.0.0'; 15 | 16 | var obj=JSON.parse($response.body);obj.data&&(obj.data=Object.values(obj.data).filter(o=>!(320==o.position_type||710==o.position_type||50==o.position_type))),$done({body:JSON.stringify(obj)}); 17 | -------------------------------------------------------------------------------- /deleteAeapi.js: -------------------------------------------------------------------------------- 1 | /*********************************************** 2 | > 应用名称:墨鱼自用deleteHeader脚本 3 | > 脚本作者:@ddgksf2013 4 | > 微信账号:墨鱼手记 5 | > 更新时间:2024-10-11 6 | > 通知频道:https://t.me/ddgksf2021 7 | > 贡献投稿:https://t.me/ddgksf2013_bot 8 | > 问题反馈:ddgksf2013@163.com 9 | > 特别提醒:如需转载请注明出处,谢谢合作! 10 | ***********************************************/ 11 | 12 | const version = 'V1.0.2'; 13 | 14 | 15 | function deleteHeader(e,d){for(var r in e)if(r.toLowerCase()===d.toLowerCase()){delete e[r];return}}var modifiedHeaders=$request.headers;deleteHeader(modifiedHeaders,"X-AEAPI"),$done({headers:modifiedHeaders}); 16 | -------------------------------------------------------------------------------- /amdc.js: -------------------------------------------------------------------------------- 1 | /*********************************************** 2 | > 应用名称:墨鱼自用amdc脚本 3 | > 脚本作者:@ddgksf2013 4 | > 微信账号:墨鱼手记 5 | > 更新时间:2025-09-06 6 | > 通知频道:https://t.me/ddgksf2021 7 | > 贡献投稿:https://t.me/ddgksf2013_bot 8 | > 问题反馈:ddgksf2013@163.com 9 | > 特别提醒:如需转载请注明出处,谢谢合作! 10 | ***********************************************/ 11 | 12 | 13 | 14 | const version = 'V1.0.11'; 15 | 16 | 17 | 18 | var ua=$request.headers["User-Agent"]||$request.headers["user-agent"];/(AMap|Cainiao|%E9%97%B2%E9%B1%BC|%E9%A3%9E%E7%8C%AA%E6%97%85%E8%A1%8C|%E5%96%B5%E8%A1%97|%E5%A4%A9%E7%8C%AB|Alibaba|MovieApp|Hema4iPhone|Moon|DMPortal)/.test(ua)?$done({body:"ddgksf2013"}):$done({}); 19 | -------------------------------------------------------------------------------- /clear_qxdns_cache.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | 针对QuantumultX下载AppleStore应用速度过慢的几种解决措施: 4 | 5 | 1、为apple添加代理分流 6 | 7 | 2、禁用配置文件【DNS】下的no-system或将【DNS】下内容全部删除 8 | 9 | 3、清除QX的DNS缓存,添加定时脚本from@unknowntokyo(每天晚9点清理一次) 10 | 11 | 0 21 * * * https://github.com/ddgksf2013/Scripts/raw/master/clear_qxdns_cache.js 12 | 13 | 以上三种方式,可自行尝试,选择适合自己的使用 14 | 15 | */ 16 | 17 | const message = { 18 | action: "dns_clear_cache" 19 | }; 20 | 21 | $configuration.sendMessage(message).then(resolve => { 22 | if (resolve.ret) { 23 | console.log("dnsCache Cleared!"); 24 | } else { 25 | console.log(resolve.error); 26 | } 27 | $done(); 28 | }, reject => { 29 | $done(); 30 | }); 31 | -------------------------------------------------------------------------------- /zhenbuka.js: -------------------------------------------------------------------------------- 1 | /* 公众号墨鱼手记 crated by ddgksf2013 on 2023-062-17 */ 2 | 3 | var body = $response.body.replace(//, '') 4 | .replace(/'159140'/g, "'259140'") 5 | .replace(/\
/g, "") 6 | .replace(/img id="ik\d+"/g, 'img id="ddgksf2013"'); 7 | $done({ body }); 8 | -------------------------------------------------------------------------------- /shunfeng_json.js: -------------------------------------------------------------------------------- 1 | /* 2 | version v0.0.1 3 | updatetime 2022-11-17 4 | tgchannel https://t.me/ddgksf2021 5 | function 顺丰 6 | author ddgksf2013 7 | 8 | 9 | [rewrite_local] 10 | https://ccsp-egmas.sf-express.com/cx-app-base/base/app/ad/queryInfoFlow url script-response-body https://github.com/ddgksf2013/Scripts/raw/master/shunfeng_json.js 11 | 12 | [mitm] 13 | hostname = ccsp-egmas.sf-express.com 14 | 15 | */ 16 | 17 | if ($request.url.indexOf("app/ad/queryInfoFlow") != -1) { 18 | var ddgksf2013 = JSON.parse($response.body); 19 | ddgksf2013.obj = Object.values(ddgksf2013.obj).filter((item) => item.adverId==2833); 20 | $done({ 21 | body: JSON.stringify(ddgksf2013), 22 | }); 23 | } 24 | -------------------------------------------------------------------------------- /jabi.js: -------------------------------------------------------------------------------- 1 | /* 2 | Unlocks by Cuttlefish 公众号:墨鱼手记 3 | */ 4 | 5 | 6 | //var body = unescape(body1); 7 | 8 | //var date= '/"date":"[^"]*"/g'; 9 | //var reg = '"download":"[^"]*"'; 10 | 11 | var date= $response.body.match(/"date":"[^"]*"/g); 12 | 13 | var body= $response.body.match(/"download":"[^"]*"/g); 14 | 15 | console.log(body); 16 | 17 | 18 | //target.replace(/quot/g,'\'); 19 | 20 | //var tt = target.replace(/&/g,'&').replace(/quot/g,'\').replace(//g,'>'); 21 | 22 | //$notify("图文内容","", date[0]+body[0]+date[1]+body[1]; 23 | $notify("扎比科技","", '\n'+date[0]+'\n'+body[0]+'\n\n'+date[1]+'\n'+body[1]+'\n\n'+date[2]+'\n'+body[2]); 24 | 25 | 26 | $done({ body }); 27 | //var reg = /[\u4e00-\u9fa5]/g; 28 | -------------------------------------------------------------------------------- /bilibili_space_10.js: -------------------------------------------------------------------------------- 1 | let url = $request.url 2 | let regex = /mid=(\d*)/ 3 | let mid= regex.exec(url) 4 | let api = `https://api.bilibili.com/x/space/arc/search?${mid[0]}&ps=10&tid=0&pn=1&keyword=&order=click&jsonp=jsonp` 5 | var Url = { 6 | url: api, 7 | method: "GET" 8 | }; 9 | 10 | $task.fetch(Url).then(response => { 11 | body=JSON.parse(response.body) 12 | let info="" 13 | body['data']['list']['vlist'].forEach((element, index)=> { 14 | index++ 15 | let scheme=`bilibili://av/${element['aid']}` 16 | let play=element['play'] 17 | info+=index+": "+element['title']+"\n"+scheme+"\n" 18 | }) 19 | $notify('播放排行前10','长按进入', info); 20 | $done({}); 21 | }, reason => { 22 | $notify("播放排行获取失败", "", reason.error); 23 | $done({}); 24 | }); -------------------------------------------------------------------------------- /applet.js: -------------------------------------------------------------------------------- 1 | /*********************************************** 2 | > 应用名称:墨鱼自用微信小程序去广告脚本 3 | > 脚本作者:@ddgksf2013 4 | > 微信账号:墨鱼手记 5 | > 更新时间:2023-03-19 6 | > 通知频道:https://t.me/ddgksf2021 7 | > 贡献投稿:https://t.me/ddgksf2013_bot 8 | > 问题反馈:ddgksf2013@163.com 9 | > 特别提醒:如需转载请注明出处,谢谢合作! 10 | ***********************************************/ 11 | 12 | 13 | re('"excitationAd":"\\d"@Ad":"\d"@ad":true@AdId":"[^"]*"@adid":"[^"]*"@fr_videp_if":"1@adunit[^"]*"','"excitationAd":"0"@Ad":"0"@ad":false@AdId":""@adid":""@fr_videp_if":"0@"') 14 | 15 | function re(){var e=$response.body;if(arguments[0].includes("@")){var r=arguments[0].split("@"),l=arguments[1].split("@");for(i=0;i 应用名称:墨鱼自用Bing净化脚本 3 | > 脚本作者:@ddgksf2013 4 | > 微信账号:墨鱼手记 5 | > 更新时间:2023-03-30 6 | > 通知频道:https://t.me/ddgksf2021 7 | > 贡献投稿:https://t.me/ddgksf2013_bot 8 | > 问题反馈:ddgksf2013@163.com 9 | > 特别提醒:如需转载请注明出处,谢谢合作! 10 | ***********************************************/ 11 | 12 | 13 | const version = 'V1.0.1'; 14 | 15 | 16 | let body=$response.body;if(body){if(!0===/config\/api\/v1\/get/.test($request.url))try{let e=JSON.parse(body);e.data.apps=e.data.apps.filter(e=>!("News"==e.appCategory||"Operation"==e.appCategory||"Entertainment"==e.appCategory||"Weather"==e.appName||"Weather: Maps"==e.appName||"0News-L2SDK-Interests"==e.appName)),body=JSON.stringify(e)}catch(a){console.log("bing : "+a)}else $done({});$done({body})}else $done({}); 17 | -------------------------------------------------------------------------------- /demo.js: -------------------------------------------------------------------------------- 1 | // 创建 Date 对象实例,表示当前时间 2 | var now = new Date(); 3 | 4 | // 获取年份 5 | var year = now.getFullYear(); 6 | 7 | // 获取月份(0 到 11,0 表示一月) 8 | var month = now.getMonth() + 1; // 需要加 1,因为月份从 0 开始 9 | 10 | // 获取日期(1 到 31) 11 | var day = now.getDate(); 12 | 13 | // 获取小时(0 到 23) 14 | var hours = now.getHours(); 15 | 16 | // 获取分钟(0 到 59) 17 | var minutes = now.getMinutes(); 18 | 19 | // 获取秒数(0 到 59) 20 | var seconds = now.getSeconds(); 21 | 22 | // 格式化年、月、日、小时、分钟和秒数 23 | var formattedDateTime = year + "-" + padNumber(month) + "-" + padNumber(day) + " " + padNumber(hours) + ":" + padNumber(minutes) + ":" + padNumber(seconds); 24 | 25 | // 打印结果 26 | console.log("当前时间:" + formattedDateTime); 27 | 28 | // 在数字前面补零,保证两位数的格式 29 | function padNumber(number) { 30 | return ("0" + number).slice(-2); 31 | } 32 | -------------------------------------------------------------------------------- /sample.js: -------------------------------------------------------------------------------- 1 | // ==UserScript== 2 | // @Name 网球规则[翻译]成Surge、QuantumultX、Loon脚本 3 | // @Author Cuttlefish 4 | // @Tg group https://t.me/ddgksf2013 5 | // @WechatID 公众号墨鱼手记 6 | // @UpdateTime 2022-05-03 7 | // @ScriptURL https://raw.githubusercontent.com/ddgksf2013/Cuttlefish/master/Crack/sample.js 8 | // ==/UserScript== 9 | 10 | // ==KeyExplain== 11 | // @Function text.replace(regexp/substr,replacement) 12 | // @key1 待替换的关键字段1 13 | // @key2 待替换的关键字段2 14 | // @originalValue 字段key对应的原始value 15 | // @replaceValue 字段key替换之后的value 16 | // @/g 正则匹配时匹配多个key键值 17 | // ==/KeyExplain== 18 | 19 | 20 | var body = $response.body.replace(/"key1":originalValue/g, '"key1":replaceValue').replace(/"key2":originalValue/g, '"key2":replaceValue') 21 | $done({ body }); 22 | -------------------------------------------------------------------------------- /manhuatailite.js: -------------------------------------------------------------------------------- 1 | /*********************************** 2 | 3 | > 應用名稱:漫画台Lite(微信小程序) 4 | > 軟件版本:0.0.0 5 | > 下載地址:微信小程序搜索漫画台Lite 6 | > 腳本作者:Cuttlefish 7 | > 微信賬號:墨魚手記 8 | > 更新時間:2022-03-11 9 | > 通知頻道:https://t.me/ddgksf2021 10 | > 問題反饋:https://t.me/ddgksf2013_bot 11 | > 特別聲明:本腳本僅供學習交流使用,禁止轉載售賣 12 | 13 | [rewrite_local] 14 | 15 | # ~ 漫画台Lite(微信小程序)解鎖會員權限(2022-03-11)@ddgksf2013 16 | ^https?:\/\/comic\.321mh\.com\/app_api\/v\d\/getcomicinfo_body url script-response-body https://github.com/ddgksf2013/Scripts/raw/master/manhuatailite.js 17 | 18 | [mitm] 19 | 20 | hostname=comic.321mh.com 21 | 22 | ***********************************/ 23 | 24 | 25 | var cuttlefish ={"warning":"本腳本僅供學習交流使用,禁止轉載售賣","tgchannel":"https://t.me/ddgksf2021","feedback":"https://t.me/ddgksf2013_bot"} 26 | var body = $response.body.replace(/price":\d+/g,'price":0') 27 | $done({ body }); 28 | 29 | -------------------------------------------------------------------------------- /nmtk.js: -------------------------------------------------------------------------------- 1 | /* 2 | Unlocks by Cuttlefish 公众号:墨鱼手记 3 | */ 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | var body = $response.body.replace(/integral":\d/,'integral":2099').replace(/success":false/,'success":true'); 104 | 105 | $done({ body }); -------------------------------------------------------------------------------- /zhangshanggongjiao.js: -------------------------------------------------------------------------------- 1 | /*********************************** 2 | > 應用名稱:掌上公交(微信小程序) 3 | > 軟件版本:0.0.0 4 | > 下載地址:微信小程序搜索掌上公交 5 | > 腳本作者:Cuttlefish 6 | > 微信賬號:墨魚手記 7 | > 更新時間:2022-03-01 8 | > 通知頻道:https://t.me/ddgksf2021 9 | > 問題反饋:https://t.me/ddgksf2013_bot 10 | > 特别說明:本腳本僅供學習交流使用,禁止轉載售賣 11 | 12 | [rewrite_local] 13 | 14 | # ~ 掌上公交微信小程序去除广告(2022-03-01)@ddgksf2013 15 | https?:\/\/wx\.mygolbs\.com\/WxBusServer\/ApiData\.do url script-response-body https://github.com/ddgksf2013/Scripts/raw/master/zhangshanggongjiao.js 16 | 17 | [mitm] 18 | 19 | hostname=wx.mygolbs.com 20 | 21 | ***********************************/ 22 | 23 | 24 | var cuttlefish ={"warning":"本腳本僅供學習交流使用,禁止轉載售賣","tgchannel":"https://t.me/ddgksf2021","feedback":"https://t.me/ddgksf2013_bot"}; 25 | var body = $response.body.replace(/Ad":1/g, 'Ad":0').replace(/Ad_ab":1/g, 'Ad_ab":0') 26 | $done({ body }); 27 | -------------------------------------------------------------------------------- /stay.js: -------------------------------------------------------------------------------- 1 | /*********************************** 2 | 3 | > 应用名称:Stay去除仓库广告 4 | > 脚本作者:Cuttlefish 5 | > 微信账号:墨鱼手记 6 | > 更新时间:2022-10-17 7 | > 通知频道:https://t.me/ddgksf2021 8 | > 投稿助手:https://t.me/ddgksf2013_bot 9 | > 脚本功能:去除仓库广告 10 | > 问题反馈:📮 ddgksf2013@163.com 📮 11 | > 特别说明:⛔⛔⛔ 12 | 本脚本仅供学习交流使用,禁止转载售卖 13 | ⛔⛔⛔ 14 | 15 | [rewrite_local] 16 | 17 | # ~ Stay(2022-10-17)@ddgksf2013 18 | ^https?:\/\/api\.shenyin\.name\/stay-fork\/browse\/featured$ url script-response-body https://github.com/ddgksf2013/Scripts/raw/master/stay.js 19 | 20 | [mitm] 21 | 22 | hostname=api.shenyin.name 23 | 24 | ***********************************/ 25 | 26 | let ddgksf2013 = JSON.parse($response.body); 27 | if (ddgksf2013.biz) { 28 | ddgksf2013.biz = Object.values(ddgksf2013.biz).filter(item => !(item["type"]=="promoted")); 29 | } 30 | $done({ body: JSON.stringify(ddgksf2013) }); 31 | -------------------------------------------------------------------------------- /iqiyi_open_ads.js: -------------------------------------------------------------------------------- 1 | /*********************************** 2 | 3 | > 应用名称:爱奇艺去除开屏广告 4 | > 脚本作者:ddgksf2013 5 | > 微信账号:墨鱼手记 6 | > 更新时间:2023-03-17 7 | > 通知频道:https://t.me/ddgksf2021 8 | > 投稿助手:https://t.me/ddgksf2013_bot 9 | > 脚本功能:去除开屏广告 10 | > 问题反馈:📮 ddgksf2013@163.com 📮 11 | > 特别说明:⛔⛔⛔ 12 | 本脚本仅供学习交流使用,禁止转载售卖 13 | ⛔⛔⛔ 14 | 15 | 16 | 17 | 请自行在本地添加分流 18 | host-suffix, cupid.iqiyi.com, direct 19 | 20 | 21 | [rewrite_local] 22 | 23 | # ~ 爱奇艺(2023-03-17)@ddgksf2013 24 | ^https?:\/\/.*cupid\.iqiyi\.com\/mixer\? url script-response-body https://github.com/ddgksf2013/Scripts/raw/master/iqiyi_open_ads.js 25 | 26 | [mitm] 27 | 28 | hostname=*cupid.iqiyi.com 29 | 30 | ***********************************/ 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | let obj=JSON.parse($response.body);delete obj.adSlots,$done({body:JSON.stringify(obj)}); 44 | -------------------------------------------------------------------------------- /v2ex.js: -------------------------------------------------------------------------------- 1 | /*********************************** 2 | 3 | > 网站名称:墨鱼自用V2EX网页去广告 4 | > 脚本功能:网站净化|去广告 5 | > 脚本作者:ddgksf2013 6 | > 微信账号:墨鱼手记 7 | > 更新时间:2024-01-05 8 | > 通知频道:https://t.me/ddgksf2021 9 | > 贡献投稿:https://t.me/ddgksf2013_bot 10 | > 问题反馈:ddgksf2013@163.com 11 | > 特别提醒:如需转载请注明出处,谢谢合作! 12 | > 特别说明:⚠️⚠️⚠️ 13 | 本脚本仅供学习交流使用,禁止转载、售卖 14 | ⚠️⚠️⚠️ 15 | 16 | 17 | [rewrite_local] 18 | 19 | ^https?:\/\/.*v2ex\.com\/($|t\/\d+) url script-response-body https://github.com/ddgksf2013/Scripts/raw/master/v2ex.js 20 | 21 | [mitm] 22 | 23 | hostname = *.v2ex.com 24 | 25 | ***********************************/ 26 | 27 | 28 | 29 | var body = $response.body.replace( 30 | //, 31 | ` 32 | ` 39 | ); 40 | $done({ body }); 41 | -------------------------------------------------------------------------------- /xiaodaka.js: -------------------------------------------------------------------------------- 1 | /*********************************** 2 | 3 | > 應用名稱:小打卡(微信小程序) 4 | > 軟件版本:0.0.0 5 | > 下載地址:微信小程序搜索小打卡 6 | > 腳本作者:群友投稿 7 | > 微信賬號:墨魚手記 8 | > 更新時間:2022-03-12 9 | > 通知頻道:https://t.me/ddgksf2021 10 | > 問題反饋:https://t.me/ddgksf2013_bot 11 | > 特別聲明:本腳本僅供學習交流使用,禁止轉載售賣 12 | 13 | [rewrite_local] 14 | 15 | # ~ 小打卡(微信小程序)解鎖會員權限(2022-03-12)@ddgksf2013 16 | ^https?:\/\/uranus\.sharedaka\.com\/api\/v3\/user\/info\/get url script-response-body https://github.com/ddgksf2013/Scripts/raw/master/xiaodaka.js 17 | 18 | [mitm] 19 | 20 | hostname=uranus.sharedaka.com 21 | 22 | ***********************************/ 23 | 24 | 25 | 26 | 27 | 28 | var cuttlefish ={"warning":"本腳本僅供學習交流使用,禁止轉載售賣","tgchannel":"https://t.me/ddgksf2021","feedback":"https://t.me/ddgksf2013_bot"} 29 | let obj = JSON.parse($response.body); 30 | obj.data.endTime = 1867996357000; 31 | obj.data.hasOpenedMember = true; 32 | $done({body: JSON.stringify(obj)}); 33 | -------------------------------------------------------------------------------- /pornhub.js: -------------------------------------------------------------------------------- 1 | /*********************************** 2 | 3 | > 网站名称:🔞PornHub 4 | > 脚本功能:网站净化|去广告 5 | > 脚本作者:ddgksf2013 6 | > 微信账号:墨鱼手记 7 | > 更新时间:2023-03-05 8 | > 通知频道:https://t.me/ddgksf2021 9 | > 贡献投稿:https://t.me/ddgksf2013_bot 10 | > 问题反馈:ddgksf2013@163.com 11 | > 特别提醒:如需转载请注明出处,谢谢合作! 12 | > 特别说明:⚠️⚠️⚠️ 13 | 本脚本仅供学习交流使用,禁止转载、售卖 14 | ⚠️⚠️⚠️ 15 | 16 | 17 | [rewrite_local] 18 | 19 | ^https:\/\/(cn|www)\.pornhub\.com\/_xa\/ads url reject-dict 20 | ^https?:/\/(cn|www)\.pornhub\.com\/($|(view|video).*$) url script-response-body https://github.com/ddgksf2013/Scripts/raw/master/pornhub.js 21 | 22 | [mitm] 23 | 24 | hostname = *.pornhub.com 25 | 26 | ***********************************/ 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | var body = $response.body 39 | .replace(//, ''); 40 | $done({ body }); 41 | -------------------------------------------------------------------------------- /caixinads.js: -------------------------------------------------------------------------------- 1 | /*********************************** 2 | 3 | > 应用名称:财新 4 | > 脚本作者:ddgksf2013 5 | > 微信账号:墨鱼手记 6 | > 更新时间:2024-01-14 7 | > 通知频道:https://t.me/ddgksf2021 8 | > 投稿助手:https://t.me/ddgksf2013_bot 9 | > 脚本功能:去开屏广告 10 | > 问题反馈:📮 ddgksf2013@163.com 📮 11 | > 特别说明:⛔⛔⛔ 12 | 本脚本仅供学习交流使用,禁止转载售卖 13 | ⛔⛔⛔ 14 | 15 | 16 | 请在本地添加下面分流 17 | host, gg.caixin.com, direct 18 | 19 | [rewrite_local] 20 | 21 | # ~ 财新(2024-01-14)@ddgksf2013 22 | ^https?:\/\/gg\.caixin\.com\/s\?z=caixin&op=1&c=3362 url script-response-body https://github.com/ddgksf2013/Scripts/raw/master/caixinads.js 23 | 24 | [mitm] 25 | 26 | hostname=gg.caixin.com 27 | 28 | ***********************************/ 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | var body = $response.body.replace(/sday":"[^"]*"/g, 'sday":"2029-12-01 00:00:00"') 41 | .replace(/eday":"[^"]*"/g, 'eday":"2029-12-30 00:00:00"') 42 | .replace(/intval":\d/g, 'intval":0') 43 | $done({ body }); 44 | -------------------------------------------------------------------------------- /fly.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Author:@ddgksf2013 4 | 5 | 通知频道:https://t.me/ddgksf2021 6 | 7 | */ 8 | var body = $response.body; 9 | var ddgksf2013 = JSON.parse(body); 10 | 11 | if (ddgksf2013.Variables.data.threaddetail) 12 | { 13 | ddgksf2013.Variables.data.threaddetail.tagadv = ""; 14 | ddgksf2013.Variables.data.threaddetail.threadapp_ad_video = []; 15 | ddgksf2013.Variables.data.threaddetail.pingyouadv = ""; 16 | ddgksf2013.Variables.data.threaddetail.middleadv = ""; 17 | ddgksf2013.Variables.data.threaddetail.bottomadv = ""; 18 | ddgksf2013.Variables.data.threaddetail.appdetailadv = []; 19 | } 20 | //delete ddgksf2013.Variables.data.threaddetail.threadapp_ad_video; 21 | //delete ddgksf2013.Variables.data.threaddetail.tagadv; 22 | //delete ddgksf2013.Variables.data.threaddetail.middleadv; 23 | //delete ddgksf2013.Variables.data.threaddetail.pingyouadv; 24 | //delete ddgksf2013.Variables.data.threaddetail.bottomadv; 25 | //delete ddgksf2013.Variables.data.threaddetail.appdetailadv; 26 | 27 | $done({body: JSON.stringify(ddgksf2013)}); -------------------------------------------------------------------------------- /zhihu_openads.js: -------------------------------------------------------------------------------- 1 | /*********************************** 2 | 3 | > 应用名称:知乎开屏 4 | > 脚本作者:ddgksf2013 5 | > 微信账号:墨鱼手记 6 | > 更新时间:2023-02-04 7 | > 通知频道:https://t.me/ddgksf2021 8 | > 投稿助手:https://t.me/ddgksf2013_bot 9 | > 脚本功能:去开屏广告 10 | > 问题反馈:📮 ddgksf2013@163.com 📮 11 | > 特别说明:⛔⛔⛔ 12 | 本脚本仅供学习交流使用,禁止转载售卖 13 | ⛔⛔⛔ 14 | 15 | 16 | 请搭配@blackmatrix7的知乎净化助手使用 17 | https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.snippet 18 | 19 | 20 | [rewrite_local] 21 | 22 | # ~ 知乎开屏(2023-02-04)@ddgksf2013 23 | ^https?:\/\/api\.zhihu\.com\/commercial_api.*launch_v2 url script-response-body https://github.com/ddgksf2013/Scripts/raw/master/zhihu_openads.js 24 | 25 | [mitm] 26 | 27 | hostname=api.zhihu.com 28 | 29 | ***********************************/ 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | var body=$response.body.replace(/img_play_duration\\":\d+/g,'img_play_duration":0').replace(/launch_timeout\\":\d+/g,'launch_timeout":0');$done({body}); 52 | -------------------------------------------------------------------------------- /nivod.js: -------------------------------------------------------------------------------- 1 | /********************************************** 2 | 3 | > 应用名称:泥巴网站净化 4 | > 脚本作者:@Adblock4limbo 5 | > 微信账号:墨鱼手记 6 | > 更新时间:2023-09-02 7 | > 通知频道:https://t.me/ddgksf2021 8 | > 贡献投稿:https://t.me/ddgksf2013_bot 9 | > 问题反馈:ddgksf2013@163.com 10 | > 特别提醒:如需转载请注明出处,谢谢合作! 11 | > 网站地址:https://m.nivod4.tv/ 12 | > 脚本说明:去除网页推广、网页广告、视频播放前AD 13 | > 特别说明:⚠️⚠️⚠️ 14 | 本脚本仅供学习交流使用,禁止转载、售卖 15 | ⚠️⚠️⚠️ 16 | 17 | 18 | [rewrite_local] 19 | 20 | ^https?:\/\/.*nivod.*\/($|[0-9a-zA-Z=_/-]+\.html) url script-response-body https://github.com/ddgksf2013/Scripts/raw/master/nivod.js 21 | 22 | [mitm] 23 | 24 | hostname = m.nivod4.tv 25 | 26 | **********************************************/ 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | var body = $response.body.replace(//, ''); 57 | $done({ body }); 58 | -------------------------------------------------------------------------------- /jd_json.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | version v0.0.1 4 | updatetime 2022-08-18 5 | tgchannel https://t.me/ddgksf2021 6 | function 京东搜索页面优化 7 | author ddgksf2013 8 | 9 | [rewrite_local] 10 | 11 | ^https?:\/\/api\.m\.jd\.com\/client\.action\?functionId=hotWords url script-response-body https://github.com/ddgksf2013/Scripts/raw/master/jd_json.js 12 | ^https?:\/\/api\.m\.jd\.com\/client\.action\?functionId=hotSearchTerms url script-response-body https://github.com/ddgksf2013/Scripts/raw/master/jd_json.js 13 | 14 | [mitm] 15 | 16 | hostname = api.m.jd.com 17 | 18 | */ 19 | 20 | 21 | 22 | var puimCea1=JSON['\x70\x61\x72\x73\x65']($response['\x62\x6f\x64\x79']);if($request['\x75\x72\x6c']['\x69\x6e\x64\x65\x78\x4f\x66']('\x68\x6f\x74\x57\x6f\x72\x64\x73')!==-1){puimCea1['\x68\x6f\x74\x77\x6f\x72\x64\x73']={};puimCea1['\x74\x61\x62\x73']={};delete puimCea1['\x61\x62\x76\x65\x72']}if($request['\x75\x72\x6c']['\x69\x6e\x64\x65\x78\x4f\x66']('\x68\x6f\x74\x53\x65\x61\x72\x63\x68\x54\x65\x72\x6d\x73')!==-1){puimCea1['\x74\x6f\x70\x44\x61\x74\x61']['\x64\x61\x74\x61']={};puimCea1['\x64\x61\x74\x61']={}}$done({body:JSON['\x73\x74\x72\x69\x6e\x67\x69\x66\x79'](puimCea1)}); 23 | -------------------------------------------------------------------------------- /12306.js: -------------------------------------------------------------------------------- 1 | /*********************************************** 2 | 3 | > 应用名称:墨鱼自用12306去广告脚本 4 | > 脚本作者:@ddgksf2013 5 | > 微信账号:墨鱼手记 6 | > 更新时间:2024-08-24 7 | > 通知频道:https://t.me/ddgksf2021 8 | > 贡献投稿:https://t.me/ddgksf2013_bot 9 | > 问题反馈:ddgksf2013@163.com 10 | > 特别提醒:如需转载请注明出处,谢谢合作! 11 | > 脚本说明:目前脚本是最简洁也是最完美的了(低调使用),Enjoy! 12 | > 使用说明:请在本地添加分流 host, ad.12306.cn, direct 13 | 14 | [rewrite_local] 15 | 16 | ^https?:\/\/ad\.12306\.cn\/ad\/ser\/getAdList url script-analyze-echo-response https://github.com/ddgksf2013/Scripts/raw/master/12306.js 17 | 18 | [mitm] 19 | 20 | hostname = ad.12306.cn 21 | 22 | ***********************************************/ 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | const version = 'V1.0.23'; 37 | 38 | var obj=JSON.parse($request.body),ddgksf2013={};"0007"==obj.placementNo?(ddgksf2013.materialsList=[{billMaterialsId:"6491",filePath:"ddgksf2013",creativeType:1}],ddgksf2013.advertParam={skipTime:1},ddgksf2013.code="00"):ddgksf2013="G0054"==obj.placementNo?{code:"00",materialsList:[{}]}:{code:"00",message:"无广告返回"},"undefined"!=typeof $task?$done({body:JSON.stringify(ddgksf2013)}):$done({response:{body:JSON.stringify(ddgksf2013)}}); 39 | -------------------------------------------------------------------------------- /555Ad.js: -------------------------------------------------------------------------------- 1 | /********************************************** 2 | 3 | > 应用名称:墨鱼自用555去广告脚本 4 | > 脚本作者:@ddgksf2013 5 | > 微信账号:墨鱼手记 6 | > 更新时间:2024-10-30 7 | > 通知频道:https://t.me/ddgksf2021 8 | > 贡献投稿:https://t.me/ddgksf2013_bot 9 | > 问题反馈:ddgksf2013@163.com 10 | > 特别提醒:如需转载请注明出处,谢谢合作! 11 | > 脚本说明:去除首页轮播图广告、首页信息流广告、我的页面推广、缩短开屏广告倒计时 12 | 13 | 请在QuantumultX配置文件的[general]下添加 udp_drop_list=443 14 | 15 | [rewrite_local] 16 | 17 | ^https?:\/\/[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+){1,3}(:\d+)?\/api\/v\d\/movie\/index_recommend url script-response-body https://github.com/ddgksf2013/Scripts/raw/master/555Ad.js 18 | ^https?:\/\/[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+){1,3}(:\d+)?\/api\/v\d\/advert url reject-200 19 | ^https?:\/\/[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+){1,3}(:\d+)?\/api\/v\d\/notice url reject-200 20 | 21 | 22 | [mitm] 23 | 24 | hostname = *.qyfxgd.cn, *.weilai555.com, *.ecoliving168.com 25 | 26 | **********************************************/ 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | let obj=JSON.parse($response.body);obj.data=obj.data.filter(t=>"advert_self"!==t.layout),obj.data.forEach(t=>{t.list=t.list.filter(t=>3!==t.type)}),$done({body:JSON.stringify(obj)}); 47 | -------------------------------------------------------------------------------- /bdcloud.js: -------------------------------------------------------------------------------- 1 | $done({body:JSON['\x73\x74\x72\x69\x6e\x67\x69\x66\x79'](obj={product_infos:[{product_id:"\x35\x33\x31\x30\x38\x39\x37\x37\x39\x32\x31\x32\x38\x36\x33\x33\x33\x39\x30",start_time:1417260485,end_time:3147483648,buy_time:"\x31\x34\x31\x37\x32\x36\x30\x34\x38\x35",cluster:"\x6f\x66\x66\x6c\x69\x6e\x65\x64\x6c",detail_cluster:"\x6f\x66\x66\x6c\x69\x6e\x65\x64\x6c",product_name:"\x67\x7a\x5f\x74\x65\x6c\x65\x63\x6f\x6d\x5f\x65\x78\x70"},{product_name:"\x73\x76\x69\x70\x32\x5f\x6e\x64",product_description:"\u8d85\u7ea7\u4f1a\u5458",function_num:0,start_time:1553702399,buy_description:"",buy_time:0,product_id:"\x31",auto_upgrade_to_svip:0,end_time:3672502399,cluster:"\x76\x69\x70",detail_cluster:"\x73\x76\x69\x70",status:0}],currenttime:1573473597,reminder:{reminderWithContent:[],advertiseContent:[]},request_id:0x681c020293b79000,guide_data:{title:"\u8d85\u7ea7\u4f1a\u5458 \x53\x56\x49\x50",content:"\u5df2\u62e5\u6709\u6781\u901f\u4e0b\u8f7d\x2b\u89c6\u9891\u500d\u901f\u7279\u6743",button:{text:"\u4f1a\u5458\u4e2d\u5fc3",action_url:"\x68\x74\x74\x70\x73\x3a\x2f\x2f\x70\x61\x6e\x2e\x62\x61\x69\x64\x75\x2e\x63\x6f\x6d\x2f\x77\x61\x70\x2f\x76\x69\x70\x2f\x75\x73\x65\x72\x3f\x66\x72\x6f\x6d\x3d\x6d\x79\x76\x69\x70\x32\x23\x73\x76\x69\x70"}}})}); 2 | -------------------------------------------------------------------------------- /ahfs.js: -------------------------------------------------------------------------------- 1 | /********************************************** 2 | 3 | > 应用名称:ahhhhfs网站净化 4 | > 脚本作者:@ddgksf2013 5 | > 微信账号:墨鱼手记 6 | > 更新时间:2024-01-28 7 | > 通知频道:https://t.me/ddgksf2021 8 | > 贡献投稿:https://t.me/ddgksf2013_bot 9 | > 问题反馈:ddgksf2013@163.com 10 | > 特别提醒:如需转载请注明出处,谢谢合作! 11 | > 网站地址:https://www.ahhhhfs.com 12 | > 脚本说明:去除网页推广、网页广告 13 | 14 | 15 | [rewrite_local] 16 | 17 | ^https?:\/\/.*(xbwpys|ahhhhfs)\.com\/($|[0-9a-zA-Z_/]+\/$) url script-response-body https://github.com/ddgksf2013/Scripts/raw/master/ahfs.js 18 | 19 | [mitm] 20 | 21 | hostname = *.xbwpys.com, *.ahhhhfs.com 22 | 23 | **********************************************/ 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | var body = $response.body.replace(//, ''); 54 | $done({ body }); 55 | -------------------------------------------------------------------------------- /caiyun.js: -------------------------------------------------------------------------------- 1 | /* 2 | 彩云天气@wf021325[灰灰佬] 3 | 真实VIP客户提取Token,仅用作备份,请引用原作者重写,如下链接 4 | https://raw.githubusercontent.com/wf021325/qx/master/js/caiyun.js 5 | 6 | https://biz.cyapi.cn/v2/user?app_name=weather 7 | https://biz.cyapi.cn/v1/visitors 8 | https://biz.cyapi.cn/v3/login_by_code 登录 9 | 10 | ==================================== 11 | [rewrite_local] 12 | ^https:\/\/biz\.cyapi\.cn\/v\d\/(user\?app_name=weather|visitors|login_by_code)$ url script-response-body https://raw.githubusercontent.com/wf021325/qx/master/js/caiyun.js 13 | 14 | [mitm] 15 | hostname = biz.cyapi.cn 16 | ==================================== 17 | 18 | */ 19 | var url = $request.url; 20 | var obj = JSON.parse($response.body); 21 | let Token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ2ZXJzaW9uIjoxLCJ1c2VyX2lkIjoiNWY1YmZjNTdkMmM2ODkwMDE0ZTI2YmI4Iiwic3ZpcF9leHBpcmVkX2F0IjoxNzA1MzMxMTY2LjQxNjc3MSwidmlwX2V4cGlyZWRfYXQiOjB9.h_Cem89QarTXxVX9Z_Wt-Mak6ZHAjAJqgv3hEY6wpps"; 22 | 23 | if (url.indexOf('/user') != -1 || url.indexOf('/visitors') != -1) { 24 | obj.result.token = Token; 25 | body = JSON.stringify(obj); 26 | } 27 | 28 | if (url.indexOf('/login_by_code') != -1) { 29 | let obj = {"status":"ok","result":{"is_phone_verified":true,"token":Token},"rc":0} 30 | body = JSON.stringify(obj); 31 | } 32 | $done({body}); 33 | -------------------------------------------------------------------------------- /one.js: -------------------------------------------------------------------------------- 1 | /*********************************************** 2 | 3 | > 应用名称:One成人的世界一个就够了 4 | > 脚本作者:@ddgksf2013 5 | > 下载地址:https://apps.apple.com/cn/app/id6456038162 6 | > 微信账号:墨鱼手记 7 | > 更新时间:2023-08-10 8 | > 通知频道:https://t.me/ddgksf2021 9 | > 贡献投稿:https://t.me/ddgksf2013_bot 10 | > 问题反馈:ddgksf2013@163.com 11 | > 特别提醒:如需转载请注明出处,谢谢合作! 12 | > 脚本说明:去除开屏广告 13 | > 官网地址:https://one55.app 14 | > 变身秘钥:#iPhone#GOjZ3kxlNw9pD0sdP0WZ9eRS8BKzi+lL5kncO2lE5JDQen0JqaYdRc7nUX4HMjF5X8wMnf0Rrx2GC9eQq5kh78VeRoGLzUYE2TLrKRc2kwj4KhtwzV0p/Hj3N0958WIauFxhElkxyahM1iQwhONfqK/H0QLFNZYVMAbGMSov7c6kZFp5kIT1ZIHjYe66xyK9MhdqETMaiKaHoACE0uQZ78/z292KK6pkjCGA7yUAES1srvQvGaJQJsgaKiYcDIdFtyMATuUAnWptlVoS0s8/Zy66QwBN/dAjTuYrS6Pyk6BXDPdt36RW7EwP536cXpPjisSxh1ni3qchHul43bHtlzWktxtWHinCAVW/exO/XqsoYdODfYurnWNH6MO1lKUUDfgJbWd5Wb5gS9ycgaRN956xcGyocd0+hXqLZTD0AJ/VjQJNtCFv1yFEOnlDxFQUiakGvZ3uo6ac4q1EVyCdvbIt2W+Gc1QVrqypdRWW3yB0vah7NB7rdQPqTwL9GRoERq5a4iMCEqo7FgnPgJalRw==#iPhone# 15 | > 使用说明:复制上面的秘钥,打开马甲APP,即可 16 | 17 | [rewrite_local] 18 | 19 | ^https?:\/\/api\.[a-zA-Z0-9-]+\.com\/.*\/ad\/space url reject-200 20 | 21 | [mitm] 22 | 23 | hostname = api.6ca2c98.com, api.988068b.com, api.a94e15d.com, api.b33762e.com, api.3h6bljel.com, api.549p0fze.com, api.d154gvlq.com, api.0qda82zu.com,api.fua89ibo.com 24 | 25 | ***********************************************/ 26 | -------------------------------------------------------------------------------- /bilibili_startup_direct.js: -------------------------------------------------------------------------------- 1 | /*********************************** 2 | 3 | > 應用名稱:B站启动时开启直连模式 4 | > 軟件版本:0.0.0 5 | > 下載地址: 6 | > 腳本作者:Cuttlefish 7 | > 微信賬號:墨魚手記 8 | > 更新時間:2022-08-11 9 | > 通知頻道:https://t.me/ddgksf2021 10 | > 問題反饋:https://t.me/ddgksf2013_bot 11 | > 特别說明:本腳本僅供學習交流使用,禁止轉載售賣 12 | 13 | [rewrite_local] 14 | 15 | # ~ B站启动时开启直连模式(2022-085-11)@ddgksf2013 16 | ^https?:\/\/app\.bilibili\.com\/x\/resource\/domain url script-response-body https://github.com/ddgksf2013/Scripts/raw/master/bilibili_startup_direct.js 17 | 18 | [mitm] 19 | 20 | hostname=api.bilibili.com 21 | 22 | ***********************************/ 23 | 24 | //因为常常观看港澳台番剧后,B站连着外网,而我下次启动时,需要让其直连模式(主界面不同),有此需求,故写了一个简单脚本 25 | 26 | 27 | //⚠️已自动获取野比配置的策略组,无需手动更改,DomesticMedia自行替换为自己的B站策略组名称 28 | 29 | 30 | 31 | const Group = $prefs.valueForKey('BiliArea_Policy') || '港台番剧'; 32 | 33 | const message = { 34 | action: "set_policy_state", 35 | content: {[Group]: "direct"} 36 | }; 37 | $configuration.sendMessage(message).then(resolve => { 38 | if (resolve.error) { 39 | console.log(resolve.error); 40 | } 41 | if (resolve.ret) { 42 | let output=JSON.stringify(resolve.ret); 43 | //console.log(output); 44 | } 45 | $done(); 46 | }, reject => { 47 | // Normally will never happen. 48 | $done(); 49 | }); 50 | -------------------------------------------------------------------------------- /alidrive.js: -------------------------------------------------------------------------------- 1 | /*********************************** 2 | 3 | > 应用名称:阿里云盘 4 | > 脚本作者:Cuttlefish 5 | > 微信账号:墨鱼手记 6 | > 更新时间:2023-02-21 7 | > 通知频道:https://t.me/ddgksf2021 8 | > 投稿助手:https://t.me/ddgksf2013_bot 9 | > 脚本功能:优化首页display 10 | > 额外说明:此脚本停止维护,请引用下面链接[广告净化+本地视频倍速、码率切换] 11 | > 引用链接:https://gist.githubusercontent.com/ddgksf2013/f4752e632fd3375ea2811985c5b635dc/raw/alicloud.js 12 | > 问题反馈:📮 ddgksf2013@163.com 📮 13 | > 特别说明:⛔⛔⛔ 14 | 本脚本仅供学习交流使用,禁止转载售卖 15 | ⛔⛔⛔ 16 | 17 | 18 | 19 | [rewrite_local] 20 | 21 | # ~ 阿里云盘(2023-01-05)@ddgksf2013 22 | ^https?:\/\/api\.aliyundrive\.com\/apps\/v\d\/users\/(apps|home)\/widgets$ url script-response-body https://github.com/ddgksf2013/Scripts/raw/master/alidrive.js 23 | 24 | [mitm] 25 | 26 | hostname=api.aliyundrive.com 27 | 28 | ***********************************/ 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | $notify("Tips", "", "此脚本停止维护,请使用新的重写,点击可跳转",{"open-url":"https://gist.githubusercontent.com/ddgksf2013/f4752e632fd3375ea2811985c5b635dc/raw/alicloud.js"}); 37 | let ddgksf2013=JSON.parse($response.body);ddgksf2013.result&&(ddgksf2013.result=Object.values(ddgksf2013.result).filter(d=>"file"==d.appCode||"video"==d.appCode)),ddgksf2013.activities&&delete ddgksf2013.activities,ddgksf2013.myBackup&&delete ddgksf2013.myBackup,$done({body:JSON.stringify(ddgksf2013)}); 38 | -------------------------------------------------------------------------------- /tf.js: -------------------------------------------------------------------------------- 1 | //下载启动 2 | if (/^https?:\/\/testflight\.apple\.com\/v2\/accounts\/.*\/apps\/\d*\/builds\/\d*\/install/.test(url)) { 3 | var tmp= $request.url.match(/apps\/\d*\/builds\/\d*\/install/g); 4 | modifiedPath = '/v2/accounts/'+modifiedPath+'/'+tmp[0]; 5 | } 6 | //点开新tf+接受tf 7 | if (/^https?:\/\/testflight\.apple\.com\/v3\/accounts\/[a-z0-9_-]+\/ru\/[a-zA-Z0-9_-]+/.test(url)) { 8 | var tmp= $request.url.match(/ru\/.*/g); 9 | modifiedPath = '/v3/accounts/'+modifiedPath+'/'+tmp[0]; 10 | //console.log(modifiedPath); 11 | 12 | } 13 | //个人页面 14 | if (/^https?:\/\/testflight\.apple\.com\/v3\/accounts\/[a-z0-9_-]+\/apps/.test(url)) { 15 | var tmp= $request.url.match(/apps.*/g); 16 | modifiedPath = '/v3/accounts/'+modifiedPath+'/'+tmp[0]; 17 | 18 | } 19 | //单个tf页面 20 | if (/^https?:\/\/testflight\.apple\.com\/v2\/accounts\/.*\/apps\/\d*\/builds\/\d*$/.test(url)) { 21 | var tmp= $request.url.match(/apps\/\d*\/builds\/\d*$/g); 22 | modifiedPath = '/v2/accounts/'+modifiedPath+'/'+tmp[0]; 23 | 24 | } 25 | //单个tf历史build页面 26 | if (/^https?:\/\/testflight\.apple\.com\/v2\/accounts\/.*\/apps\/\d*\/platforms\/ios\/trains/.test(url)) { 27 | var tmp= $request.url.match(/apps\/\d*\/platforms\/ios\/trains.*/g); 28 | modifiedPath = '/v2/accounts/'+modifiedPath+'/'+tmp[0]; 29 | 30 | } 31 | 32 | $done({path: modifiedPath, headers : modifiedHeaders}); -------------------------------------------------------------------------------- /jianshu.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 名称:jianshu.js 3 | * 作者:elecV2 4 | * 5 | ******** Quantumult X conf ******** 6 | // 规则仅对手机网页版有效,如使用APP 请勿添加 7 | 8 | // rewrite 远程地址:https://raw.githubusercontent.com/elecV2/QuantumultX-Tools/master/betterweb/jianshu.conf 9 | 10 | ---------- jianshu.conf ------------------ 11 | hostname = www.jianshu.com 12 | 13 | // 先重写到桌面版 14 | ^https:\/\/www\.jianshu\.com\/p url request-header (\r\n)User-Agent:.+(\r\n) request-header $1User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36$2 15 | // 再注入 CSS 进行优化 16 | ^https:\/\/www\.jianshu\.com\/p url script-response-body https://raw.githubusercontent.com/elecV2/QuantumultX-Tools/master/betterweb/jianshu.js 17 | ------------- 18 | 19 | ******** 20 | * 频道: https://t.me/elecV2 21 | **/ 22 | 23 | let body = $response.body 24 | 25 | if (/<\/html>|<\/body>/.test(body)) { 26 | body = body.replace('', ``) 29 | 30 | console.log('添加 tamperJS:jianshu.js') 31 | } 32 | 33 | $done({ body }) 34 | -------------------------------------------------------------------------------- /ctripAds.js: -------------------------------------------------------------------------------- 1 | /********************************************** 2 | 3 | > 应用名称:墨鱼自用携程旅行小程序去广告脚本 4 | > 脚本作者:@ddgksf2013 5 | > 微信账号:墨鱼手记 6 | > 更新时间:2023-07-28 7 | > 通知频道:https://t.me/ddgksf2021 8 | > 贡献投稿:https://t.me/ddgksf2013_bot 9 | > 问题反馈:ddgksf2013@163.com 10 | > 特别提醒:如需转载请注明出处,谢谢合作! 11 | > 脚本说明:请自行查看# > 备注,终于可以把携程旅行APP卸载了 12 | > 特别注意:携程旅行小程序去广告脚本与携程旅行APP冲突[禁止MITM],若你使用APP版,请勿引用本重写! 13 | 14 | 15 | [rewrite_local] 16 | 17 | # > 携程旅行小程序_热门活动@ddgksf2013 18 | ^https?:\/\/m\.ctrip\.com\/restapi\/soa2\/\d+\/queryWeChatHotEvent url reject-200 19 | # > 携程旅行小程序_信息流@ddgksf2013 20 | ^https?:\/\/m\.ctrip\.com\/restapi\/soa2\/\d+\/getWaterflowInfo url script-response-body https://github.com/ddgksf2013/Scripts/raw/master/ctripAds.js 21 | # > 携程旅行小程序_广告请求@ddgksf2013 22 | ^https?:\/\/m\.ctrip\.com\/restapi\/soa2\/\d+\/tripAds\.json url reject-200 23 | # > 携程旅行小程序_热搜词@ddgksf2013 24 | ^https?:\/\/m\.ctrip\.com\/restapi\/soa2\/\d+\/json\/gethotsearchrespbysmallprogram url reject-200 25 | # > 携程旅行小程序_航班页信息流@ddgksf2013 26 | ^https?:\/\/m\.ctrip\.com\/restapi\/soa2\/\d+\/flightHomeSecondService url reject-200 27 | 28 | 29 | 30 | [mitm] 31 | 32 | hostname = m.ctrip.com 33 | 34 | **********************************************/ 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | var ddgksf2013=JSON.parse($response.body);ddgksf2013.data.items=[],$done({body:JSON.stringify(ddgksf2013)}); 58 | -------------------------------------------------------------------------------- /setu.js: -------------------------------------------------------------------------------- 1 | // ==UserScript== 2 | // @Name QX每日色图脚本 3 | // @Author Cuttlefish 4 | // @TgChannel https://t.me/ddgksf2021 5 | // @WechatID 公众号墨鱼手记 6 | // @UpdateTime 20210212 7 | // @Appreciation 觉得不错👏去公众号菜单栏赞助我喝杯🥤 8 | // @WebURL https://api.lolicon.app/#/setu 9 | // @Quota 300次/天 10 | // @Attention 请在本地使用此脚本,便于填写ApiKey 11 | // @ScriptURL https://github.com/ddgksf2013/Scripts/raw/master/setu.js 12 | // ==/UserScript== 13 | 14 | let userApikey = '' //请在 Telegram 内使用 @loliconApiBot 申请 15 | let userR18 = 2 //18禁为1 非为0 2是混合 16 | let userKeyword = ''//搜索关键字 17 | let userNum = 1 //一次返回的结果数量,范围为1到10,数字的数量亦为弹框的次数 18 | var request = { 19 | url:encodeURI("https://api.lolicon.app/setu?apikey=" + userApikey + "&r18=" + userR18 + "&keyword=" + userKeyword + "&num=" + userNum), 20 | header:{ 21 | "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.2 Mobile/15E148 Safari/604.1" 22 | }, 23 | } 24 | $task.fetch(request).then(response => { 25 | let obj = JSON.parse(response.body); 26 | console.log(response.body); 27 | if(obj.code == 0) 28 | { 29 | for(i = 0;i/, `setTimeout(() => window.history.back(), ${randomTimeout}); `); 51 | $done({ body }); 52 | -------------------------------------------------------------------------------- /keepStyle.js: -------------------------------------------------------------------------------- 1 | /********************************************** 2 | > 应用名称:墨鱼自用Keep去广告脚本 3 | > 脚本作者:@ddgksf2013 4 | > 微信账号:墨鱼手记 5 | > 更新时间:2024-04-10 6 | > 通知频道:https://t.me/ddgksf2021 7 | > 贡献投稿:https://t.me/ddgksf2013_bot 8 | > 问题反馈:ddgksf2013@163.com 9 | > 特别提醒:如需转载请注明出处,谢谢合作! 10 | **********************************************/ 11 | 12 | 13 | 14 | 15 | 16 | const version = 'V1.0.33'; 17 | 18 | 19 | if(-1!=$request.url.indexOf("people/my")){let e=JSON.parse($response.body);e.data.floatingInfo={},e.data.memberInfo&&delete e.data.memberInfo,$done({body:JSON.stringify(e)})}else if(-1!=$request.url.indexOf("start")){let a=JSON.parse($response.body);a.data.status=!0,$done({body:JSON.stringify(a)})}else if(-1!=$request.url.indexOf("preview")){let t=JSON.parse($response.body);t.data.detailSections=Object.values(t.data.detailSections).filter(e=>"recommendation"!=e.sectionType),t.data.extendInfo.startEnable=!0,t.data.extendInfo.hasPaid=!0,$done({body:JSON.stringify(t)})}else if(-1!=$request.url.indexOf("twins/v4/feed/course")){let o=JSON.parse($response.body);o.data.modules=Object.values(o.data.modules).filter(e=>!("homepageCommonContainer"==e.code||"homepageLive"==e.code)),$done({body:JSON.stringify(o)})}else if(-1!=$request.url.indexOf("config/v3/basic")){let d=JSON.parse($response.body);d.data.bottomBarControl.defaultTab="home",d.data.bottomBarControl.tabs=Object.values(d.data.bottomBarControl.tabs).filter(e=>"home"==e.tabType||"dynamic_sports"==e.tabType||"personal"==e.tabType),d.data.homeTabs=[{type:"homeRecommend",order:1,name:"推荐",schema:"keep://homepage/homeRecommend",showInFewDays:7,reverseSwitch:!1,default:!0},{type:"homePrime",order:2,name:"会员",schema:"keep://coursepage/homePrime",showInFewDays:7,reverseSwitch:!1,default:!1}],$done({body:JSON.stringify(d)})}else $done(); 20 | -------------------------------------------------------------------------------- /cainiao_json.js: -------------------------------------------------------------------------------- 1 | /*********************************************** 2 | > 应用名称:菜鸟净化[原菜鸟裹裹] 3 | > 脚本作者:@ddgksf2013 4 | > 微信账号:墨鱼手记 5 | > 更新时间:2025-04-07 6 | > 通知频道:https://t.me/ddgksf2021 7 | > 贡献投稿:https://t.me/ddgksf2013_bot 8 | > 问题反馈:ddgksf2013@163.com 9 | > 特别提醒:如需转载请注明出处,谢谢合作! 10 | ***********************************************/ 11 | 12 | 13 | 14 | 15 | 16 | const version = 'V1.0.21'; 17 | 18 | 19 | var ddgksf2013=JSON.parse($response.body);if(-1!=$request.url.indexOf("mtop.cainiao.nbpresentation.protocol.homepage.get.cn"))ddgksf2013.data?.result?.dataList?.length>0&&(ddgksf2013.data.result.dataList=ddgksf2013.data.result.dataList.filter(a=>!("big_banner_area_v870"==a.type||"todo_list_v860"==a.type)));else if(-1!=$request.url.indexOf("mtop.cainiao.app.e2e.engine")){let a=["banner","activity","asset","vip","wallet"];for(let d of a)ddgksf2013.data?.data?.[d]&&delete ddgksf2013.data.data[d]}else if(-1!=$request.url.indexOf("mtop.cainiao.nbpresentation.homepage.merge.get.cn"))for(let i=0;i<4;i++){let t=`mtop.cainiao.nbpresentation.protocol.homepage.get.cn@${i}`;ddgksf2013.data?.[t]?.data?.result?.dataList?.length>0&&(ddgksf2013.data[t].data.result.dataList=ddgksf2013.data[t].data.result.dataList.filter(a=>!("big_banner_area_v870"==a.type||"todo_list_v860"==a.type)))}else -1!=$request.url.indexOf("mtop.cainiao.guoguo.nbnetflow.ads.mshow")?(ddgksf2013.data["1308"]&&delete ddgksf2013.data["1308"],ddgksf2013.data["1275"]&&delete ddgksf2013.data["1275"],ddgksf2013.data["205"]&&delete ddgksf2013.data["205"]):-1!=$request.url.indexOf("mtop.cainiao.guoguo.nbnetflow.ads.index.cn")?ddgksf2013.data?.result&&(ddgksf2013.data.result=[{}]):-1!=$request.url.indexOf("mtop.cainiao.adkeyword")&&ddgksf2013.data?.result?.adHotKeywords&&(ddgksf2013.data.result.adHotKeywords=[]);var body=JSON.stringify(ddgksf2013);$done({body}); 20 | -------------------------------------------------------------------------------- /ximalaya_json.js: -------------------------------------------------------------------------------- 1 | /*********************************************** 2 | > 应用名称:墨鱼自用喜马拉雅去广告脚本 3 | > 脚本作者:@ddgksf2013 4 | > 微信账号:墨鱼手记 5 | > 更新时间:2024-02-24 6 | > 通知频道:https://t.me/ddgksf2021 7 | > 贡献投稿:https://t.me/ddgksf2013_bot 8 | > 问题反馈:ddgksf2013@163.com 9 | > 特别提醒:如需转载请注明出处,谢谢合作! 10 | ***********************************************/ 11 | 12 | 13 | const version = 'V1.0.38'; 14 | 15 | 16 | let body=$response.body;if(body){switch(!0){case/discovery-category\/customCategories/.test($request.url):try{let e=JSON.parse(body);e.customCategoryList&&(e.customCategoryList=e.customCategoryList.filter(e=>("recommend"==e.itemType||"template_category"==e.itemType||"single_category"==e.itemType)&&1005!==e.categoryId)),e.defaultTabList&&(e.defaultTabList=e.defaultTabList.filter(e=>("recommend"==e.itemType||"template_category"==e.itemType||"single_category"==e.itemType)&&1005!==e.categoryId)),body=JSON.stringify(e)}catch(t){console.log("customCategories: "+t)}break;case/discovery-category\/v\d\/category/.test($request.url):try{let a=JSON.parse(body);a.focusImages&&a.focusImages.data&&(a.focusImages.data=a.focusImages.data.filter(e=>-1!=e.realLink.indexOf("open")&&!e.isAd)),body=JSON.stringify(a)}catch(r){console.log("categories: "+r)}break;case/focus-mobile\/focusPic/.test($request.url):try{let s=JSON.parse(body);s.header&&s.header.length<=1&&(s.header[0].item.list[0].data=s.header[0].item.list[0].data.filter(e=>-1!=e.realLink.indexOf("open")&&!e.isAd)),body=JSON.stringify(s)}catch(i){console.log("discovery-feed"+i)}break;case/discovery-feed\/v\d\/mix/.test($request.url):try{let o=JSON.parse(body);o.header?.length==2&&delete o.header[0],o.body=o.body.filter(e=>!(e.item?.adInfo||e.item?.moduleType=="mix_ad"||"bigCard"==e.displayClass)),body=JSON.stringify(o)}catch(d){console.log("discovery-feed:"+d)}break;case/mobile-user\/v\d\/homePage/.test($request.url):try{let c=new Set([210,213,215]),y=JSON.parse(body);if(y.data.serviceModule.entrances){let l=y.data.serviceModule.entrances.filter(e=>c.has(e.id));y.data.serviceModule.entrances=l}body=JSON.stringify(y)}catch(g){console.log("mobile-user:"+g)}break;default:$done({})}$done({body})}else $done({}); 17 | -------------------------------------------------------------------------------- /caiyun_json.js: -------------------------------------------------------------------------------- 1 | /*********************************************** 2 | > 应用名称:墨鱼自用彩云天气去广告脚本 3 | > 脚本作者:@ddgksf2013 4 | > 微信账号:墨鱼手记 5 | > 更新时间:2024-09-01 6 | > 通知频道:https://t.me/ddgksf2021 7 | > 贡献投稿:https://t.me/ddgksf2013_bot 8 | > 问题反馈:ddgksf2013@163.com 9 | > 特别提醒:如需转载请注明出处,谢谢合作! 10 | ***********************************************/ 11 | 12 | 13 | 14 | 15 | const version = 'V1.0.8'; 16 | 17 | let responseBody={};$request.url.includes("/v2/user")?((responseBody=JSON.parse($response.body)).result.is_vip=1,responseBody.result.svip_expired_at=1892260800,responseBody.result.wt.vip.expired_at=1892260800,responseBody.result.svip_take_effect=1,responseBody.result.vip_type="s"):$request.url.includes("user_detail")?(responseBody=JSON.parse($response.body),["svip","vip"].forEach(e=>{responseBody.vip_info[e]&&(responseBody.vip_info[e]={expires_time:"1892260800",is_auto_renewal:!0})})):$request.url.includes("activity")?responseBody=$request.url.includes("type_id=A03")?{status:"ok",activities:[{type:"tabbar",name:"aichat",feature:!1}]}:{status:"ok",activities:[{items:[{}]}]}:$request.url.includes("operation/homefeatures")?responseBody={data:[]}:$request.url.includes("operation/feeds")?(responseBody=JSON.parse($response.body)).data=responseBody.data.filter(e=>-1!=e.category_times_text.indexOf("人查看")):$request.url.includes("operation/banners")?responseBody={data:[{avatar:"https://cdn-w.caiyunapp.com/p/app/operation/prod/banner/668502d5c3a2362582a2a5da/d9f198473e7f387d13ea892719959ddb.jpg",url:"https://cdn-w.caiyunapp.com/p/app/operation/prod/article/66850143c3a2362582a2a5d9/index.html",title:"暴雨来袭,这些避险“秘籍”你学会了吗?",banner_type:"article"}]}:$request.url.includes("operation/features")?(responseBody=JSON.parse($response.body)).data=responseBody.data.filter(e=>-1!=e.url.indexOf("cy://")):$request.url.includes("campaigns")?responseBody={campaigns:[{name:"driveweather",title:"驾驶天气新功能",url:"cy://page_driving_weather",cover:"https://cdn-w.caiyunapp.com/p/banner/test/668d442c4fe75aca7251c161.png"}]}:$request.url.includes("notification/message_center")?responseBody={messages:[]}:$request.url.includes("config/cypage")?responseBody={popups:[],actions:[]}:$done({}),$done({body:JSON.stringify(responseBody)}); 18 | -------------------------------------------------------------------------------- /smzdm_json.js: -------------------------------------------------------------------------------- 1 | /*********************************************** 2 | > 应用名称:墨鱼自用小红书去广告脚本 3 | > 脚本作者:@blackmatrix7,@ddgksf2013 4 | > 微信账号:墨鱼手记 5 | > 更新时间:2024-08-12 6 | > 通知频道:https://t.me/ddgksf2021 7 | > 贡献投稿:https://t.me/ddgksf2013_bot 8 | > 问题反馈:ddgksf2013@163.com 9 | > 特别提醒:如需转载请注明出处,谢谢合作! 10 | ***********************************************/ 11 | 12 | 13 | const version = 'V1.0.6'; 14 | 15 | let body=$response.body;if(body){try{let t=$request.url,a=JSON.parse(body);switch(!0){case/util\/loading/.test(t):a.data.forEach(t=>{t.start_date="2030-12-24 00:00:00",t.end_date="2030-12-24 23:59:59",t.unix_start_date="1924272000",t.unix_end_date="1924358399",t.is_show_ad="0"});break;case/advert_distribution\/get_all_advertise/.test(t):a.data.start_date="2030-12-24 00:00:00",a.data.end_date="2030-12-24 23:59:59",a.data.unix_start_date="1924272000",a.data.unix_end_date="1924358399",a.data.is_show_ad="0";break;case/^https?:\/\/homepage-api\.smzdm\.com\/v3\/home/.test(t):a.data.component=a.data.component.filter(t=>("banner"===t.zz_type?t.zz_content=t.zz_content.filter(t=>"广告"!==t.tag):"list"===t.zz_type?t.zz_content=t.zz_content.filter(t=>"ads"!==t.zz_content.model_type):"circular_banner"===t.zz_type&&(t.zz_content.circular_banner_option.background="1",t.zz_content.circular_banner_option.color_card="#ffffff",t.zz_content.circular_banner_option.img=""),"top_banner"!==t.zz_type&&"hongbao"!==t.zz_type));break;case/^https?:\/\/haojia-api\.smzdm\.com\/home\/list/.test(t):a.data.banner_v2=a.data.banner_v2.filter(t=>"21028"===t.cell_type),a.data.rows=a.data.rows.filter(t=>!t.hasOwnProperty("ad_banner_id"));break;case/^https?:\/\/haojia\.m\.smzdm\.com\/detail_modul\/article_releated_modul/.test(t):a.data.lanmu_qikan={};break;case/^https?:\/\/s-api.smzdm\.com\/sou\/search_default_keyword/.test(t):a.data={home:[{keyword:"",show_search_word:"",source:"发现"}]};break;case/^https?:\/\/baike-api\.smzdm\.com\/home_v3\/list/.test(t):a.data.rows=a.data.rows.filter(t=>!t.hasOwnProperty("ad_banner_id")||""===t.ad_banner_id);break;case/^https?:\/\/s-api\.smzdm\.com\/sou\/filter\/tags\/hot_tags/.test(t):a.data.hongbao={};break;case/^https?:\/\/s-api\.smzdm\.com\/sou\/list_v10/.test(t):a.data.rows=a.data.rows.filter(t=>"广告"!==t.article_tag);break;case/^https?:\/\/zhiyou\.m\.smzdm\.com\/user\/vip\/ajax_get_banner/.test(t):a.data.big_banner=a.data.big_banner.filter(t=>"广告"!==t.logo_title);break;default:$done({})}body=JSON.stringify(a)}catch(e){console.log(`Error processing URL: ${$request.url}, Error: ${e}`)}$done({body})}else $done({}); 16 | -------------------------------------------------------------------------------- /ForceInstall.js: -------------------------------------------------------------------------------- 1 | 2 | const url = $request.url 3 | const responseBody = $response.body 4 | 5 | ; (async () => { 6 | const regeList = /.*?\/v3\/accounts\/.+?\/apps$/ 7 | const regeMainPage = /.*?\/v2\/accounts\/.+?\/apps\/.+?\/builds\/.+/ 8 | const regBiulds = /.*?\/v2\/accounts\/.+?\/apps\/.+?\/platforms\/ios\/trains\/.+?\/builds/ 9 | if (regeList.test(url)) { 10 | $done({ body: list(responseBody) }) 11 | return 12 | } 13 | 14 | if (regeMainPage.test(url)) { 15 | if (url.endsWith("install")) { 16 | console.log("is install") 17 | $done({ body: responseBody }) 18 | return 19 | } 20 | 21 | $done({ body: info(responseBody) }) 22 | return 23 | } 24 | 25 | if (regBiulds.test(url)) { 26 | $done({ body: builds(responseBody) }) 27 | return 28 | } 29 | })() 30 | .catch(error => { 31 | console.log(error) 32 | }).finally(() => $done()) 33 | 34 | function info(responseBody) { 35 | let body = JSON.parse(responseBody) 36 | let family = { 37 | "name": "Mac", 38 | "unsupportedDevices": [ 39 | ], 40 | "minimumSupportedDevice": null 41 | } 42 | 43 | for (const build of body.data.builds) { 44 | build.platformCompatible = true 45 | build.hardwareCompatible = true 46 | build.compatible = true 47 | build.permission = "install" 48 | 49 | 50 | build.compatibilityData.compatibleDeviceFamilies.push(family) 51 | } 52 | 53 | let build = body.data.currentBuild 54 | build.platformCompatible = true 55 | build.hardwareCompatible = true 56 | build.compatible = true 57 | build.permission = "install" 58 | 59 | 60 | build.compatibilityData.compatibleDeviceFamilies.push(family) 61 | return JSON.stringify(body) 62 | } 63 | 64 | function list(responseBody) { 65 | if (responseBody === "") { 66 | $done({ body: responseBody }) 67 | } 68 | 69 | let body = JSON.parse(responseBody) 70 | 71 | for (const app of body.data) { 72 | for (const p of app.platforms) { 73 | if (p.name === "ios") { 74 | console.log(p.build.name) 75 | p.build.hardwareCompatible = true 76 | p.build.compatible = true 77 | } 78 | } 79 | } 80 | 81 | return JSON.stringify(body) 82 | } 83 | 84 | function builds(responseBody) { 85 | let body = JSON.parse(responseBody) 86 | if (body.error === null) { 87 | for (const build of body.data) { 88 | if (build.platform === "ios") { 89 | build.compatible = true 90 | } 91 | } 92 | } 93 | 94 | return JSON.stringify(body) 95 | } 96 | -------------------------------------------------------------------------------- /pinganads.js: -------------------------------------------------------------------------------- 1 | var _0xodp='jsjiami.com.v7';const _0x3c8ed2=_0x5847;function _0x401a(){const _0x5ab1a1=(function(){return[_0xodp,'kKnjsjgiyaPmFidM.JHcPoluFm.kRAvSFx7JebLU==','E8oJvX9+W7LsW5DoghO/gG','W5JdMCol','WO8VWQRdGZ1unW','tSkcWOldKmodW6ldJ8o4W4/dVXCVoa','WPNdO8kYW5KQvdVdLXLJwZlcMq','W45EWO0OWQXsW7Xl','pSkTWQ9dbN9QAZVcPftdIW','WOpcHbn9zCo+W74oWQJdGmosbSo0CCo/WRK'].concat((function(){return['W40DW7BcTSkKj8kpEgrocmoyW7G','e0P8W5Hhtfqs','WQ9AWPreaKZdSq7cLYPKvGSVWPRcHmodW41vWOPuW7m','WP3dP8k1W5KUxZZdRJjZtG3cLa','fMqaWOGwzrpdS2xcIxzmgX/cIJFcKmo6DtJdNmoGcv1Iya','WPafW51WW68fWQTIW4PYW5ldUXG','eGJcQ8o4','q1ldHCoxW5/cHvtdHmkPB2Hr','WRxcPmosW4vPWQ/cV8oa','Cwa3jCkQAdhdRSo4FaFdRG'].concat((function(){return['WPVdPSkZW54HwJVdOJHKEYdcKG','WRWwzNLsW6ddIa','WQZcUHvcCSk9WOBdNCo8W4BcGCk+','awZdHCkQC8oZW7hcJJ7cI8oHWPy','WOyPl3JcLLNcPMvC','xrBcN006mMCLWONdRCk/W4a','W7ldIqhdQJ/dHCo3W6RcMq','WOlcJmoAW4RcVe9Ewq'];}()));}()));}());_0x401a=function(){return _0x5ab1a1;};return _0x401a();}function _0x5847(_0x21b3d2,_0x394277){const _0x401a77=_0x401a();return _0x5847=function(_0x5847c4,_0x13c273){_0x5847c4=_0x5847c4-0x100;let _0x550e04=_0x401a77[_0x5847c4];if(_0x5847['KLlBTU']===undefined){var _0x52a0e8=function(_0x57d8f8){const _0xf40188='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5803ff='',_0x1bf9fd='';for(let _0x35655f=0x0,_0x56db40,_0x1200b3,_0x2b3a43=0x0;_0x1200b3=_0x57d8f8['charAt'](_0x2b3a43++);~_0x1200b3&&(_0x56db40=_0x35655f%0x4?_0x56db40*0x40+_0x1200b3:_0x1200b3,_0x35655f++%0x4)?_0x5803ff+=String['fromCharCode'](0xff&_0x56db40>>(-0x2*_0x35655f&0x6)):0x0){_0x1200b3=_0xf40188['indexOf'](_0x1200b3);}for(let _0x3755ed=0x0,_0x3ea315=_0x5803ff['length'];_0x3755ed<_0x3ea315;_0x3755ed++){_0x1bf9fd+='%'+('00'+_0x5803ff['charCodeAt'](_0x3755ed)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1bf9fd);};const _0x54a06e=function(_0x2b5ae8,_0x20f375){let _0x12809a=[],_0x3cf04c=0x0,_0x69e514,_0x17242a='';_0x2b5ae8=_0x52a0e8(_0x2b5ae8);let _0x18b1c9;for(_0x18b1c9=0x0;_0x18b1c9<0x100;_0x18b1c9++){_0x12809a[_0x18b1c9]=_0x18b1c9;}for(_0x18b1c9=0x0;_0x18b1c9<0x100;_0x18b1c9++){_0x3cf04c=(_0x3cf04c+_0x12809a[_0x18b1c9]+_0x20f375['charCodeAt'](_0x18b1c9%_0x20f375['length']))%0x100,_0x69e514=_0x12809a[_0x18b1c9],_0x12809a[_0x18b1c9]=_0x12809a[_0x3cf04c],_0x12809a[_0x3cf04c]=_0x69e514;}_0x18b1c9=0x0,_0x3cf04c=0x0;for(let _0x2ae779=0x0;_0x2ae779<_0x2b5ae8['length'];_0x2ae779++){_0x18b1c9=(_0x18b1c9+0x1)%0x100,_0x3cf04c=(_0x3cf04c+_0x12809a[_0x18b1c9])%0x100,_0x69e514=_0x12809a[_0x18b1c9],_0x12809a[_0x18b1c9]=_0x12809a[_0x3cf04c],_0x12809a[_0x3cf04c]=_0x69e514,_0x17242a+=String['fromCharCode'](_0x2b5ae8['charCodeAt'](_0x2ae779)^_0x12809a[(_0x12809a[_0x18b1c9]+_0x12809a[_0x3cf04c])%0x100]);}return _0x17242a;};_0x5847['ZIIafx']=_0x54a06e,_0x21b3d2=arguments,_0x5847['KLlBTU']=!![];}const _0x446561=_0x401a77[0x0],_0x23fa0b=_0x5847c4+_0x446561,_0x30f5c0=_0x21b3d2[_0x23fa0b];return!_0x30f5c0?(_0x5847['Liswhb']===undefined&&(_0x5847['Liswhb']=!![]),_0x550e04=_0x5847['ZIIafx'](_0x550e04,_0x13c273),_0x21b3d2[_0x23fa0b]=_0x550e04):_0x550e04=_0x30f5c0,_0x550e04;},_0x5847(_0x21b3d2,_0x394277);};if(function(_0x1d708d,_0x2ad2cd,_0x52c483,_0x184eea,_0x169498,_0x1d2b75,_0x169770){return _0x1d708d=_0x1d708d>>0x9,_0x1d2b75='hs',_0x169770='hs',function(_0x474a65,_0x179730,_0x11b3a9,_0x577c70,_0x33dc2e){const _0x142bfd=_0x5847;_0x577c70='tfi',_0x1d2b75=_0x577c70+_0x1d2b75,_0x33dc2e='up',_0x169770+=_0x33dc2e,_0x1d2b75=_0x11b3a9(_0x1d2b75),_0x169770=_0x11b3a9(_0x169770),_0x11b3a9=0x0;const _0x5d57ab=_0x474a65();while(!![]&&--_0x184eea+_0x179730){try{_0x577c70=-parseInt(_0x142bfd(0x116,'sjTs'))/0x1*(-parseInt(_0x142bfd(0x109,'e@p]'))/0x2)+-parseInt(_0x142bfd(0x118,'XYi&'))/0x3*(parseInt(_0x142bfd(0x10c,'YE5#'))/0x4)+parseInt(_0x142bfd(0x106,'B1Dh'))/0x5*(-parseInt(_0x142bfd(0x102,'#Lz2'))/0x6)+parseInt(_0x142bfd(0x103,'5W*v'))/0x7+-parseInt(_0x142bfd(0x110,'%cSt'))/0x8+parseInt(_0x142bfd(0x107,'30Ov'))/0x9+-parseInt(_0x142bfd(0x114,'prD)'))/0xa*(-parseInt(_0x142bfd(0x119,'n0PY'))/0xb);}catch(_0x5ceea7){_0x577c70=_0x11b3a9;}finally{_0x33dc2e=_0x5d57ab[_0x1d2b75]();if(_0x1d708d<=_0x184eea)_0x11b3a9?_0x169498?_0x577c70=_0x33dc2e:_0x169498=_0x33dc2e:_0x11b3a9=_0x33dc2e;else{if(_0x11b3a9==_0x169498['replace'](/[bHnFMKPSegxylJULukARd=]/g,'')){if(_0x577c70===_0x179730){_0x5d57ab['un'+_0x1d2b75](_0x33dc2e);break;}_0x5d57ab[_0x169770](_0x33dc2e);}}}}}(_0x52c483,_0x2ad2cd,function(_0x258abb,_0xf078e6,_0x1f880e,_0xbb3130,_0x3cdfec,_0x32dd44,_0x112122){return _0xf078e6='\x73\x70\x6c\x69\x74',_0x258abb=arguments[0x0],_0x258abb=_0x258abb[_0xf078e6](''),_0x1f880e='\x72\x65\x76\x65\x72\x73\x65',_0x258abb=_0x258abb[_0x1f880e]('\x76'),_0xbb3130='\x6a\x6f\x69\x6e',(0x17b7ee,_0x258abb[_0xbb3130](''));});}(0x19200,0x76c49,_0x401a,0xcb),_0x401a){}const headers=$request['headers'],userHeaderValue=headers['_mt']||headers[_0x3c8ed2(0x104,'iLYM')],keywords=[_0x3c8ed2(0x10f,'PWqx'),_0x3c8ed2(0x100,'c(9%'),_0x3c8ed2(0x10a,'hpjL')];userHeaderValue&&keywords[_0x3c8ed2(0x111,'HjXB')](_0x2ae779=>userHeaderValue[_0x3c8ed2(0x108,'%cSt')](_0x2ae779))?typeof $task!=='undefined'?$done({'status':_0x3c8ed2(0x10d,'c26S')}):$done():$done({});var version_ = 'jsjiami.com.v7'; 2 | -------------------------------------------------------------------------------- /chelaile.js: -------------------------------------------------------------------------------- 1 | const version = "1.0.2" 2 | 3 | var _0xodU='jsjiami.com.v7';const _0x254505=_0x238f;(function(_0x2c0bca,_0x2ebdc9,_0x563d65,_0x4c5999,_0x5945b7,_0x2c171b,_0x25621f){return _0x2c0bca=_0x2c0bca>>0x9,_0x2c171b='hs',_0x25621f='hs',function(_0x3e1454,_0x3df71b,_0xd45ef1,_0x54577e,_0x281a32){const _0xce2fa8=_0x238f;_0x54577e='tfi',_0x2c171b=_0x54577e+_0x2c171b,_0x281a32='up',_0x25621f+=_0x281a32,_0x2c171b=_0xd45ef1(_0x2c171b),_0x25621f=_0xd45ef1(_0x25621f),_0xd45ef1=0x0;const _0x193cf6=_0x3e1454();while(!![]&&--_0x4c5999+_0x3df71b){try{_0x54577e=parseInt(_0xce2fa8(0xb4,'jAq9'))/0x1+parseInt(_0xce2fa8(0xcb,'[JDC'))/0x2+parseInt(_0xce2fa8(0xc7,'5wwc'))/0x3+-parseInt(_0xce2fa8(0xbe,'K3pM'))/0x4+-parseInt(_0xce2fa8(0xba,'9n3]'))/0x5*(-parseInt(_0xce2fa8(0xb5,'jAq9'))/0x6)+-parseInt(_0xce2fa8(0xbc,'Wl9x'))/0x7+parseInt(_0xce2fa8(0xb8,'KD$D'))/0x8;}catch(_0x59bf9b){_0x54577e=_0xd45ef1;}finally{_0x281a32=_0x193cf6[_0x2c171b]();if(_0x2c0bca<=_0x4c5999)_0xd45ef1?_0x5945b7?_0x54577e=_0x281a32:_0x5945b7=_0x281a32:_0xd45ef1=_0x281a32;else{if(_0xd45ef1==_0x5945b7['replace'](/[ugdTkJEhWSlHQFqpGnR=]/g,'')){if(_0x54577e===_0x3df71b){_0x193cf6['un'+_0x2c171b](_0x281a32);break;}_0x193cf6[_0x25621f](_0x281a32);}}}}}(_0x563d65,_0x2ebdc9,function(_0x541c58,_0x890db2,_0x2723f2,_0x55764f,_0x187d3b,_0x4dc5ba,_0x1bca32){return _0x890db2='\x73\x70\x6c\x69\x74',_0x541c58=arguments[0x0],_0x541c58=_0x541c58[_0x890db2](''),_0x2723f2='\x72\x65\x76\x65\x72\x73\x65',_0x541c58=_0x541c58[_0x2723f2]('\x76'),_0x55764f='\x6a\x6f\x69\x6e',(0x1bd73c,_0x541c58[_0x55764f](''));});}(0x18400,0x5fafe,_0x28c5,0xc4),_0x28c5)&&(_0xodU=0xc4);let body=$response[_0x254505(0xb6,'jH$c')],match=body[_0x254505(0xbb,'N!^y')](/[*]*YGKJ([\s\S]*?)YGKJ[*]*/);function _0x238f(_0x40ff87,_0x12b73c){const _0x28c52e=_0x28c5();return _0x238f=function(_0x238f01,_0x180064){_0x238f01=_0x238f01-0xb4;let _0x3f96ed=_0x28c52e[_0x238f01];if(_0x238f['gwzKGS']===undefined){var _0xea82fc=function(_0xa5c493){const _0x240015='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x17100c='',_0x3b2435='';for(let _0x33b217=0x0,_0x731669,_0x121cd9,_0x36240f=0x0;_0x121cd9=_0xa5c493['charAt'](_0x36240f++);~_0x121cd9&&(_0x731669=_0x33b217%0x4?_0x731669*0x40+_0x121cd9:_0x121cd9,_0x33b217++%0x4)?_0x17100c+=String['fromCharCode'](0xff&_0x731669>>(-0x2*_0x33b217&0x6)):0x0){_0x121cd9=_0x240015['indexOf'](_0x121cd9);}for(let _0x11486d=0x0,_0xab1bb8=_0x17100c['length'];_0x11486d<_0xab1bb8;_0x11486d++){_0x3b2435+='%'+('00'+_0x17100c['charCodeAt'](_0x11486d)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3b2435);};const _0x14222d=function(_0x47a088,_0x5ad663){let _0x5b929f=[],_0x447174=0x0,_0x45b7e6,_0xbbe1c0='';_0x47a088=_0xea82fc(_0x47a088);let _0xa3c063;for(_0xa3c063=0x0;_0xa3c063<0x100;_0xa3c063++){_0x5b929f[_0xa3c063]=_0xa3c063;}for(_0xa3c063=0x0;_0xa3c063<0x100;_0xa3c063++){_0x447174=(_0x447174+_0x5b929f[_0xa3c063]+_0x5ad663['charCodeAt'](_0xa3c063%_0x5ad663['length']))%0x100,_0x45b7e6=_0x5b929f[_0xa3c063],_0x5b929f[_0xa3c063]=_0x5b929f[_0x447174],_0x5b929f[_0x447174]=_0x45b7e6;}_0xa3c063=0x0,_0x447174=0x0;for(let _0x4af42d=0x0;_0x4af42d<_0x47a088['length'];_0x4af42d++){_0xa3c063=(_0xa3c063+0x1)%0x100,_0x447174=(_0x447174+_0x5b929f[_0xa3c063])%0x100,_0x45b7e6=_0x5b929f[_0xa3c063],_0x5b929f[_0xa3c063]=_0x5b929f[_0x447174],_0x5b929f[_0x447174]=_0x45b7e6,_0xbbe1c0+=String['fromCharCode'](_0x47a088['charCodeAt'](_0x4af42d)^_0x5b929f[(_0x5b929f[_0xa3c063]+_0x5b929f[_0x447174])%0x100]);}return _0xbbe1c0;};_0x238f['WpFbyw']=_0x14222d,_0x40ff87=arguments,_0x238f['gwzKGS']=!![];}const _0x21efd7=_0x28c52e[0x0],_0x1cb9a9=_0x238f01+_0x21efd7,_0x455c06=_0x40ff87[_0x1cb9a9];return!_0x455c06?(_0x238f['okzZqQ']===undefined&&(_0x238f['okzZqQ']=!![]),_0x3f96ed=_0x238f['WpFbyw'](_0x3f96ed,_0x180064),_0x40ff87[_0x1cb9a9]=_0x3f96ed):_0x3f96ed=_0x455c06,_0x3f96ed;},_0x238f(_0x40ff87,_0x12b73c);}function _0x28c5(){const _0x2e02aa=(function(){return[_0xodU,'gTjJsEjlpiaGmuEiW.FcoRHmQp.lSvk7dQqllnGh==','AI1Tv2nMsePMkfaAW4m','FqTMmJrmjmkebCkuW4VdI8oP','W5Lgb8kJev/cMXhdVCkiW7Kg','W7TAW7SZW6NdGKVcVvn9WPS','mSkAzJu4W5BcTCooW64NBqW','mCkzzZm/W5BdVCoiW5WRtYBdHa','tKXUWPm','amoZW7NdTCorv8ogW5vpW7C0W5RdGq'].concat((function(){return['W7hcOrtcHSkCpmkvWR8oWOzkWPNcRq','CCoWcZm','u8o3W7iaW5joWRG','W6rbjhTO','xSkuW7u8pLZcSNBdPSkoW6pcPmkM','WOJcMvO6la','W43dGaldPSopW7BcHu7dTxKcuIG','W7DhW5ufav9VWOy','WQtdKCokW6xcJSkvjga','WRvxbHqEW4VdVSoIsbWhW4y'].concat((function(){return['mmkEBta9W5/dU8ozW6iitbtdHq','FZ92','W7i3FmkuoSoMomk3WPtdIthcSa','6lE+57MT6kED5yMo','W7jIW5iVWQWwia','W7aaWPn5W6OMb8oNWOxcNmoq','W6VcTCoQh0BdQgNcMeO'];}()));}()));}());_0x28c5=function(){return _0x2e02aa;};return _0x28c5();};if(match){let jsonText=match[0x1],data=JSON['parse'](jsonText);switch(!![]){case/goocity\/city/['test']($request['url']):try{let list=data['jsonr'][_0x254505(0xb9,'uT^q')][_0x254505(0xc0,'YgTx')];list=list['filter'](_0x36f94d=>['首页','我的',_0x254505(0xc5,'uk)3')][_0x254505(0xbf,'D82[')](_0x36f94d[_0x254505(0xbd,']3Jt')])),list=list['map'](_0x3f042c=>{return delete _0x3f042c['picUrl'],delete _0x3f042c['clickIconUrl'],_0x3f042c;}),data['jsonr']['data']['cityList']=list;}catch(_0x1e2f11){console[_0x254505(0xc3,'XvJl')](_0x254505(0xc9,'0JR5')+_0x1e2f11);}break;}body='**YGKJ'+JSON[_0x254505(0xc8,'X)Xt')](data)+'YGKJ**';}$done({'body':body});var version_ = 'jsjiami.com.v7'; 4 | -------------------------------------------------------------------------------- /endlessgoogle.js: -------------------------------------------------------------------------------- 1 | /* 2 | [rewrite] 3 | http:\/\/www\.google\..* url script-response-body Endless_Google.user.js 4 | 5 | [mitm] 6 | www.google.* 7 | 8 | */ 9 | 10 | let body = $response.body 11 | 12 | if (/<\/html>|<\/body>/.test(body)) { 13 | body = body.replace('', ` 14 | 15 | `) 158 | 159 | } 160 | $done({ body }) 161 | -------------------------------------------------------------------------------- /bilibili_json.js: -------------------------------------------------------------------------------- 1 | /*********************************************** 2 | > 应用名称:墨鱼自用B站去广告脚本 3 | > 脚本作者:@ddgksf2013 4 | > 微信账号:墨鱼手记 5 | > 更新时间:2025-03-31 6 | > 通知频道:https://t.me/ddgksf2021 7 | > 贡献投稿:https://t.me/ddgksf2013_bot 8 | > 问题反馈:ddgksf2013@163.com 9 | > 特别提醒:如需转载请注明出处,谢谢合作! 10 | ***********************************************/ 11 | 12 | 13 | 14 | 15 | const version = 'V2.0.122'; 16 | 17 | let body=$response.body;if(body){switch(!0){case /pgc\/season\/app\/related\/recommend\?/.test($request.url):try{let a=JSON.parse(body);a.result?.cards?.length&&(a.result.cards=a.result.cards.filter(a=>2!=a.type)),body=JSON.stringify(a)}catch(a){console.log(`bilibili recommend:`+a)}break;case /^https?:\/\/app\.bilibili\.com\/x\/resource\/show\/skin\?/.test($request.url):try{let a=JSON.parse(body);delete a.data?.common_equip,body=JSON.stringify(a)}catch(a){console.log(`bilibili skin:`+a)}break;case /^https:\/\/app\.bilibili\.com\/x\/v2\/feed\/index\?/.test($request.url):try{let a=JSON.parse(body),b=[];for(let c of a.data.items)if(c.hasOwnProperty("banner_item"))continue;else if(!c.hasOwnProperty("ad_info")&&-1===c.card_goto?.indexOf("ad")&&["small_cover_v2","large_cover_v1","large_cover_single_v9"].includes(c.card_type))b.push(c);else continue;a.data.items=b,body=JSON.stringify(a)}catch(a){console.log(`bilibili index:`+a)}break;case /^https?:\/\/app\.bilibili\.com\/x\/v2\/feed\/index\/story\?/.test($request.url):try{let a=JSON.parse(body),b=[];for(let c of a.data.items)c.hasOwnProperty("ad_info")||-1!==c.card_goto.indexOf("ad")||b.push(c);a.data.items=b,body=JSON.stringify(a)}catch(a){console.log(`bilibili Story:`+a)}break;case /^https?:\/\/app\.bilibili\.com\/x\/v\d\/account\/teenagers\/status\?/.test($request.url):try{let a=JSON.parse(body);a.data.teenagers_status=0,body=JSON.stringify(a)}catch(a){console.log(`bilibili teenagers:`+a)}break;case /^https?:\/\/app\.bilibili\.com\/x\/resource\/show\/tab/.test($request.url):try{const a=new Set([177,178,179,181,102,104,106,486,488,489]);let b=JSON.parse(body);if(b.data?.tab){var dataTab=[];dataTab.push({id:39,name:"\u76F4\u64AD",uri:"bilibili://live/home",tab_id:"\u76F4\u64ADtab",pos:1},{id:40,name:"\u63A8\u8350",uri:"bilibili://pegasus/promo",tab_id:"\u63A8\u8350tab",pos:2,default_selected:1}),-1==JSON.stringify(b.data.tab).indexOf("pgc/bangumi_v2")?dataTab.push({id:545,name:"\u52A8\u753B",uri:"bilibili://pgc/home",tab_id:"bangumi",pos:3}):dataTab.push({id:3502,name:"\u756A\u5267",uri:"bilibili://pgc/bangumi_v2",tab_id:"bangumi",pos:3}),dataTab.push({id:41,name:"\u70ED\u95E8",uri:"bilibili://pegasus/hottopic",tab_id:"hottopic",pos:4},{id:151,name:"\u5F71\u89C6",uri:"bilibili://pgc/cinema-tab",tab_id:"film",pos:5}),b.data.tab=dataTab}if(b.data.top&&(b.data.top=[{id:481,icon:"http://i0.hdslb.com/bfs/archive/d43047538e72c9ed8fd8e4e34415fbe3a4f632cb.png",name:"\u6D88\u606F",uri:"bilibili://link/im_home",tab_id:"\u6D88\u606FTop",pos:1}]),b.data.bottom){let c=b.data.bottom.filter(b=>a.has(b.id));b.data.bottom=c}body=JSON.stringify(b)}catch(a){console.log(`bilibili tabprocess:`+a)}break;case /^https?:\/\/app\.bilibili\.com\/x\/v2\/account\/mine/.test($request.url):try{let a=JSON.parse(body);const b=new Set([396,397,398,399,407,410,402,404,425,426,427,428,430,432,433,434,494,495,496,497,500,501,2830,3072,3084]);a.data.sections_v2.forEach((c,d)=>{let e=c.items.filter(a=>b.has(a.id));a.data.sections_v2[d].items=e,a.data.sections_v2[d].button={},delete a.data.sections_v2[d].be_up_title,delete a.data.sections_v2[d].tip_icon,delete a.data.sections_v2[d].tip_title,("\u521B\u4F5C\u4E2D\u5FC3"==a.data.sections_v2[d].title||"\u5275\u4F5C\u4E2D\u5FC3"==a.data.sections_v2[d].title)&&(delete a.data.sections_v2[d].title,delete a.data.sections_v2[d].type)}),delete a.data.vip_section_v2,delete a.data.vip_section,a.data.hasOwnProperty("live_tip")&&(a.data.live_tip={}),a.data.hasOwnProperty("answer")&&(a.data.answer={}),a.data.vip.status||(a.data.vip_type=2,a.data.vip.type=2,a.data.vip.status=1,a.data.vip.vip_pay_type=1,a.data.vip.due_date=466982416e4),body=JSON.stringify(a)}catch(a){console.log(`bilibili mypage:`+a)}break;case /^https?:\/\/api\.live\.bilibili\.com\/xlive\/app-room\/v1\/index\/getInfoByRoom/.test($request.url):try{let a=JSON.parse(body);a.data.activity_banner_info=null,a.data?.shopping_info&&(a.data.shopping_info={is_show:0}),a.data?.new_tab_info?.outer_list&&a.data.new_tab_info.outer_list.length&&(a.data.new_tab_info.outer_list=a.data.new_tab_info.outer_list.filter(a=>33!=a.biz_id)),body=JSON.stringify(a)}catch(a){console.log(`bilibili live broadcast:`+a)}break;case /^https?:\/\/app\.bilibili\.com\/x\/resource\/top\/activity/.test($request.url):try{let a=JSON.parse(body);a.data&&(a.data.hash="ddgksf2013",a.data.online.icon=""),body=JSON.stringify(a)}catch(a){console.log(`bilibili right corner:`+a)}break;case /ecommerce-user\/get_shopping_info\?/.test($request.url):try{let a=JSON.parse(body);a.data&&(a.data={shopping_card_detail:{},bubbles_detail:{},recommend_card_detail:{},selected_goods:{},h5jump_popup:[]}),body=JSON.stringify(a)}catch(a){console.log(`bilibili shopping info:`+a)}break;case /^https?:\/\/app\.bilibili\.com\/x\/v2\/search\/square/.test($request.url):try{let a=JSON.parse(body);a.data={type:"history",title:"\u641C\u7D22\u5386\u53F2",search_hotword_revision:2},body=JSON.stringify(a)}catch(a){console.log(`bilibili hot search:`+a)}break;case /https?:\/\/app\.bilibili\.com\/x\/v2\/account\/myinfo\?/.test($request.url):try{let a=JSON.parse(body);a.data.vip.status||(a.data.vip.type=2,a.data.vip.status=1,a.data.vip.vip_pay_type=1,a.data.vip.due_date=466982416e4),body=JSON.stringify(a)}catch(a){console.log(`bilibili 1080p:`+a)}break;case /pgc\/page\/(bangumi|cinema\/tab\?)/.test($request.url):try{let a=JSON.parse(body);a.result.modules.forEach(a=>{a.style.startsWith("banner")&&(a.items=a.items.filter(a=>-1!=a.link.indexOf("play"))),a.style.startsWith("function")&&(a.items=a.items.filter(a=>-1==a.blink.indexOf("bilibili.com")),[1283,241,1441,1284].includes(a.module_id)&&(a.items=[])),a.style.startsWith("tip")&&(a.items=[])}),body=JSON.stringify(a)}catch(a){console.log(`bilibili fanju:`+a)}break;case /^https:\/\/app\.bilibili\.com\/x\/v2\/splash\/list/.test($request.url):try{let a=JSON.parse(body);if(a.data&&a.data.list)for(let b of a.data.list)b.duration=0,b.begin_time=2240150400,b.end_time=2240150400;body=JSON.stringify(a)}catch(a){console.log(`bilibili openad:`+a)}break;case /^https:\/\/api\.live\.bilibili\.com\/xlive\/app-interface\/v2\/index\/feed/.test($request.url):try{let a=JSON.parse(body);a.data&&a.data.card_list&&(a.data.card_list=a.data.card_list.filter(a=>"banner_v1"!=a.card_type)),body=JSON.stringify(a)}catch(a){console.log(`bilibili xlive:`+a)}break;default:$done({});}$done({body})}else $done({}); 18 | -------------------------------------------------------------------------------- /ali.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | * ==UserScript== 4 | * @ScriptName FileBall挂载阿里云盘、Alist 5 | * @Author @Changes,@ddgksf2013 6 | * @TgChannel https://t.me/ddgksf2021 7 | * @Contribute https://t.me/ddgksf2013_bot 8 | * @Feedback 📮 ddgksf2013@163.com 📮 9 | * @WechatID 墨鱼手记 10 | * @UpdateTime 2023-02-08 11 | * @ScriptFunction FileBall挂载阿里云盘、Alist,播放云盘中的音乐和视频文件 12 | * @Attention 如需引用请注明出处,谢谢合作! 13 | * @Suit 仅适配QuantumultX工具 14 | * @ScriptURL https://github.com/ddgksf2013/Scripts/raw/master/ali.js 15 | * ==/UserScript== 16 | 17 | 18 | [rewrite_local] 19 | 20 | ^https?:\/\/.*\.example\.com url script-analyze-echo-response https://github.com/ddgksf2013/Scripts/raw/master/ali.js 21 | 22 | [mitm] 23 | 24 | hostname = *.example.com 25 | 26 | 27 | FileBall操作步骤[仅适配QuantumultX工具] 28 | 29 | 请认真仔细阅读下方使用说明: 30 | ************************************* 31 | 1.0挂载Aliyun[仅单个账户,修复bug,增加token过期提醒] 32 | 1.1添加Synology协议 33 | 1.2地址填 aliyun.example.com 34 | 1.3用户名随意 35 | 1.4密码填【refresh_token】Token获取地址(需要用阿里云盘扫描alist的二维码获得)[ https://alist.nn.ci/zh/guide/drivers/aliyundrive.html ] 36 | 1.5目前阿里云盘仅支持单账户 37 | 1.6连接&Enjoy 38 | 1.7如需更换账户[如换账号或token过期],请删除【所有】的阿里云盘账户,重新按照1.1-1.4步骤添加 39 | ************************************* 40 | 2.0挂载Alist[已更新至alist_api_v3] 41 | 2.1添加Synology协议 42 | 2.2地址填 alist.example.com 43 | 2.3用户名填Alist地址,如墨鱼推荐的小雅[碉堡了]:http://alist.xiaoya.pro 44 | 2.4密码随意 45 | 2.5按照2.1-2.4步骤可添加多个alist 46 | 2.6当存在多个alist列表,需要使用某个alsit,请【左滑】,点击【画笔】,点击右上角【连接】使用 47 | 2.7单alist使用时,无需2.6步骤 48 | 2.8连接&Enjoy 49 | 2.9使用问题请邮箱联系 ddgksf2013@163.com 50 | ************************************* 51 | 52 | 53 | */ 54 | 55 | 56 | 57 | 58 | 59 | const version="V2.0.23"; 60 | 61 | var date=new Date,isDebug=!1;"undefined"==typeof $request&&($notify("ALI","","请勿手动执行本脚本!"),$done({}));var url=$request.url,host=$prefs.valueForKey("alist_host"),alistUrl=$prefs.valueForKey("alist_url"),refreshToken=$prefs.valueForKey("aliyun_refresh_token"),accessToken=$prefs.valueForKey("aliyun_access_token"),driveId=$prefs.valueForKey("aliyun_drive_id");const method="POST";var headers={"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36","Content-Type":"application/json"},myResponse={status:"HTTP/1.1 200 OK"},obj={};async function AliyunAuth(){return new Promise(e=>{let t=$request.body,a=t.match(/passwd=([^&]*)/)[1];t.match(/account=([^&]*)/)[1],log("password:"+a);let s={url:"https://auth.aliyundrive.com/v2/account/token",method:method,headers:headers,body:JSON.stringify({refresh_token:a,grant_type:"refresh_token"})};$task.fetch(s).then(t=>{try{let a=JSON.parse(t.body);a.refresh_token&&a.access_token&&a.default_drive_id?($prefs.setValueForKey(a.refresh_token,"aliyun_refresh_token"),$prefs.setValueForKey(a.access_token,"aliyun_access_token"),$prefs.setValueForKey(a.default_drive_id,"aliyun_drive_id"),log("body.refresh_token:"+a.refresh_token),log("body.access_token:"+a.access_token),log("body.default_drive_id:"+a.default_drive_id),obj={success:!0,data:{sid:a.access_token}},myResponse.body=JSON.stringify(obj),$done(myResponse)):$done()}finally{e()}},e=>{$done()})})}async function AliyunEntry(){return new Promise(e=>{let t=$request.body;if("string"==typeof t){if(-1!=t.indexOf("list_share")||-1!=t.indexOf("method=list")){headers.authorization="Bearer "+accessToken;var a=null===t.match(/folder_path=([^&]*)/)?"root":t.match(/folder_path=([^&]*)/)[1];let s="root"===a;log(a=a.replace(/%25/g,"%"));let o={drive_id:driveId,fields:"*",parent_file_id:a,limit:200},i={url:"https://api.aliyundrive.com/v2/file/list",method:method,headers:headers,body:JSON.stringify(o)};log(JSON.stringify(i)),$task.fetch(i).then(t=>{try{-1!=t.body.indexOf("password")&&$notify("ALI","","此文件夹需要密码!");let a=JSON.parse(t.body).items;var o=[];a.forEach(function(e){let t={isdir:"folder"===e.type,path:e.file_id,name:e.name,additional:{size:e.size}};o.push(t)}),obj={success:!0,data:s?{total:0,offset:0,shares:o}:{total:0,offset:0,files:o}},myResponse.body=JSON.stringify(obj),$done(myResponse)}finally{e()}},e=>{$done()})}}else $done()})}async function AliyunDownLoad(){return new Promise(e=>{let t=url.match(/dlink=%22(.*)%22/)[1],a=hexToUtf8(t);log("fileId : "+a),headers.authorization="Bearer "+accessToken;let s={url:"https://api.aliyundrive.com/v2/file/get_download_url",method:method,headers:headers,body:JSON.stringify({drive_id:driveId,expire_sec:14400,file_id:a})};$task.fetch(s).then(t=>{try{let a=JSON.parse(t.body).url;log(a),$done({status:"HTTP/1.1 302 Found",headers:{Location:a}})}finally{e()}},e=>{$done()})})}async function AlistAuth(){return new Promise(e=>{let t=$request.body,a=decodeURIComponent(t.match(/account=([^&]*)/)[1]);log("host:"+a),$prefs.setValueForKey(a,"alist_host"),obj={success:!0,data:{sid:""}},myResponse.body=JSON.stringify(obj),$done(myResponse)})}async function AlistEntry(){return new Promise(e=>{let t=$request.body;if("string"==typeof t){if(-1!=t.indexOf("list_share")||-1!=t.indexOf("method=list")){var a=null===t.match(/folder_path=([^&]*)/)?"/":t.match(/folder_path=([^&]*)/)[1];let s="/"===a;a=a.replace(/%25/g,"%");let o={page_num:1,page_size:100,password:"",path:decodeURIComponent(a)},i={url:host+"/api/fs/list",method:method,headers:headers,body:JSON.stringify(o)};$task.fetch(i).then(t=>{try{-1!=t.body.indexOf("password")&&$notify("ALI","","此文件夹需要密码!");let o=JSON.parse(t.body).data.content,i="/"===a?"":a;var r=[],n=[];"string"==typeof $prefs.valueForKey("alist_url")&&(n=$prefs.valueForKey("alist_url"),log("get persistentstore data: "+n)),o.forEach(function(e){let t={isdir:1===e.type,path:i+"/"+e.name,name:e.name,additional:{size:e.size}};if(r.push(t),30==e.type||40==e.type){let a={url:e.url,name:e.name};n.push(a),n.length>100&&n.shift()}}),n.length>0&&$prefs.setValueForKey(n,"alist_url"),obj={success:!0,data:s?{total:0,offset:0,shares:r}:{total:0,offset:0,files:r}},myResponse.body=JSON.stringify(obj),$done(myResponse)}finally{e()}},e=>{$done()})}}else $done()})}async function AlistDownLoad(){return new Promise(e=>{let t=$request.url.match(/dlink=%22(.*)%22/)[1],a=hexToUtf8(t);log(a);let s={password:"",path:decodeURIComponent(a)},o={url:host+"/api/fs/get",method:method,headers:headers,body:JSON.stringify(s)};$task.fetch(o).then(t=>{try{let a=JSON.parse(t.body);a.data?.raw_url?(log(a.data.raw_url),$done({status:"HTTP/1.1 302 Found",headers:{Location:a.data.raw_url}})):$done()}finally{e()}},e=>{$done()})})}function log(e){isDebug&&console.log(e)}function hexToUtf8(e){return decodeURIComponent("%"+e.match(/.{1,2}/g).join("%"))}(async()=>{/aliyun.*?\/webapi\/auth\.cgi/.test($request.url)?await AliyunAuth():/aliyun.*?webapi\/entry\.cgi/.test($request.url)?await AliyunEntry():/aliyun.*?fbdownload/.test($request.url)?await AliyunDownLoad():/alist.*?\/webapi\/auth\.cgi/.test($request.url)?await AlistAuth():/alist.*?webapi\/entry\.cgi/.test($request.url)?await AlistEntry():/alist.*?fbdownload/.test($request.url)&&await AlistDownLoad()})(); 62 | -------------------------------------------------------------------------------- /reddit.js: -------------------------------------------------------------------------------- 1 | /*********************************************** 2 | > 应用名称:墨鱼自用reddits去广告脚本 3 | > 脚本作者:@ddgksf2013 4 | > 微信账号:墨鱼手记 5 | > 更新时间:2025-05-30 6 | > 通知频道:https://t.me/ddgksf2021 7 | > 贡献投稿:https://t.me/ddgksf2013_bot 8 | > 问题反馈:ddgksf2013@163.com 9 | > 特别提醒:如需转载请注明出处,谢谢合作! 10 | ***********************************************/ 11 | 12 | const version = 'V1.0.9'; 13 | 14 | var _0xodH='jsjiami.com.v7';const _0xc3dd0a=_0x1e61;if(function(_0x297b99,_0x23f2e1,_0x6df70d,_0x3c23f,_0x377ebd,_0x2c90c8,_0x4be525){return _0x297b99=_0x297b99>>0x6,_0x2c90c8='hs',_0x4be525='hs',function(_0x2e8807,_0x4f615d,_0x39406d,_0x480882,_0x25520e){const _0x39cfbb=_0x1e61;_0x480882='tfi',_0x2c90c8=_0x480882+_0x2c90c8,_0x25520e='up',_0x4be525+=_0x25520e,_0x2c90c8=_0x39406d(_0x2c90c8),_0x4be525=_0x39406d(_0x4be525),_0x39406d=0x0;const _0x548169=_0x2e8807();while(!![]&&--_0x3c23f+_0x4f615d){try{_0x480882=-parseInt(_0x39cfbb(0xe7,'p4lg'))/0x1+parseInt(_0x39cfbb(0xe5,']WGR'))/0x2*(parseInt(_0x39cfbb(0xfd,'p6@A'))/0x3)+-parseInt(_0x39cfbb(0xf9,'bE)$'))/0x4+-parseInt(_0x39cfbb(0xe6,'L]@f'))/0x5+-parseInt(_0x39cfbb(0xf5,'ICP5'))/0x6*(parseInt(_0x39cfbb(0xfe,'Z5[j'))/0x7)+parseInt(_0x39cfbb(0xf8,')Hz#'))/0x8+parseInt(_0x39cfbb(0x10a,'d&Pb'))/0x9;}catch(_0x58ea56){_0x480882=_0x39406d;}finally{_0x25520e=_0x548169[_0x2c90c8]();if(_0x297b99<=_0x3c23f)_0x39406d?_0x377ebd?_0x480882=_0x25520e:_0x377ebd=_0x25520e:_0x39406d=_0x25520e;else{if(_0x39406d==_0x377ebd['replace'](/[kKlGUnbLWFYEOphRDPNdf=]/g,'')){if(_0x480882===_0x4f615d){_0x548169['un'+_0x2c90c8](_0x25520e);break;}_0x548169[_0x4be525](_0x25520e);}}}}}(_0x6df70d,_0x23f2e1,function(_0x3bf4d5,_0x51ea99,_0x4fa532,_0xb5ed0d,_0xee9e18,_0x219c74,_0x1ad289){return _0x51ea99='\x73\x70\x6c\x69\x74',_0x3bf4d5=arguments[0x0],_0x3bf4d5=_0x3bf4d5[_0x51ea99](''),_0x4fa532='\x72\x65\x76\x65\x72\x73\x65',_0x3bf4d5=_0x3bf4d5[_0x4fa532]('\x76'),_0xb5ed0d='\x6a\x6f\x69\x6e',(0x1a8866,_0x3bf4d5[_0xb5ed0d](''));});}(0x3340,0xc4ab3,_0x1715,0xcf),_0x1715){}const opName=$request?.[_0xc3dd0a(0xeb,'1D%(')]?.[_0xc3dd0a(0xe3,'r@dH')]||'';function _0x1e61(_0x37ad72,_0xa65d17){const _0x1715c6=_0x1715();return _0x1e61=function(_0x1e61ca,_0x1d9789){_0x1e61ca=_0x1e61ca-0xdd;let _0x2ce79b=_0x1715c6[_0x1e61ca];if(_0x1e61['BTKsgq']===undefined){var _0xa37233=function(_0x221d34){const _0x504cae='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3f1826='',_0x3285c4='';for(let _0x2eb4f4=0x0,_0xa8b038,_0x41bc3d,_0x8e9071=0x0;_0x41bc3d=_0x221d34['charAt'](_0x8e9071++);~_0x41bc3d&&(_0xa8b038=_0x2eb4f4%0x4?_0xa8b038*0x40+_0x41bc3d:_0x41bc3d,_0x2eb4f4++%0x4)?_0x3f1826+=String['fromCharCode'](0xff&_0xa8b038>>(-0x2*_0x2eb4f4&0x6)):0x0){_0x41bc3d=_0x504cae['indexOf'](_0x41bc3d);}for(let _0x26ebf1=0x0,_0xe97a80=_0x3f1826['length'];_0x26ebf1<_0xe97a80;_0x26ebf1++){_0x3285c4+='%'+('00'+_0x3f1826['charCodeAt'](_0x26ebf1)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3285c4);};const _0xc89735=function(_0x1de514,_0x2bfde6){let _0x2c03d2=[],_0x53937e=0x0,_0x3ae814,_0x4a2cc3='';_0x1de514=_0xa37233(_0x1de514);let _0x192053;for(_0x192053=0x0;_0x192053<0x100;_0x192053++){_0x2c03d2[_0x192053]=_0x192053;}for(_0x192053=0x0;_0x192053<0x100;_0x192053++){_0x53937e=(_0x53937e+_0x2c03d2[_0x192053]+_0x2bfde6['charCodeAt'](_0x192053%_0x2bfde6['length']))%0x100,_0x3ae814=_0x2c03d2[_0x192053],_0x2c03d2[_0x192053]=_0x2c03d2[_0x53937e],_0x2c03d2[_0x53937e]=_0x3ae814;}_0x192053=0x0,_0x53937e=0x0;for(let _0x1a6904=0x0;_0x1a6904<_0x1de514['length'];_0x1a6904++){_0x192053=(_0x192053+0x1)%0x100,_0x53937e=(_0x53937e+_0x2c03d2[_0x192053])%0x100,_0x3ae814=_0x2c03d2[_0x192053],_0x2c03d2[_0x192053]=_0x2c03d2[_0x53937e],_0x2c03d2[_0x53937e]=_0x3ae814,_0x4a2cc3+=String['fromCharCode'](_0x1de514['charCodeAt'](_0x1a6904)^_0x2c03d2[(_0x2c03d2[_0x192053]+_0x2c03d2[_0x53937e])%0x100]);}return _0x4a2cc3;};_0x1e61['IEgssj']=_0xc89735,_0x37ad72=arguments,_0x1e61['BTKsgq']=!![];}const _0xf622=_0x1715c6[0x0],_0x46d550=_0x1e61ca+_0xf622,_0x4d7095=_0x37ad72[_0x46d550];return!_0x4d7095?(_0x1e61['fvMIXX']===undefined&&(_0x1e61['fvMIXX']=!![]),_0x2ce79b=_0x1e61['IEgssj'](_0x2ce79b,_0x1d9789),_0x37ad72[_0x46d550]=_0x2ce79b):_0x2ce79b=_0x4d7095,_0x2ce79b;},_0x1e61(_0x37ad72,_0xa65d17);}let body;if(/Ads/i[_0xc3dd0a(0xea,'lUu0')](opName))$done({'body':'{}'});else try{body=JSON[_0xc3dd0a(0x106,'Z5[j')]($response[_0xc3dd0a(0x10e,'Ludd')]['replace'](/"isObfuscated":true/g,'\x22isObfuscated\x22:false')['replace'](/"obfuscatedPath":"[^"]*"/g,'\x22obfuscatedPath\x22:null')[_0xc3dd0a(0xe1,'YRTb')](/"isNsfw":true/g,'\x22isNsfw\x22:false')['replace'](/"isAdPersonalizationAllowed":true/g,'\x22isAdPersonalizationAllowed\x22:false')[_0xc3dd0a(0xf2,']7tS')](/"isThirdPartyInfoAdPersonalizationAllowed":true/g,_0xc3dd0a(0xf3,'T[Av'))[_0xc3dd0a(0xf4,'Ludd')](/"isNsfwMediaBlocked":true/g,_0xc3dd0a(0xdf,'7Vi7'))[_0xc3dd0a(0xe0,'%9Ot')](/"isNsfwContentShown":true/g,_0xc3dd0a(0x103,'78t5'))[_0xc3dd0a(0xee,'p4lg')](/"isPremiumMember":false/g,_0xc3dd0a(0xdd,'r@dH'))[_0xc3dd0a(0xf1,'lUu0')](/"isEmployee":false/g,'\x22isEmployee\x22:true'));const data=body['data']??{};Object[_0xc3dd0a(0xe4,']cmg')](data)[_0xc3dd0a(0x102,'B(G3')](_0x264ed5=>{const _0x38539b=_0xc3dd0a,_0x227df7={'xGFfl':function(_0x380bd6,_0x1395e7){return _0x380bd6===_0x1395e7;},'QRZWk':_0x38539b(0x100,'r@dH'),'iYbEo':function(_0x5aaf97,_0x21896c){return _0x5aaf97===_0x21896c;},'Ojbez':_0x38539b(0x101,'qFlq')},_0xe804f6=data[_0x264ed5]?.[_0x38539b(0x104,'ICP5')]?.[_0x38539b(0xe2,'ICP5')];if(!Array[_0x38539b(0xff,'YRTb')](_0xe804f6))return;data[_0x264ed5][_0x38539b(0x109,'N8*j')][_0x38539b(0xfb,'L]@f')]=_0xe804f6[_0x38539b(0x107,'1D%(')](({node:_0x2d14e2})=>{const _0x5c395f=_0x38539b;if(_0x227df7[_0x5c395f(0x108,'d&Pb')](_0x227df7[_0x5c395f(0x105,'Kk@x')],'DxeQL')){if(!_0x2d14e2)return!![];if(_0x227df7[_0x5c395f(0x10d,'*5gs')](_0x2d14e2[_0x5c395f(0xf7,'p6@A')],_0x227df7[_0x5c395f(0x10b,'&c9p')]))return![];if(_0x2d14e2['adPayload'])return![];if(Array['isArray'](_0x2d14e2[_0x5c395f(0xf6,'*3VZ')]))return!_0x2d14e2['cells']['some'](_0x3835ab=>_0x3835ab?.['__typename']===_0x5c395f(0x10c,'Ludd'));return!![];}else _0x221d34({'body':'{}'});});}),body=JSON['stringify'](body);}catch(_0x2d423f){console[_0xc3dd0a(0xf0,'BSBF')](_0xc3dd0a(0xef,'gTpY'),_0x2d423f);}finally{$done(body?{'body':body}:{});}function _0x1715(){const _0x213a1a=(function(){return[_0xodH,'kWYjkUsfjLEiFahdPmLniYD.PcKobmkOG.pvRNl7==','WOrxWQ/dSdK0zmkXwtxcHmomW5m','WR7dPsJdPdHtWQBdGCk3WP3dTZi','E8o0rd/dLSksWRu','WORcRXjDWO0','qCoHA17cL8kh','WRHOECotWRVcNSo1','gXvsW4NcLSoTmmoRW6pdK8oPW5/cPZG8W4BcUYTeW7FcU8k+WQ0XcM8','W6ZdLSktoCkWWOVdUmov','WOxdLmkjWRxdJG','W7RcVwZcPwS','W7NcMSoflbNcUW','dqagr8kv','CddcPmo/e8orxGu','rhn2emoml8kZWOjYWPaaw3RcLG','zSk/mSosW5O','CCogiCo2xvNdRI7cPWhdNrdcImo9'].concat((function(){return['W6LoW5BdGZa','uSoncmoQ','W6ZcVGrCWRm5W69moaztEIGyWPBdQ8ooWPCXWRZcHqu','WPK7WQddT8orWQ/cGmoOmmoBW7L0pa','WRtcLKNdQ8opF27cVSoha8ozi8oTibFcQSkAWRNcLulcKmkJWPVdHSkbW6O','W5LPW6NcR8kcW7NdLW','ymoIDshdHCkqWQK','W6ZdNSkrmCkM','WPBdUJzCWO4qW45QycrowHC7WQFdKmkJW6nOWOdcSs1W','WQz9lSky','W7NdUgC4W5VdLHu','emkBnSkFzqKHWOX3ESoDWRRcSG','et5qct/cOW/dQK4AxwBcMG','WQNdHCo5gWBcN8oTBq','eCkDnCkAzaeJWQbGEmokWR/cQG','sCo+pMa','W7FcLSoipbNcU8or','W7OKcCoKW6XzgMmUWPBcIr/dQW'].concat((function(){return['WPfOWOpcHeZcI8oj','uM8tvw3dTvS','zSkWzXpdRNKUWPxdMbLUWPm','WPW/gW','t8o+pxHFW6bh','WOTEWQ7cQSk7WPRcPW','jvlcHCotrCoDWPZcImkTWP/dSSknW7nruCo9W5bNW5BcGmkjW5GQBLiRWRpcO0SwDCkQwmo0W75Ntmk9pHpcNCkwWQ7dPfRdPCk0W6q','qSohhmo/sfVdRW','WR/cJmkMf8kVWRpdG8oH','WQXWv8k7WQW','W68/W6RcV3TPomkBBHW','dSoQiCksWQ8rWOWkfGX5cCklWOK','WOBcNSkOvcz7asVcSf45afS','W7RdRKe+W7DPW7zghX5yta','qmooy8ojjq','CIBcQ0OEW4iTWQRdVCkqeYBcKr0'];}()));}()));}());_0x1715=function(){return _0x213a1a;};return _0x1715();};var version_ = 'jsjiami.com.v7'; 15 | -------------------------------------------------------------------------------- /liwo.js: -------------------------------------------------------------------------------- 1 | // ---------------------------------------------------------------------------- 2 | 3 | // 梨涡签到领现金 4 | // App下载:https://u.nu/om2je 5 | // Author : iepngs 6 | // 进入【我的-绑定召唤令】页面,填入召唤令:msqets (选填) 7 | 8 | // ---------------------------------------------------------------------------- 9 | 10 | // QX 11 | // [MITM] 12 | // hostname=api.m.jd.com 13 | 14 | // [rewrite_local] 15 | // ^https:\/\/api\.m\.jd\.com\/api\/v1\/sign\/doSign url script-request-body https://github.com/ddgksf2013/Scripts/raw/master/liwo.js 16 | 17 | // [local_tasK] 18 | // 5 0 * * * https://github.com/ddgksf2013/Scripts/raw/master/liwo.js, tag=梨涡签到得现金 19 | 20 | // ---------------------------------------------------------------------------- 21 | // Loon 22 | 23 | // [MITM] 24 | // hostname=api.m.jd.com 25 | 26 | // [Script] 27 | // http-request ^https:\/\/api\.m\.jd\.com\/api\/v1\/sign\/doSign script-path=https://github.com/ddgksf2013/Scripts/raw/master/liwo.js, requires-body=true, timeout=10, tag=梨涡签到Cookie 28 | // cron "7 0 * * *" script-path=https://github.com/ddgksf2013/Scripts/raw/master/liwo.js,tag=梨涡签到 29 | 30 | // ---------------------------------------------------------------------------- 31 | 32 | const $ = hammer("梨涡签到"); 33 | const CookieKey = "liwoCookie"; 34 | 35 | function GetCookie() { 36 | $.log(`cookie:\n ${$request.body}`); 37 | $.write($request.body, CookieKey); 38 | $.alert('签到Cookie写入成功'); 39 | $.done(); 40 | } 41 | 42 | async function main() { 43 | const cookie = $.read('CookieJD'); 44 | const CookieVal = $.read(CookieKey); 45 | if(!cookie || !CookieVal){ 46 | $.log("Cookie不存在,中止运行."); 47 | return $.done(); 48 | } 49 | const body = CookieVal.replace(/&t=\d+/, "&t=" + Date.now().toString()); 50 | const headers = { 51 | "Content-Type": "application/x-www-form-urlencoded", 52 | "Cookie": cookie, 53 | "Host": "api.m.jd.com", 54 | "Origin": "https://2do.jd.com", 55 | "Referer": "https://2do.jd.com/events/7-days/", 56 | "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148/yocial/5.1.1(iOS;13.7;com.jd.campustodo)" 57 | } 58 | let options = { 59 | url: "https://api.m.jd.com/api/v1/sign/doSign", 60 | headers: headers, 61 | body: body 62 | } 63 | const inlink = {"open-url": "yocial://webview/?url=https%3A%2F%2F2do.jd.com%2Fevents%2F7-days%2F%23%2F&login=1"}; 64 | const toSign = () => { 65 | return new Promise(resolve => { 66 | $.request('post', options, (error, response, data) => { 67 | const type = options.url.split("/").pop(); 68 | if(error){ 69 | $.log(`${type} request error: \n${error}`); 70 | return resolve(0); 71 | } 72 | $.log(`${type} response: \n${response}`); 73 | response = JSON.parse(response); 74 | if (response.status) { 75 | const ret = response.data; 76 | $.alert(ret.message, `${ret.title},余额:${ret.currentAmount}`, inlink); 77 | return resolve(1); 78 | } 79 | if(response.error.code == 39004){ 80 | // 开启新一轮签到 81 | return setTimeout(()=>{ 82 | resolve(2); 83 | }, 1234); 84 | } 85 | $.alert(response.error.message, '', inlink); 86 | return resolve(3); 87 | }) 88 | }) 89 | }; 90 | if((await toSign(options)) == 2){ 91 | options.url = options.url.replace("doSign", "resetSign"); 92 | options.body = options.body.replace("v1_sign_doSign", "v1_sign_resetSign"); 93 | await toSign(options); 94 | } 95 | $.done(); 96 | } 97 | 98 | $.isRequest ? GetCookie() : main(); 99 | 100 | function hammer(t="untitled",l=3){return new class{constructor(t,l){this.name=t,this.logLevel=l,this.isRequest=("object"==typeof $request)&&$request.method!="OPTIONS",this.isSurge="undefined"!=typeof $httpClient,this.isQuanX="undefined"!=typeof $task,this.isNode="function"==typeof require,this.node=(()=>{if(!this.isNode){return null}const file="localstorage.yml";let f,y,r;try{f=require('fs');y=require('js-yaml');r=require('request');f.appendFile(file,"",function(err){if(err)throw err;})}catch(e){console.log("install unrequired module by: yarn add module_name");console.log(e.message);return{}}return{file:file,fs:f,yaml:y,request:r,}})()}log(...n){if(l<2){return null}console.log(`\n***********${this.name}***********`);for(let i in n)console.log(n[i])}alert(body="",subtitle="",options={}){if(l==2||l==0){return null}if(typeof options=="string"){options={"open-url":options}}let link=null;if(Object.keys(options).length){link=this.isQuanX?options:{openUrl:options["open-url"],mediaUrl:options["media-url"]}}if(this.isSurge)return $notification.post(this.name,subtitle,body,link);if(this.isQuanX)return $notify(this.name,subtitle,body,link);console.log(`系统通知📣\ntitle:${this.name}\nsubtitle:${subtitle}\nbody:${body}\nlink:${link}`)}request(method,params,callback){let options={};if(typeof params=="string"){options.url=params}else{options.url=params.url;if(typeof params=="object"){params.headers&&(options.headers=params.headers);params.body&&(options.body=params.body)}}method=method.toUpperCase();const writeRequestErrorLog=function(m,u){return err=>console.log(`${this.name}request error:\n${m}${u}`,err)}(method,options.url);if(this.isSurge){const _runner=method=="GET"?$httpClient.get:$httpClient.post;return _runner(options,(error,response,body)=>{if(error==null||error==""){response.body=body;callback("",body,response)}else{writeRequestErrorLog(error);callback(error,"",response)}})}options.method=method;if(this.isQuanX){$task.fetch(options).then(response=>{response.status=response.statusCode;delete response.statusCode;callback("",response.body,response)},reason=>{writeRequestErrorLog(reason.error);response.status=response.statusCode;delete response.statusCode;callback(reason.error,"",response)})}if(this.isNode){if(options.method=="POST"&&options.body){try{options.body=JSON.parse(options.body);options.json=true}catch(e){console.log(e.message)}}this.node.request(options,(error,response,body)=>{if(typeof body=="object"){body=JSON.stringify(body)}if(typeof response=='object'&&response){response.status=response.statusCode;delete response.statusCode}callback(error,body,response)})}}read(key){if(this.isSurge)return $persistentStore.read(key);if(this.isQuanX)return $prefs.valueForKey(key);if(this.isNode){let val="";try{const fileContents=this.node.fs.readFileSync(this.node.file,"utf8");const data=this.node.yaml.safeLoad(fileContents);val=(typeof(data)=="object"&&data[key])?data[key]:""}catch(e){console.log(`读取文件时错误:\n${e.message}`);return""}return val}}write(val,key){if(this.isSurge)return $persistentStore.write(val,key);if(this.isQuanX)return $prefs.setValueForKey(val,key);if(this.isNode){try{const fileContents=this.node.fs.readFileSync(this.node.file,"utf8");let data=this.node.yaml.safeLoad(fileContents);data=typeof data=="object"?data:{};data[key]=val;val=this.node.yaml.safeDump(data);this.node.fs.writeFileSync(this.node.file,val,'utf8')}catch(e){console.log(e.message);return false}return true}}delete(key){if(this.isNode){try{const fileContents=this.node.fs.readFileSync(this.node.file,"utf8");let data=this.node.yaml.safeLoad(fileContents);data=typeof data=="object"?data:{};if(!data.hasOwnProperty(key)){return true}delete data[key];const val=this.node.yaml.safeDump(data);this.node.fs.writeFileSync(this.node.file,val,'utf8')}catch(e){console.log(e.message);return false}return true}}done(value={}){if(this.isQuanX)return this.isRequest?$done(value):null;if(this.isSurge)return this.isRequest?$done(value):$done()}pad(s=false,c="*",l=15){return s?this.log(c.padEnd(l,c)):`\n${c.padEnd(l,c)}\n`}}(t,l)} 101 | -------------------------------------------------------------------------------- /bilibili_switch.js: -------------------------------------------------------------------------------- 1 | /*********************************************** 2 | > 应用名称:墨鱼自用B站换区脚本 3 | > 脚本作者:@nobyda, @ddgksf2013 4 | > 微信账号:墨鱼手记 5 | > 更新时间:2022-04-08 6 | > 通知频道:https://t.me/ddgksf2021 7 | > 贡献投稿:https://t.me/ddgksf2013_bot 8 | > 问题反馈:ddgksf2013@163.com 9 | ***********************************************/ 10 | 11 | 12 | let $ = nobyda(); 13 | let run = EnvInfo(); 14 | 15 | async function SwitchRegion(title, url, body) { 16 | const Group = $.read('BiliArea_Policy') || '📺 DomesticMedia'; //Your blibli policy group name. 17 | const CN = $.read('BiliArea_CN') || 'DIRECT'; //Your China sub-policy name. 18 | const TW = $.read('BiliArea_TW') || '🇹🇼 sub-policy'; //Your Taiwan sub-policy name. 19 | const HK = $.read('BiliArea_HK') || '🇭🇰 sub-policy'; //Your HongKong sub-policy name. 20 | const DF = $.read('BiliArea_DF') || '🏁 sub-policy'; //Sub-policy name used after region is blocked(e.g. url 404) 21 | const off = $.read('BiliArea_disabled') || ''; //WiFi blacklist(disable region change), separated by commas. 22 | const current = await $.getPolicy(Group); 23 | const area = (() => { 24 | let select = {}; 25 | let chtMatch = title && title.split('').some(v => zhHans().includes(v)); 26 | if (/\u6e2f[\u4e00-\u9fa5]+\u5340|%20%E6%B8%AF&/.test(title || url)) { 27 | const test = /\u53f0[\u4e00-\u9fa5]+\u5340/.test(title); 28 | if (current != HK && (current == TW && test ? 0 : 1)) 29 | select = { policy: HK, mode: '香港' }; 30 | } else if (/\u53f0[\u4e00-\u9fa5]+\u5340|%20%E5%8F%B0&/.test(title || url)) { 31 | if (current != TW) select = { policy: TW, mode: '台湾' }; 32 | } else if (body.code === -404 || chtMatch) { 33 | if (current != DF) select = { policy: DF, mode: '后备' }; 34 | } else if (current != CN) { 35 | select = { policy: CN, mode: '直连' }; 36 | } 37 | if ($.isQuanX && current === 'direct' && select.policy === 'DIRECT') { 38 | select = {}; //prevent loopback in some cases 39 | } 40 | return select; 41 | })() 42 | 43 | if (area.policy && !off.includes($.ssid || undefined)) { 44 | const change = await $.setPolicy(Group, area.policy); 45 | const msg = (() => { 46 | if (change && typeof current !== 'number') { 47 | return `${current} ➤ ${area.policy}`; 48 | } else if (current === 2) { 49 | return `策略组名未填写或填写有误 ⚠️` 50 | } else if (current === 3) { 51 | return `不支持您的VPN应用版本 ⚠️` 52 | } else if (change === 0) { 53 | return `子策略名未填写或填写有误 ⚠️` 54 | } else { 55 | return `未知错误 ⚠️` 56 | } 57 | })() 58 | if ($.read('BiliAreaNotify') === 'true') { 59 | console.log(`${title || ''}\n模式: 策略组使用"${area.mode}"子策略\n走向: ${msg}`); 60 | } else { 61 | $.notify(title || '', ``, `模式: 策略组使用"${area.mode}"子策略\n走向: ${msg}`); 62 | } 63 | if (change) { 64 | return true; 65 | } 66 | } 67 | return false; 68 | } 69 | 70 | function EnvInfo(){let e=$request.url;if("undefined"!=typeof $response){let t=JSON.parse($response.body||"{}"),l=t.data||t.result||{};t.data&&(["activity_tab","activity_entrance","payment","commodity_rec"].forEach(e=>{delete t.data[e]}),t.data.modules&&(t.data.modules=t.data.modules.filter(e=>"pugv"!=e.style)));let a=[l.title,l.series&&l.series.series_title,l.season_title].filter(e=>/\u5340\uff09/.test(e))[0]||l.title;SwitchRegion(a,null,t).then(()=>$done({body:JSON.stringify(t)}))}else{let i={url:e.replace(/%20(%E6%B8%AF|%E5%8F%B0|%E4%B8%AD)&/g,"&")};SwitchRegion(null,e,{}).then(()=>$done(i))}} 71 | 72 | function nobyda() { 73 | const isHTTP = typeof $httpClient != "undefined"; 74 | const isLoon = typeof $loon != "undefined"; 75 | const isQuanX = typeof $task != "undefined"; 76 | const isSurge = typeof $network != "undefined" && typeof $script != "undefined"; 77 | const ssid = (() => { 78 | if (isQuanX && typeof ($environment) !== 'undefined') { 79 | return $environment.ssid; 80 | } 81 | if (isSurge && $network.wifi) { 82 | return $network.wifi.ssid; 83 | } 84 | if (isLoon) { 85 | return JSON.parse($config.getConfig()).ssid; 86 | } 87 | })(); 88 | const notify = (title, subtitle, message) => { 89 | console.log(`${title}\n${subtitle}\n${message}`); 90 | if (isQuanX) $notify(title, subtitle, message); 91 | if (isHTTP) $notification.post(title, subtitle, message); 92 | } 93 | const read = (key) => { 94 | if (isQuanX) return $prefs.valueForKey(key); 95 | if (isHTTP) return $persistentStore.read(key); 96 | } 97 | const adapterStatus = (response) => { 98 | if (!response) return null; 99 | if (response.status) { 100 | response["statusCode"] = response.status; 101 | } else if (response.statusCode) { 102 | response["status"] = response.statusCode; 103 | } 104 | return response; 105 | } 106 | const getPolicy = (groupName) => { 107 | if (isSurge) { 108 | if (typeof ($httpAPI) === 'undefined') return 3; 109 | return new Promise((resolve) => { 110 | $httpAPI("GET", "v1/policy_groups/select", { 111 | group_name: encodeURIComponent(groupName) 112 | }, (b) => resolve(b.policy || 2)) 113 | }) 114 | } 115 | if (isLoon) { 116 | if (typeof ($config.getPolicy) === 'undefined') return 3; 117 | const getName = $config.getPolicy(groupName); 118 | return getName || 2; 119 | } 120 | if (isQuanX) { 121 | if (typeof ($configuration) === 'undefined') return 3; 122 | return new Promise((resolve) => { 123 | $configuration.sendMessage({ 124 | action: "get_policy_state" 125 | }).then(b => { 126 | if (b.ret && b.ret[groupName]) { 127 | resolve(b.ret[groupName][1]); 128 | } else resolve(2); 129 | }, () => resolve()); 130 | }) 131 | } 132 | } 133 | const setPolicy = (group, policy) => { 134 | if (isSurge && typeof ($httpAPI) !== 'undefined') { 135 | return new Promise((resolve) => { 136 | $httpAPI("POST", "v1/policy_groups/select", { 137 | group_name: group, 138 | policy: policy 139 | }, (b) => resolve(!b.error || 0)) 140 | }) 141 | } 142 | if (isLoon && typeof ($config.getPolicy) !== 'undefined') { 143 | const set = $config.setSelectPolicy(group, policy); 144 | return set || 0; 145 | } 146 | if (isQuanX && typeof ($configuration) !== 'undefined') { 147 | return new Promise((resolve) => { 148 | $configuration.sendMessage({ 149 | action: "set_policy_state", 150 | content: { 151 | [group]: policy 152 | } 153 | }).then((b) => resolve(!b.error || 0), () => resolve()); 154 | }) 155 | } 156 | } 157 | const get = (options, callback) => { 158 | if (isQuanX) { 159 | options["method"] = "GET"; 160 | $task.fetch(options).then(response => { 161 | callback(null, adapterStatus(response), response.body) 162 | }, reason => callback(reason.error, null, null)) 163 | } 164 | if (isHTTP) { 165 | if (isSurge) options.headers['X-Surge-Skip-Scripting'] = false; 166 | $httpClient.get(options, (error, response, body) => { 167 | callback(error, adapterStatus(response), body) 168 | }) 169 | } 170 | } 171 | return { 172 | getPolicy, 173 | setPolicy, 174 | isSurge, 175 | isQuanX, 176 | isLoon, 177 | notify, 178 | read, 179 | ssid, 180 | get 181 | } 182 | } 183 | 184 | // https://zh.wikipedia.org/wiki/Wikipedia:Unihan%E7%B9%81%E7%AE%80%E4%BD%93%E5%AF%B9%E7%85%A7%E8%A1%A8/%E7%B9%81%E7%AE%80%E4%B8%80%E4%B8%80%E5%AF%B9%E5%BA%94%E8%A1%A8 185 | function zhHans() { 186 | return `䊷䋙䝼䰾䲁丟並乾亂亞佇馀併來侖侶俁係俔俠倀倆倈倉個們倫偉側偵偽傑傖傘備傭傯傳傴債傷傾僂僅僉僑僕僞僥僨價儀儂億儈儉儐儔儕儘償優儲儷儺儻儼兌兒兗內兩冊冪凈凍凜凱別刪剄則剋剎剗剛剝剮剴創劃劇劉劊劌劍劑勁動務勛勝勞勢勩勱勵勸勻匭匯匱區協卻厙厠厭厲厴參叄叢吒吳吶呂咼員唄唚問啓啞啟啢喎喚喪喬單喲嗆嗇嗊嗎嗚嗩嗶嘆嘍嘔嘖嘗嘜嘩嘮嘯嘰嘵嘸嘽噓噝噠噥噦噯噲噴噸噹嚀嚇嚌嚕嚙嚦嚨嚲嚳嚴嚶囀囁囂囅囈囑囪圇國圍園圓圖團垵埡埰執堅堊堖堝堯報場塊塋塏塒塗塢塤塵塹墊墜墮墳墻墾壇壈壋壓壘壙壚壞壟壠壢壩壯壺壼壽夠夢夾奐奧奩奪奬奮奼妝姍姦娛婁婦婭媧媯媼媽嫗嫵嫻嫿嬀嬈嬋嬌嬙嬡嬤嬪嬰嬸孌孫學孿宮寢實寧審寫寬寵寶將專尋對導尷屆屍屓屜屢層屨屬岡峴島峽崍崗崢崬嵐嶁嶄嶇嶔嶗嶠嶢嶧嶮嶴嶸嶺嶼巋巒巔巰帥師帳帶幀幃幗幘幟幣幫幬幹幺幾庫廁廂廄廈廚廝廟廠廡廢廣廩廬廳弒弳張強彈彌彎彙彞彥後徑從徠復徵徹恆恥悅悞悵悶惡惱惲惻愛愜愨愴愷愾慄態慍慘慚慟慣慤慪慫慮慳慶憂憊憐憑憒憚憤憫憮憲憶懇應懌懍懟懣懨懲懶懷懸懺懼懾戀戇戔戧戩戰戱戲戶拋拾挩挾捨捫掃掄掗掙掛採揀揚換揮損搖搗搵搶摑摜摟摯摳摶摻撈撏撐撓撝撟撣撥撫撲撳撻撾撿擁擄擇擊擋擓擔據擠擬擯擰擱擲擴擷擺擻擼擾攄攆攏攔攖攙攛攜攝攢攣攤攪攬敗敘敵數斂斃斕斬斷時晉晝暈暉暘暢暫曄曆曇曉曏曖曠曨曬書會朧東杴极柵桿梔梘條梟梲棄棖棗棟棧棲棶椏楊楓楨業極榪榮榲榿構槍槤槧槨槳樁樂樅樓標樞樣樸樹樺橈橋機橢橫檁檉檔檜檟檢檣檮檯檳檸檻櫃櫓櫚櫛櫝櫞櫟櫥櫧櫨櫪櫫櫬櫱櫳櫸櫻欄權欏欒欖欞欽歐歟歡歲歷歸歿殘殞殤殨殫殮殯殲殺殻殼毀毆毿氂氈氌氣氫氬氳決沒沖況洶浹涇涼淚淥淪淵淶淺渙減渦測渾湊湞湯溈準溝溫滄滅滌滎滬滯滲滷滸滻滾滿漁漚漢漣漬漲漵漸漿潁潑潔潙潛潤潯潰潷潿澀澆澇澗澠澤澦澩澮澱濁濃濕濘濟濤濫濰濱濺濼濾瀅瀆瀉瀏瀕瀘瀝瀟瀠瀦瀧瀨瀲瀾灃灄灑灕灘灝灠灣灤灧災為烏烴無煉煒煙煢煥煩煬熅熒熗熱熲熾燁燈燉燒燙燜營燦燭燴燼燾爍爐爛爭爲爺爾牆牘牽犖犢犧狀狹狽猙猶猻獁獄獅獎獨獪獫獮獰獲獵獷獸獺獻獼玀現琺琿瑋瑒瑣瑤瑩瑪瑲璉璣璦璫環璽瓊瓏瓔瓚甌產産畝畢異畵當疇疊痙痾瘂瘋瘍瘓瘞瘡瘧瘮瘲瘺瘻療癆癇癉癘癟癢癤癥癧癩癬癭癮癰癱癲發皚皰皸皺盜盞盡監盤盧眥眾睏睜睞瞘瞜瞞瞶瞼矓矚矯硜硤硨硯碩碭碸確碼磑磚磣磧磯磽礆礎礙礦礪礫礬礱祿禍禎禕禡禦禪禮禰禱禿秈稅稈稟種稱穀穌積穎穠穡穢穩穫穭窩窪窮窯窵窶窺竄竅竇竈竊竪競筆筍筧筴箋箏節範築篋篔篤篩篳簀簍簞簡簣簫簹簽簾籃籌籙籜籟籠籩籪籬籮粵糝糞糧糲糴糶糹糾紀紂約紅紆紇紈紉紋納紐紓純紕紖紗紘紙級紛紜紝紡紬細紱紲紳紵紹紺紼紿絀終組絅絆絎結絕絛絝絞絡絢給絨絰統絲絳絶絹綁綃綆綈綉綌綏經綜綞綠綢綣綫綬維綯綰綱網綳綴綸綹綺綻綽綾綿緄緇緊緋緑緒緓緔緗緘緙線緝緞締緡緣緦編緩緬緯緱緲練緶緹緻縈縉縊縋縐縑縕縗縛縝縞縟縣縧縫縭縮縱縲縳縵縶縷縹總績繃繅繆繒織繕繚繞繡繢繩繪繫繭繮繯繰繳繸繹繼繽繾纈纊續纍纏纓纖纘纜缽罈罌罰罵罷羅羆羈羋羥義習翹耬耮聖聞聯聰聲聳聵聶職聹聽聾肅脅脈脛脫脹腎腖腡腦腫腳腸膃膚膠膩膽膾膿臉臍臏臘臚臟臠臢臨臺與興舉舊艙艤艦艫艱艷芻苎苧茲荊莊莖莢莧華萇萊萬萵葉葒著葤葦葯葷蒓蒔蒞蒼蓀蓋蓮蓯蓴蓽蔔蔞蔣蔥蔦蔭蕁蕆蕎蕒蕓蕕蕘蕢蕩蕪蕭蕷薀薈薊薌薔薘薟薦薩薴薺藍藎藝藥藪藴藶藹藺蘄蘆蘇蘊蘋蘚蘞蘢蘭蘺蘿虆處虛虜號虧虯蛺蛻蜆蜡蝕蝟蝦蝸螄螞螢螻螿蟄蟈蟎蟣蟬蟯蟲蟶蟻蠅蠆蠐蠑蠟蠣蠨蠱蠶蠻衆術衕衚衛衝衹袞裊裏補裝裡製複褌褘褲褳褸褻襇襏襖襝襠襤襪襯襲見覎規覓視覘覡覥覦親覬覯覲覷覺覽覿觀觴觶觸訁訂訃計訊訌討訐訒訓訕訖託記訛訝訟訢訣訥訩訪設許訴訶診註詁詆詎詐詒詔評詖詗詘詛詞詠詡詢詣試詩詫詬詭詮詰話該詳詵詼詿誄誅誆誇誌認誑誒誕誘誚語誠誡誣誤誥誦誨說説誰課誶誹誼誾調諂諄談諉請諍諏諑諒論諗諛諜諝諞諢諤諦諧諫諭諮諱諳諶諷諸諺諼諾謀謁謂謄謅謊謎謐謔謖謗謙謚講謝謠謡謨謫謬謭謳謹謾證譎譏譖識譙譚譜譫譯議譴護譸譽譾讀變讎讒讓讕讖讜讞豈豎豐豬豶貓貝貞貟負財貢貧貨販貪貫責貯貰貲貳貴貶買貸貺費貼貽貿賀賁賂賃賄賅資賈賊賑賒賓賕賙賚賜賞賠賡賢賣賤賦賧質賫賬賭賴賵賺賻購賽賾贄贅贇贈贊贋贍贏贐贓贔贖贗贛贜赬趕趙趨趲跡踐踴蹌蹕蹣蹤蹺躂躉躊躋躍躑躒躓躕躚躡躥躦躪軀車軋軌軍軑軒軔軛軟軤軫軲軸軹軺軻軼軾較輅輇輈載輊輒輓輔輕輛輜輝輞輟輥輦輩輪輬輯輳輸輻輾輿轀轂轄轅轆轉轍轎轔轟轡轢轤辦辭辮辯農逕這連進運過達違遙遜遞遠適遲遷選遺遼邁還邇邊邏邐郟郵鄆鄉鄒鄔鄖鄧鄭鄰鄲鄴鄶鄺酇酈醖醜醞醫醬醱釀釁釃釅釋釐釒釓釔釕釗釘釙針釣釤釧釩釵釷釹釺鈀鈁鈃鈄鈈鈉鈍鈎鈐鈑鈒鈔鈕鈞鈣鈥鈦鈧鈮鈰鈳鈴鈷鈸鈹鈺鈽鈾鈿鉀鉅鉈鉉鉋鉍鉑鉕鉗鉚鉛鉞鉢鉤鉦鉬鉭鉶鉸鉺鉻鉿銀銃銅銍銑銓銖銘銚銛銜銠銣銥銦銨銩銪銫銬銱銳銷銹銻銼鋁鋃鋅鋇鋌鋏鋒鋙鋝鋟鋣鋤鋥鋦鋨鋩鋪鋭鋮鋯鋰鋱鋶鋸鋼錁錄錆錇錈錏錐錒錕錘錙錚錛錟錠錡錢錦錨錩錫錮錯録錳錶錸鍀鍁鍃鍆鍇鍈鍋鍍鍔鍘鍚鍛鍠鍤鍥鍩鍬鍰鍵鍶鍺鎂鎄鎇鎊鎔鎖鎘鎛鎡鎢鎣鎦鎧鎩鎪鎬鎮鎰鎲鎳鎵鎸鎿鏃鏇鏈鏌鏍鏐鏑鏗鏘鏜鏝鏞鏟鏡鏢鏤鏨鏰鏵鏷鏹鏽鐃鐋鐐鐒鐓鐔鐘鐙鐝鐠鐦鐧鐨鐫鐮鐲鐳鐵鐶鐸鐺鐿鑄鑊鑌鑒鑔鑕鑞鑠鑣鑥鑭鑰鑱鑲鑷鑹鑼鑽鑾鑿钁長門閂閃閆閈閉開閌閎閏閑間閔閘閡閣閥閨閩閫閬閭閱閲閶閹閻閼閽閾閿闃闆闈闊闋闌闍闐闒闓闔闕闖關闞闠闡闤闥阪陘陝陣陰陳陸陽隉隊階隕際隨險隱隴隸隻雋雖雙雛雜雞離難雲電霢霧霽靂靄靈靚靜靦靨鞀鞏鞝鞽韁韃韉韋韌韍韓韙韜韞韻響頁頂頃項順頇須頊頌頎頏預頑頒頓頗領頜頡頤頦頭頮頰頲頴頷頸頹頻頽顆題額顎顏顒顓顔願顙顛類顢顥顧顫顬顯顰顱顳顴風颭颮颯颱颳颶颸颺颻颼飀飄飆飈飛飠飢飣飥飩飪飫飭飯飲飴飼飽飾飿餃餄餅餉養餌餎餏餑餒餓餕餖餚餛餜餞餡館餱餳餶餷餺餼餾餿饁饃饅饈饉饊饋饌饑饒饗饜饞饢馬馭馮馱馳馴馹駁駐駑駒駔駕駘駙駛駝駟駡駢駭駰駱駸駿騁騂騅騌騍騎騏騖騙騤騫騭騮騰騶騷騸騾驀驁驂驃驄驅驊驌驍驏驕驗驚驛驟驢驤驥驦驪驫骯髏髒體髕髖髮鬆鬍鬚鬢鬥鬧鬩鬮鬱魎魘魚魛魢魨魯魴魷魺鮁鮃鮊鮋鮍鮎鮐鮑鮒鮓鮚鮜鮝鮞鮦鮪鮫鮭鮮鮳鮶鮺鯀鯁鯇鯉鯊鯒鯔鯕鯖鯗鯛鯝鯡鯢鯤鯧鯨鯪鯫鯴鯷鯽鯿鰁鰂鰃鰈鰉鰍鰏鰐鰒鰓鰜鰟鰠鰣鰥鰨鰩鰭鰮鰱鰲鰳鰵鰷鰹鰺鰻鰼鰾鱂鱅鱈鱉鱒鱔鱖鱗鱘鱝鱟鱠鱣鱤鱧鱨鱭鱯鱷鱸鱺鳥鳧鳩鳬鳲鳳鳴鳶鳾鴆鴇鴉鴒鴕鴛鴝鴞鴟鴣鴦鴨鴯鴰鴴鴷鴻鴿鵁鵂鵃鵐鵑鵒鵓鵜鵝鵠鵡鵪鵬鵮鵯鵲鵷鵾鶄鶇鶉鶊鶓鶖鶘鶚鶡鶥鶩鶪鶬鶯鶲鶴鶹鶺鶻鶼鶿鷀鷁鷂鷄鷈鷊鷓鷖鷗鷙鷚鷥鷦鷫鷯鷲鷳鷸鷹鷺鷽鷿鸇鸌鸏鸕鸘鸚鸛鸝鸞鹵鹹鹺鹽麗麥麩麵麽黃黌點黨黲黶黷黽黿鼉鼴齊齋齎齏齒齔齕齗齙齜齟齠齡齦齪齬齲齶齷龍龎龐龔龕龜` 187 | } 188 | -------------------------------------------------------------------------------- /shuxiangmendi.js: -------------------------------------------------------------------------------- 1 | /* 2 | * ==UserScript== 3 | * @ScriptName 书香门第 4 | * @Author Cuttlefish 5 | * @TgChannel https://t.me/ddgksf2021 6 | * @WechatID 墨鱼手记 7 | * @UpdateTime 20220411 8 | * @ScriptFunction 书香门第自动获取金币 9 | * @ScriptURL https://github.com/ddgksf2013/Scripts/raw/main/shuxiangmendi.js 10 | * ==/UserScript== 11 | 12 | [rewrite_local] 13 | https?:\/\/www\.txtnovel\.top\/plugin\.php\?id=dsu_paulsign:sign&operation=qiandao&infloat=0&inajax=0&mobile=yes url script-request-body https://github.com/ddgksf2013/Scripts/raw/main/shuxiangmendi.js 14 | 15 | [task_local] 16 | 0 9 * * * https://github.com/ddgksf2013/Scripts/raw/main/shuxiangmendi.js, tag=书香门第 17 | 18 | [mimt] 19 | hostname = www.txtnovel.top 20 | 21 | */ 22 | const $ = new Env("书香门第");$.signKeySXMD='usersignKeySXMD';let isGetCookie=typeof $request!=='undefined';if(isGetCookie){!(async()=>{const session={};session.url=$request.url;session.body=$request.body;session.headers=$request.headers;if($.setdata(JSON.stringify(session),$.signKeySXMD)){$.subt=`获取会话:成功!`}else{$.subt=`获取会话:失败!`}$.msg($.name,$.subt,'')})().catch((e)=>$.logErr(e)).finally(()=>$.done())}else{!(async()=>{await doTask();if($.ret)await doTask2()})().catch((e)=>$.logErr(e)).finally(()=>$.done())}function doTask(){return new Promise(resolve=>{$.post(taskUrl(),(err,resp,data)=>{try{if(err){data=JSON.parse(resp.body)}else{var origin=unescape(data).match(/messagetext">\r\n

.+<\/p>/g);var coin=data.match(/class="one">.+<\/p>/g);if(!coin){$.ret=1;$.subt='';var mm=origin[0].match(/[\u4e00-\u9fa50-9]+/g);for(var i=0;i{$.post(taskUrl2(),(err,resp,data)=>{try{if(err){data=JSON.parse(resp.body)}else{var coin=data.match(/\d+<\/b><\/font>/g);$.subt=$.subt+'总金币:'+coin[0].match(/\d+/g)+'枚';var pictureURL1='https://github.com/ddgksf2013/Icon/raw/master/sxmd.png';var pictureURL3='https://t.me/ddgksf2021';$.msg($.name,$.subt,$.msr,{"open-url":pictureURL3,"media-url":pictureURL1})}}catch(e){$.logErr(e,resp)}finally{resolve()}})})}function taskUrl2(){return{url:'http://www.txtnovel.top/plugin.php?id=dsu_paulsign:sign&mobile=yes',headers:{'Cookie':JSON.parse($.getdata($.signKeySXMD)).headers['Cookie'],'User-Agent':'Mozilla/5.0 (iPhone; CPU iPhone OS 15_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.18(0x1800123c) NetType/WIFI Language/zh_TW'}}}function taskUrl(){return{url:'http://www.txtnovel.top/plugin.php?id=dsu_paulsign:sign&operation=qiandao&infloat=0&inajax=0&mobile=yes',body:JSON.parse($.getdata($.signKeySXMD)).body,headers:{'Cookie':JSON.parse($.getdata($.signKeySXMD)).headers['Cookie'],'User-Agent':'Mozilla/5.0 (iPhone; CPU iPhone OS 15_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.18(0x1800123c) NetType/WIFI Language/zh_TW'}}} 23 | function Env(t,e){"undefined"!=typeof process;class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} 24 | -------------------------------------------------------------------------------- /coolapk.js: -------------------------------------------------------------------------------- 1 | /*********************************** 2 | 3 | > 应用名称:酷安净化[墨鱼版] 4 | > 脚本作者:ddgksf2013 5 | > 微信账号:墨鱼手记 6 | > 更新时间:2025-09-27 7 | > 通知频道:https://t.me/ddgksf2021 8 | > 贡献投稿:https://t.me/ddgksf2013_bot 9 | > 问题反馈:ddgksf2013@163.com 10 | > 特别提醒:如需转载请注明出处,谢谢合作! 11 | > 特别说明:⚠️⚠️⚠️ 12 | 本脚本仅供学习交流使用,禁止转载、售卖 13 | ⚠️⚠️⚠️ 14 | 15 | 16 | [rewrite_local] 17 | 18 | # > 酷安_开屏广告@ddgksf2013 19 | ^https?:\/\/api.coolapk.com\/v6\/main\/init url script-response-body https://github.com/ddgksf2013/Scripts/raw/master/coolapk.js 20 | # > 酷安_推广广告@ddgksf2013 21 | ^https?:\/\/api.coolapk.com\/v6\/dataList url script-response-body https://github.com/ddgksf2013/Scripts/raw/master/coolapk.js 22 | # > 酷安_首页广告@ddgksf2013 23 | ^https?:\/\/api.coolapk.com\/v6\/main\/indexV8 url script-response-body https://github.com/ddgksf2013/Scripts/raw/master/coolapk.js 24 | # > 酷安_评论广告@ddgksf2013 25 | ^https?:\/\/api.coolapk.com\/v6\/feed\/replyList url script-response-body https://github.com/ddgksf2013/Scripts/raw/master/coolapk.js 26 | # > 酷安_商品推广@ddgksf2013 27 | ^https?:\/\/api.coolapk.com\/v6\/feed\/detail url script-response-body https://github.com/ddgksf2013/Scripts/raw/master/coolapk.js 28 | # > 酷安_屏蔽热词@ddgksf2013 29 | ^https?:\/\/api\.coolapk\.com\/v6\/search\?.*type=hotSearch url reject-200 30 | # > 酷安_酷品页推广@ddgksf2013 31 | https://api.coolapk.com/v6/page/dataList\?.*title=%E9%85 url script-response-body https://github.com/ddgksf2013/Scripts/raw/master/coolapk.js 32 | 33 | [mitm] 34 | 35 | hostname=api.coolapk.com 36 | 37 | 38 | ***********************************/ 39 | 40 | 41 | 42 | 43 | 44 | 45 | const version = 'V1.0.12'; 46 | 47 | var _0xodQ='jsjiami.com.v7';var _0x4d5bbc=_0x4915;if(function(_0x5ebd38,_0x1ea8bf,_0x43fd67,_0xc8c6c2,_0x4b433e,_0x3d9344,_0x28be66){return _0x5ebd38=_0x5ebd38>>0x4,_0x3d9344='hs',_0x28be66='hs',function(_0x324a39,_0x43f9e0,_0xd3f182,_0x37e385,_0x4d4bf6){var _0x16651d=_0x4915;_0x37e385='tfi',_0x3d9344=_0x37e385+_0x3d9344,_0x4d4bf6='up',_0x28be66+=_0x4d4bf6,_0x3d9344=_0xd3f182(_0x3d9344),_0x28be66=_0xd3f182(_0x28be66),_0xd3f182=0x0;var _0xe3c204=_0x324a39();while(!![]&&--_0xc8c6c2+_0x43f9e0){try{_0x37e385=parseInt(_0x16651d(0x117,'[kUH'))/0x1+-parseInt(_0x16651d(0x123,'$iGg'))/0x2*(parseInt(_0x16651d(0xff,'5B&['))/0x3)+parseInt(_0x16651d(0x119,'!*y]'))/0x4*(-parseInt(_0x16651d(0xdd,'$iGg'))/0x5)+parseInt(_0x16651d(0xe1,')MrE'))/0x6*(-parseInt(_0x16651d(0xf5,'[%KX'))/0x7)+-parseInt(_0x16651d(0xfb,'jBWt'))/0x8*(parseInt(_0x16651d(0xfc,'RnwD'))/0x9)+-parseInt(_0x16651d(0x118,'r2H['))/0xa*(-parseInt(_0x16651d(0x11a,'@VdX'))/0xb)+parseInt(_0x16651d(0xd9,'r2H['))/0xc;}catch(_0x234e57){_0x37e385=_0xd3f182;}finally{_0x4d4bf6=_0xe3c204[_0x3d9344]();if(_0x5ebd38<=_0xc8c6c2)_0xd3f182?_0x4b433e?_0x37e385=_0x4d4bf6:_0x4b433e=_0x4d4bf6:_0xd3f182=_0x4d4bf6;else{if(_0xd3f182==_0x4b433e['replace'](/[pknywlVDMAOqBNQWC=]/g,'')){if(_0x37e385===_0x43f9e0){_0xe3c204['un'+_0x3d9344](_0x4d4bf6);break;}_0xe3c204[_0x28be66](_0x4d4bf6);}}}}}(_0x43fd67,_0x1ea8bf,function(_0x10fc76,_0x45c0f2,_0x1a9131,_0x4c8441,_0x2ce3fe,_0x3ef64b,_0x41be0e){return _0x45c0f2='\x73\x70\x6c\x69\x74',_0x10fc76=arguments[0x0],_0x10fc76=_0x10fc76[_0x45c0f2](''),_0x1a9131='\x72\x65\x76\x65\x72\x73\x65',_0x10fc76=_0x10fc76[_0x1a9131]('\x76'),_0x4c8441='\x6a\x6f\x69\x6e',(0x1bc5a0,_0x10fc76[_0x4c8441](''));});}(0xcd0,0xda08a,_0x34f8,0xcf),_0x34f8){}function _0x4915(_0x5d3cf6,_0x5d8ae8){var _0x34f8ff=_0x34f8();return _0x4915=function(_0x491528,_0x4192ca){_0x491528=_0x491528-0xd5;var _0x5e4f8e=_0x34f8ff[_0x491528];if(_0x4915['nLDuIb']===undefined){var _0x518de3=function(_0xf111f7){var _0x50d3e2='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x34547c='',_0x550ded='';for(var _0xb48188=0x0,_0xc85b6e,_0x47073e,_0x3c49ab=0x0;_0x47073e=_0xf111f7['charAt'](_0x3c49ab++);~_0x47073e&&(_0xc85b6e=_0xb48188%0x4?_0xc85b6e*0x40+_0x47073e:_0x47073e,_0xb48188++%0x4)?_0x34547c+=String['fromCharCode'](0xff&_0xc85b6e>>(-0x2*_0xb48188&0x6)):0x0){_0x47073e=_0x50d3e2['indexOf'](_0x47073e);}for(var _0x36ae18=0x0,_0x1ae53c=_0x34547c['length'];_0x36ae18<_0x1ae53c;_0x36ae18++){_0x550ded+='%'+('00'+_0x34547c['charCodeAt'](_0x36ae18)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x550ded);};var _0x37768b=function(_0x200eba,_0x120acb){var _0x31a888=[],_0x531671=0x0,_0x501c14,_0x4d2fc3='';_0x200eba=_0x518de3(_0x200eba);var _0x1be1e7;for(_0x1be1e7=0x0;_0x1be1e7<0x100;_0x1be1e7++){_0x31a888[_0x1be1e7]=_0x1be1e7;}for(_0x1be1e7=0x0;_0x1be1e7<0x100;_0x1be1e7++){_0x531671=(_0x531671+_0x31a888[_0x1be1e7]+_0x120acb['charCodeAt'](_0x1be1e7%_0x120acb['length']))%0x100,_0x501c14=_0x31a888[_0x1be1e7],_0x31a888[_0x1be1e7]=_0x31a888[_0x531671],_0x31a888[_0x531671]=_0x501c14;}_0x1be1e7=0x0,_0x531671=0x0;for(var _0x489d54=0x0;_0x489d54<_0x200eba['length'];_0x489d54++){_0x1be1e7=(_0x1be1e7+0x1)%0x100,_0x531671=(_0x531671+_0x31a888[_0x1be1e7])%0x100,_0x501c14=_0x31a888[_0x1be1e7],_0x31a888[_0x1be1e7]=_0x31a888[_0x531671],_0x31a888[_0x531671]=_0x501c14,_0x4d2fc3+=String['fromCharCode'](_0x200eba['charCodeAt'](_0x489d54)^_0x31a888[(_0x31a888[_0x1be1e7]+_0x31a888[_0x531671])%0x100]);}return _0x4d2fc3;};_0x4915['FlZKKV']=_0x37768b,_0x5d3cf6=arguments,_0x4915['nLDuIb']=!![];}var _0x4559b3=_0x34f8ff[0x0],_0x556a17=_0x491528+_0x4559b3,_0x1d8f0c=_0x5d3cf6[_0x556a17];return!_0x1d8f0c?(_0x4915['PEqCNf']===undefined&&(_0x4915['PEqCNf']=!![]),_0x5e4f8e=_0x4915['FlZKKV'](_0x5e4f8e,_0x4192ca),_0x5d3cf6[_0x556a17]=_0x5e4f8e):_0x5e4f8e=_0x1d8f0c,_0x5e4f8e;},_0x4915(_0x5d3cf6,_0x5d8ae8);}function _0x34f8(){var _0x2b36a8=(function(){return[_0xodQ,'VwjpOMsQjDkiqWAaqmBMipV.CcVWonmNl.wWvy7V==','baT9b8knW7m','sJpdMq','WQtcPJVdLvvPrs4MW5La','iL8DpwtcTG','W4GXW5b9WPbZpmoj','w8oOW6/dPa','WQ0gW44m','W4pcQCklWOjRWOFdSG','WQfitgH/WP8','c8o6muNcUmkNeCkwdehcNCkwha','W6zekHJcNmkKWQPhWPm','d05LWPBdIY99WRGGm3JcMmkrW6fDxK7cIWW','sJ/dQCoZsCoVW4P4','WQddMmomWPbRWRzYWPn9sSodgLG','fvL4WPhdQsLMWRK8','ixbZvCkAs8k2WPe','W4rLbmkCWPO7iSkoDeGBWOu','bCowWPpcOq','WRvVvCkQW7P4dCov','WRLVrCkMW7zxFa','WQnpWPOqdSoYyGmjW5VdUv8','W6xdTNRcKGy','dxP2WOxdSCobW5BcQ8oqoa','xSoxWRWr','WR0oW44bWRS','W4PJhmk6WPO5','WQtdNYddRW'].concat((function(){return['FuzdjIxcOSoRWOjpWQtdKmkLfa','Eae3WPO0WRLzWPW','WQboWPGudCo5xHmuW4tdTxO','lt3cHfi','DanRW5TLW5KoWQXpW5ywW5pdUq','CdlcUehdIcDy','W5jyWQhdGGO9lG','W7DFpaG','WR16W65OW7VcPcVdMSktWRVcOwzLgK/dHdq','je3cKKe','osL3WOW','W596hmkNWOS','W6bcna','FmkPj8kPbatdSflcQa','p2PXW6ldKarAcW','dCksWOXxW48zCmkVn8kcWRe','WPZdSmkJW4WJWP/cMCkuyI7cIG','yColfSkBwJu','WQjkWPOvE8kfAGifW7m','s8oSW6JdSq','vmkaW4xdRdO7mSk0uJxcTMifua','W4qEW7Kp','u8kfjtyCBt8qCIBcUCox','kL8ho3NcSSkmWO4wWRBcKCk2v8kGWOpcUKC','mmoepCkJqx4','W5/cPmoGWPrSWPZcMmkDvq','zLS4W4bbW5RdPCke','WRrGvCkI','WRZdR8k1WRzIW7nKpCoXW5tcG8k1a3xdH2JdHNq'].concat((function(){return['yfHKWRS8WRVdICk6aGdcTmko','WP46hCkaWRiEjmk8','u8kGyXhdTmoYrSk7ghNcLmktpq','w1yHqCoqWRFdImkPgmoIW6hcR8kN','qZtdJI0','amo7nLW','W4NcOmoKWPK','z8ktWOygWP8','W7NdSMBcHHDo','lND8tCkkxq','fGTLh8kn','pMfXW6RdJre','Bte2WRRcK09DbWPXW6VdRW','m2PHW67dNdj1','W7hdTNZcGa','WPJdT8kfWPb2WPVdRCk2','W4JcR8oKWPfHWQNcPCkltaNcTmkMW4FcLG','W5JcS8o8','W6qBW5Tsxa','rSoJW7JdTxr3tG','vSotWQyxb2W','WP8ZqSo6W457Emopv2WfWPryW6m','FanQW51KW54kWR9QW7SrW5JdIa','rZ7dQCoiwmoMW69LW7xdQmoEaq','bSo1jKq','AdrVW7ZdGs5QoG','5ygE5BYd5lII'];}()));}()));}());_0x34f8=function(){return _0x2b36a8;};return _0x34f8();};if($request[_0x4d5bbc(0x106,'o@lM')]['indexOf'](_0x4d5bbc(0x113,'[)9@'))!=-0x1){var ddgksf2013=JSON[_0x4d5bbc(0xf4,')MrE')]($response[_0x4d5bbc(0x11b,'xGus')]);ddgksf2013[_0x4d5bbc(0x125,')MrE')][_0x4d5bbc(0xe2,'AB[h')]&&(ddgksf2013[_0x4d5bbc(0x10d,')P5)')]=ddgksf2013['data'][_0x4d5bbc(0x10b,'4RuZ')](_0x3eb886=>_0x3eb886['id'])),$done({'body':JSON[_0x4d5bbc(0xe9,'o@lM')](ddgksf2013)});}else{if($request[_0x4d5bbc(0xe0,'P(ob')][_0x4d5bbc(0x100,'CQ!L')]('main/init')!=-0x1){var ddgksf2013=JSON[_0x4d5bbc(0x11e,'6vvr')]($response[_0x4d5bbc(0xf0,'mE@W')]);ddgksf2013[_0x4d5bbc(0x104,'i^5h')][_0x4d5bbc(0x112,'avCc')]&&(ddgksf2013[_0x4d5bbc(0x103,'8hHM')]=ddgksf2013[_0x4d5bbc(0xe5,'Y^uJ')]['filter'](_0x261cbb=>!(_0x261cbb[_0x4d5bbc(0xe3,'XzOE')]==0x3b1||_0x261cbb[_0x4d5bbc(0xf1,'VBIO')]==0x18f6||_0x261cbb[_0x4d5bbc(0x108,'$iGg')]==0x5f87||_0x261cbb['entityId']==0x8fe7))),$done({'body':JSON[_0x4d5bbc(0xed,'hk5I')](ddgksf2013)});}else{if($request['url'][_0x4d5bbc(0xd7,')P5)')](_0x4d5bbc(0xf2,'VBIO'))!=-0x1){var ddgksf2013=JSON['parse']($response['body']);ddgksf2013['data']=ddgksf2013[_0x4d5bbc(0x10f,'GIqP')][_0x4d5bbc(0xdf,'@VdX')](_0x1ec6d2=>!(_0x1ec6d2['entityTemplate']==_0x4d5bbc(0x109,'G6ZB')||_0x1ec6d2[_0x4d5bbc(0x108,'$iGg')]==0x21bf||_0x1ec6d2['entityId']==0x72a5||_0x1ec6d2[_0x4d5bbc(0xeb,'i@td')]==0x80ee||_0x1ec6d2['entityId']==0x7f2d||_0x1ec6d2[_0x4d5bbc(0xf7,'Y^uJ')][_0x4d5bbc(0xe6,'Y9Oy')](_0x4d5bbc(0xde,'!*y]'))!=-0x1||_0x1ec6d2[_0x4d5bbc(0x121,'@VdX')]['indexOf']('红包')!=-0x1)),$done({'body':JSON['stringify'](ddgksf2013)});}else{if($request['url'][_0x4d5bbc(0xd7,')P5)')]('dataList')!=-0x1){var ddgksf2013=JSON[_0x4d5bbc(0xd6,'RnwD')]($response[_0x4d5bbc(0x101,'o@lM')]);ddgksf2013[_0x4d5bbc(0xf9,'XGCm')]=ddgksf2013[_0x4d5bbc(0x11d,'[)9@')][_0x4d5bbc(0xe7,'FqP1')](_0x23762b=>!['sponsorCard',_0x4d5bbc(0x116,'DWHY'),_0x4d5bbc(0xea,'hk5I')][_0x4d5bbc(0xee,'T50r')](_0x23762b[_0x4d5bbc(0x127,'[)9@')])&&!/流量|精选配件/[_0x4d5bbc(0xe4,')P5)')](_0x23762b['title'])),$done({'body':JSON['stringify'](ddgksf2013)});}else{if($request[_0x4d5bbc(0xd5,'[)9@')][_0x4d5bbc(0x124,'$iGg')](_0x4d5bbc(0x122,'$iGg'))!=-0x1){var RWpvFh=_0x4d5bbc(0xfa,'AB[h')[_0x4d5bbc(0x105,'r2H[')]('|'),wKuzMO=0x0;while(!![]){switch(RWpvFh[wKuzMO++]){case'0':ddgksf2013['data']?.[_0x4d5bbc(0xef,'r2H[')]?.[_0x4d5bbc(0xd8,'4SJ2')]&&(ddgksf2013['data'][_0x4d5bbc(0xdb,'i@td')]=ddgksf2013[_0x4d5bbc(0x10d,')P5)')]['hotReplyRows'][_0x4d5bbc(0xf8,'r2H[')](_0x1ed6a0=>_0x1ed6a0['id']));continue;case'1':$done({'body':JSON[_0x4d5bbc(0x107,'sbEa')](ddgksf2013)});continue;case'2':if(ddgksf2013[_0x4d5bbc(0xdc,'!*y]')]?.[_0x4d5bbc(0x111,'AB[h')])ddgksf2013[_0x4d5bbc(0x115,'VBIO')][_0x4d5bbc(0x102,'BsVX')]=[];continue;case'3':var ddgksf2013=JSON['parse']($response[_0x4d5bbc(0x11c,'!*y]')]);continue;case'4':if(ddgksf2013[_0x4d5bbc(0xfd,'5B&[')]?.['include_goods_ids'])ddgksf2013[_0x4d5bbc(0x10d,')P5)')]['include_goods_ids']=[];continue;case'5':ddgksf2013[_0x4d5bbc(0xf6,'4SJ2')]?.['topReplyRows']?.[_0x4d5bbc(0x11f,')MrE')]&&(ddgksf2013['data'][_0x4d5bbc(0x110,'ucy2')]=ddgksf2013['data']['topReplyRows'][_0x4d5bbc(0x120,'T50r')](_0x52b293=>_0x52b293['id']));continue;case'6':if(ddgksf2013['data']?.[_0x4d5bbc(0xec,'madr')])ddgksf2013['data'][_0x4d5bbc(0xe8,'!*y]')]=[];continue;}break;}}else $done({});}}}}var version_ = 'jsjiami.com.v7'; 48 | -------------------------------------------------------------------------------- /Olympic2024.js: -------------------------------------------------------------------------------- 1 | /* 2 | * ==UserScript== 3 | * @ScriptName 2024巴黎奥运会奖牌榜 4 | * @Author ddgksf2013 5 | * @TgChannel https://t.me/ddgksf2021 6 | * @WechatID 墨鱼手记 7 | * @UpdateTime 2024.07.27 8 | * @ScriptURL https://github.com/ddgksf2013/Scripts/raw/master/Olympic2024.js 9 | * ==/UserScript== 10 | 11 | 【QuantumultX】 : 12 | ************************* 13 | [task_local] 14 | 15 7,15 * * * https://github.com/ddgksf2013/Scripts/raw/master/Olympic2024.js, tag=巴黎奥运会奖牌榜, img-url=https://s2.loli.net/2024/07/27/vaK6ExBzHgsW98e.png 15 | ************************* 16 | 【Loon】 : 17 | ************************* 18 | [Script] 19 | cron "15 7,15 * * *" script-path=https://github.com/ddgksf2013/Scripts/raw/master/Olympic2024.js,tag=巴黎奥运会奖牌榜 20 | ************************* 21 | 【Surge】 : 22 | ************************* 23 | [Script] 24 | 巴黎奥运会奖牌榜 = type=cron,cronexp="15 7,15 * * *",wake-system=1,timeout=120,script-path=https://github.com/ddgksf2013/Scripts/raw/master/Olympic2024.js 25 | ************************* 26 | 【小火箭】 : 27 | ************************* 28 | [Script] 29 | 巴黎奥运会奖牌榜 = type=cron,script-path=https://github.com/ddgksf2013/Scripts/raw/master/Olympic2024.js, cronexpr="15 7,15 * * *", timeout=500, enable=true 30 | ************************* 31 | 32 | */ 33 | 34 | const version = 'V1.0.3'; 35 | 36 | const $=new Env("2024巴黎奥运会奖牌榜"); 37 | async function getinfo(){return new Promise(t=>{$.get({url:"https://app.sports.qq.com/m/oly/medalsRank?competitionID=180000&disciplineCode=ALL&from=h5",headers:{"User-Agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 15_0_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148"}},(s,a,e)=>{try{$.jsonBody=e}catch(n){$.logErr(n,a)}finally{t()}})})}async function showmsg(){let t=JSON.parse($.jsonBody);for(i=0,$.msr="名次 国家 金\uD83E\uDD47 银\uD83E\uDD48 铜\uD83E\uDD49 总数\n";i<5;i++){var s=i+1;$.msr=$.msr+" "+s+" "+t.data.list[i].nocName+" "+t.data.list[i].gold+" "+t.data.list[i].silver+" "+t.data.list[i].bronze+" "+t.data.list[i].total+"\n"}$.subt="\n",$.msg($.name,$.subt,$.msr,{"open-url":"https://t.me/ddgksf2021","media-url":"https://s2.loli.net/2024/07/27/vaK6ExBzHgsW98e.png"})}(async()=>{await getinfo(),await showmsg()})().catch(t=>$.logErr(t)).finally(()=>$.done()); 38 | // prettier-ignore 39 | function Env(t, e) { "undefined" != typeof process && JSON.stringify(process.env).indexOf("GITHUB") > -1 && process.exit(0); class s { constructor(t) { this.env = t } send(t, e = "GET") { t = "string" == typeof t ? { url: t } : t; let s = this.get; return "POST" === e && (s = this.post), new Promise((e, i) => { s.call(this, t, (t, s, r) => { t ? i(t) : e(s) }) }) } get(t) { return this.send.call(this.env, t) } post(t) { return this.send.call(this.env, t, "POST") } } return new class { constructor(t, e) { this.name = t, this.http = new s(this), this.data = null, this.dataFile = "box.dat", this.logs = [], this.isMute = !1, this.isNeedRewrite = !1, this.logSeparator = "\n", this.startTime = (new Date).getTime(), Object.assign(this, e)} isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } isSurge() { return "undefined" != typeof $httpClient && "undefined" == typeof $loon } isLoon() { return "undefined" != typeof $loon } toObj(t, e = null) { try { return JSON.parse(t) } catch { return e } } toStr(t, e = null) { try { return JSON.stringify(t) } catch { return e } } getjson(t, e) { let s = e; const i = this.getdata(t); if (i) try { s = JSON.parse(this.getdata(t)) } catch { } return s } setjson(t, e) { try { return this.setdata(JSON.stringify(t), e) } catch { return !1 } } getScript(t) { return new Promise(e => { this.get({ url: t }, (t, s, i) => e(i)) }) } runScript(t, e) { return new Promise(s => { let i = this.getdata("@chavy_boxjs_userCfgs.httpapi"); i = i ? i.replace(/\n/g, "").trim() : i; let r = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); r = r ? 1 * r : 20, r = e && e.timeout ? e.timeout : r; const [o, h] = i.split("@"), n = { url: `http://${h}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: r }, headers: { "X-Key": o, Accept: "*/*" } }; this.post(n, (t, e, i) => s(i)) }).catch(t => this.logErr(t)) } loaddata() { if (!this.isNode()) return {}; { this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e); if (!s && !i) return {}; { const i = s ? t : e; try { return JSON.parse(this.fs.readFileSync(i)) } catch (t) { return {} } } } } writedata() { if (this.isNode()) { this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e), r = JSON.stringify(this.data); s ? this.fs.writeFileSync(t, r) : i ? this.fs.writeFileSync(e, r) : this.fs.writeFileSync(t, r) } } lodash_get(t, e, s) { const i = e.replace(/\[(\d+)\]/g, ".$1").split("."); let r = t; for (const t of i) if (r = Object(r)[t], void 0 === r) return s; return r } lodash_set(t, e, s) { return Object(t) !== t ? t : (Array.isArray(e) || (e = e.toString().match(/[^.[\]]+/g) || []), e.slice(0, -1).reduce((t, s, i) => Object(t[s]) === t[s] ? t[s] : t[s] = Math.abs(e[i + 1]) >> 0 == +e[i + 1] ? [] : {}, t)[e[e.length - 1]] = s, t) } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { const [, s, i] = /^@(.*?)\.(.*?)$/.exec(t), r = s ? this.getval(s) : ""; if (r) try { const t = JSON.parse(r); e = t ? this.lodash_get(t, i, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { const [, i, r] = /^@(.*?)\.(.*?)$/.exec(e), o = this.getval(i), h = i ? "null" === o ? null : o || "{}" : "{}"; try { const e = JSON.parse(h); this.lodash_set(e, r, t), s = this.setval(JSON.stringify(e), i) } catch (e) { const o = {}; this.lodash_set(o, r, t), s = this.setval(JSON.stringify(o), i) } } else s = this.setval(t, e); return s } getval(t) { return this.isSurge() || this.isLoon() ? $persistentStore.read(t) : this.isQuanX() ? $prefs.valueForKey(t) : this.isNode() ? (this.data = this.loaddata(), this.data[t]) : this.data && this.data[t] || null } setval(t, e) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null } initGotEnv(t) { this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, e = (() => { })) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.get(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { try { if (t.headers["set-cookie"]) { const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar } } catch (t) { this.logErr(t) } }).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) })) } post(t, e = (() => { })) { if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.post(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) }); else if (this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: s, ...i } = t; this.got.post(s, i).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date; let i = { "M+": s.getMonth() + 1, "d+": s.getDate(), "H+": s.getHours(), "m+": s.getMinutes(), "s+": s.getSeconds(), "q+": Math.floor((s.getMonth() + 3) / 3), S: s.getMilliseconds() }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in i) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); return t } msg(e = t, s = "", i = "", r) { const o = t => { if (!t) return t; if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : this.isSurge() ? { url: t } : void 0; if ("object" == typeof t) { if (this.isLoon()) { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } if (this.isQuanX()) { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl; return { "open-url": e, "media-url": s } } if (this.isSurge()) { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } } }; if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { let t = [""]; t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) } } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, e) { const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); s ? this.log("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) } wait(t) { return new Promise(e => setTimeout(e, t)) } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } }(t, e) } 40 | -------------------------------------------------------------------------------- /bilibili_cc.js: -------------------------------------------------------------------------------- 1 | /*********************************** 2 | > 应用名称:哔哩哔哩 3 | > 软件版本:7.1.0 4 | > 下载地址:https://apps.apple.com/cn/app/id736536022 5 | > 脚本作者:Cuttlefish 6 | > 微信账号:墨鱼手记 7 | > 更新时间:2023-04-13 8 | > 通知频道:https://t.me/ddgksf2021 9 | > 投稿助手:https://t.me/ddgksf2013_bot 10 | > 问题反馈:📮 ddgksf2013@163.com 📮 11 | > 特别说明:本脚本仅供学习交流使用,禁止转载售卖 12 | ***********************************/ 13 | 14 | var cuttlefish ={"warning":"本腳本僅供學習交流使用,禁止轉載售賣","tgchannel":"https://t.me/ddgksf2021","feedback":"ddgksf2013@163.com"}; 15 | 16 | var ddgksf2013 = JSON.parse($response.body); 17 | 18 | for (var i=0; i 应用名称:墨鱼自用高德地图去广告脚本 3 | > 脚本作者:@ddgksf2013 4 | > 微信账号:墨鱼手记 5 | > 更新时间:2025-08-30 6 | > 通知频道:https://t.me/ddgksf2021 7 | > 贡献投稿:https://t.me/ddgksf2013_bot 8 | > 问题反馈:ddgksf2013@163.com 9 | > 特别提醒:如需转载请注明出处,谢谢合作! 10 | ***********************************************/ 11 | 12 | 13 | 14 | 15 | 16 | const version = 'V1.0.34'; 17 | 18 | var _0xodl='jsjiami.com.v7';const _0x3ffcae=_0x3649;function _0x3649(_0x24f110,_0x4e2daa){const _0x25d84c=_0x25d8();return _0x3649=function(_0x3649a9,_0x43e324){_0x3649a9=_0x3649a9-0xd2;let _0x412376=_0x25d84c[_0x3649a9];if(_0x3649['altIAT']===undefined){var _0x13d1cc=function(_0x260f68){const _0x449dcb='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3f2c85='',_0xc36f35='';for(let _0x28b769=0x0,_0x21056,_0x5ad763,_0xe95a68=0x0;_0x5ad763=_0x260f68['charAt'](_0xe95a68++);~_0x5ad763&&(_0x21056=_0x28b769%0x4?_0x21056*0x40+_0x5ad763:_0x5ad763,_0x28b769++%0x4)?_0x3f2c85+=String['fromCharCode'](0xff&_0x21056>>(-0x2*_0x28b769&0x6)):0x0){_0x5ad763=_0x449dcb['indexOf'](_0x5ad763);}for(let _0x3fa364=0x0,_0x3f71c0=_0x3f2c85['length'];_0x3fa364<_0x3f71c0;_0x3fa364++){_0xc36f35+='%'+('00'+_0x3f2c85['charCodeAt'](_0x3fa364)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xc36f35);};const _0x436f95=function(_0x465111,_0x2ff3ab){let _0x350982=[],_0x36de8d=0x0,_0xb8426a,_0x2726fa='';_0x465111=_0x13d1cc(_0x465111);let _0x4f8c99;for(_0x4f8c99=0x0;_0x4f8c99<0x100;_0x4f8c99++){_0x350982[_0x4f8c99]=_0x4f8c99;}for(_0x4f8c99=0x0;_0x4f8c99<0x100;_0x4f8c99++){_0x36de8d=(_0x36de8d+_0x350982[_0x4f8c99]+_0x2ff3ab['charCodeAt'](_0x4f8c99%_0x2ff3ab['length']))%0x100,_0xb8426a=_0x350982[_0x4f8c99],_0x350982[_0x4f8c99]=_0x350982[_0x36de8d],_0x350982[_0x36de8d]=_0xb8426a;}_0x4f8c99=0x0,_0x36de8d=0x0;for(let _0x59d783=0x0;_0x59d783<_0x465111['length'];_0x59d783++){_0x4f8c99=(_0x4f8c99+0x1)%0x100,_0x36de8d=(_0x36de8d+_0x350982[_0x4f8c99])%0x100,_0xb8426a=_0x350982[_0x4f8c99],_0x350982[_0x4f8c99]=_0x350982[_0x36de8d],_0x350982[_0x36de8d]=_0xb8426a,_0x2726fa+=String['fromCharCode'](_0x465111['charCodeAt'](_0x59d783)^_0x350982[(_0x350982[_0x4f8c99]+_0x350982[_0x36de8d])%0x100]);}return _0x2726fa;};_0x3649['vTYimW']=_0x436f95,_0x24f110=arguments,_0x3649['altIAT']=!![];}const _0x369300=_0x25d84c[0x0],_0x2cbc8c=_0x3649a9+_0x369300,_0x50441f=_0x24f110[_0x2cbc8c];return!_0x50441f?(_0x3649['aKdpmD']===undefined&&(_0x3649['aKdpmD']=!![]),_0x412376=_0x3649['vTYimW'](_0x412376,_0x43e324),_0x24f110[_0x2cbc8c]=_0x412376):_0x412376=_0x50441f,_0x412376;},_0x3649(_0x24f110,_0x4e2daa);}function _0x25d8(){const _0x245827=(function(){return[_0xodl,'FCbQjsYjKiyaRBmKiNdB.Jcopmbb.unv7KNhIDGE==','FsXgWPHXWQHyeSo/W5rgESkZ','WQj1s8k4W5FcM8kDE8o9','WRHVxCk0W4hcS8ks','lmkyWRNdVW','WQy5W7pcP0hcNmoGB8ku','W407Cmkx','DX3cM1FdIftcJCk1wSoYymobWO0','WOWJEmkhxYBcQ8oq','rmk1W5S5','ECkTFqm5fay','khLIWRXUwb4','jSkermkZWOuCdmk0WQNcItucW4NcUSoT','iCozWPFcSSkFpg7cJhxcMfldHexdJa','ACkLEsymgrD4','WQ/dG8kWW7VcNJpcMSoWe8kRadpdKmkOWR9SaSoSWRDVW7ZdJmo0mIGLm8koq2DXaW','taxdUcu','eSk6B1m','WP/dRsi','mxH2WQXM','WR3dG8kOW68','W77cJ0FcRmkws8klumo+WOa','W5dcI0ff','WO3dICkfmYBcIvhdTuZdUK0','W53cUWNdGI8','WReSW7xcRW','xG5UvG','b8kjESkIWOmb','WOBdJmoNtxhcLeddOW','WOFdK0G','WORdOdlcImkn','WPxcK8oWl8oTWQVdLe0','WPFdMmoYW7urWRxdOs9g','WPfaW4a9W4jvyCk0WOPKp8kqjq','W5/cMCocACk7W6tdLmkI','W5bpbSoIWRNdNK/dNSkYCM8Qua','W7FcJ0pcJW','qColnNTRWOC7W4hdP8kUW7fgqcWes8oLWRq','FSkQWRG'].concat((function(){return['W5VcHmogDG','WR0IW6ZcQ3dcMCo8ESkeCxKVBmoeWQlcLCo8FemBW6ddG2m+W7XzWPfMW4i','WRFdKrhcImkHjdrBW4q','iKRdMqq','fCoszmkR','W4KBWPv5WPCeiG','du/cISkufmoWWOa','W7tcJmoe','jbFdONFdUq','W7ldUbCwkCoDBa','vSoldmoSa8oDWPO','WOBdMCoIW74tWRC','WRldHa/cLmkQma','cSoUrqyjWO7cKG','WOJdQJ3cLWtdM8kgW6ZdNmkDCgq8txvqW78','wHNdUZ96WR3dGSkeW5WsW57dHCoCW6G3W6Kl','WRCIW6xcTW','WPtdRIuAd8oVW6ncAW','WPjcW4y/W49vyCksWQTKjCkEdq','fmoLt8kpW5WKW4a','E8kTWRGAWQ4','emoVtay','bCkbySk3','W7rLWQzNWRSNtmoy','W6SXr2bWoW','x13cVSkeW7KsnJu','WRySW7pcQMpcKSo6Fq','As1TWOj3WRjC','W5bbgCoRWPRdK1xdNG','g8kOFee','WODJxCov','W4pcHCon','vmoudCoRdSomWObGW6pdLHxdI3BdRSkd','WQj1wmkJW43cO8kaDmoPW64','hSkkWRC','k17cOY/cTwJdUfjtcgi','Ca/dOuNdQ3xdP21jkgK','bCkbySk3WRikeCk8','cSksxSkRwCkaW5PNW6tdHJddPNO','xCopiwbKWPq7W4JdSa'].concat((function(){return['WQNdL8kWW6ldIa','v8owiCoLW5jhuCkuWOxcTr4vW5O','f8oCySkpW5NdN3O','W7pcOGVdRa','WP7dQYBcUay','Br7dPh/dRx3dUNXF','mSoQW6XgWQrfew7dKSkgW4RdM1G','WO7cV8oqv8kfW4NdNa','Db/cN1pcHYFdRSkQrmoN','WP1UxSk4W5FcV8kvB8oG','wmowdCo4g8orWP9Q','WORdJmkfmYxcRupdJ3VdUua','ACkLEsy','vq3dUbr9WQldVCkEW7aw','WOhdGJ/cJJeaW4/cNSobACkvfriH','cCkqwSkVfSoZWRL4W7RdKW','WPXUnCohpCkbW7BcPcD9tehdUa','kqldPhZdRSoF','W6eWvNvNgSoe','W5BcLSouB2VcKe4','W7hcJmohW58RWQinaCkpqaPBWQ9IiHtdTdi','W7BcJCkhW4OQWQCnqSkcaqHmWRGQpX7dOIhdRCoAtgOoWO3cMq','W5mhW558WOKopmkWWPzFbCkKuNO2pCoJWR5lWQZcTMVdKCkhW7S','oCk4pJTQhfzHWQa','W4ytChm','W6hcJ3JcU8kB','CmkoW47dPSodDWNcHv/cJv3dR1u','aCkOnf9/r8odW75UW6/dJ8o+W7m1','W5dcLSoaDSoHW6hdNmkWBSkAW7NcJSkGWP4CnColWOVdMXf9W7bLe8koWOhcTCk3hCo5','pqldPMFdRSoE','xa3dVdC','l0xdIqdcHIpdMa','eSkfD8kKWOuBtSk3WQNcHImJW5hcUSoSW6efWP8WCXfh','WPTbvW','WO1ssweXtSodW6W','W7BcKLxcJmkOac1RW4C','WQddHbFcGa','umomuW0gWRpcHW'];}()));}()));}());_0x25d8=function(){return _0x245827;};return _0x25d8();};(function(_0x44171d,_0x234d1b,_0x4183ed,_0x15b12a,_0x5ccecd,_0x3053d9,_0x2ca479){return _0x44171d=_0x44171d>>0x8,_0x3053d9='hs',_0x2ca479='hs',function(_0x2a258b,_0x26b781,_0x1f22b5,_0x58a939,_0x2541f4){const _0x54d3b9=_0x3649;_0x58a939='tfi',_0x3053d9=_0x58a939+_0x3053d9,_0x2541f4='up',_0x2ca479+=_0x2541f4,_0x3053d9=_0x1f22b5(_0x3053d9),_0x2ca479=_0x1f22b5(_0x2ca479),_0x1f22b5=0x0;const _0x4dbcf2=_0x2a258b();while(!![]&&--_0x15b12a+_0x26b781){try{_0x58a939=parseInt(_0x54d3b9(0xfe,'m!Rf'))/0x1*(-parseInt(_0x54d3b9(0x139,'w)kg'))/0x2)+parseInt(_0x54d3b9(0xe2,')[f%'))/0x3*(-parseInt(_0x54d3b9(0x12c,'tU9('))/0x4)+parseInt(_0x54d3b9(0x141,'SvWq'))/0x5+parseInt(_0x54d3b9(0xe0,'!ghO'))/0x6*(-parseInt(_0x54d3b9(0xf9,'m!Rf'))/0x7)+parseInt(_0x54d3b9(0x138,'XxYi'))/0x8*(-parseInt(_0x54d3b9(0x137,'!B[n'))/0x9)+parseInt(_0x54d3b9(0x132,'v(hz'))/0xa+parseInt(_0x54d3b9(0xe9,'w)kg'))/0xb;}catch(_0x1cc447){_0x58a939=_0x1f22b5;}finally{_0x2541f4=_0x4dbcf2[_0x3053d9]();if(_0x44171d<=_0x15b12a)_0x1f22b5?_0x5ccecd?_0x58a939=_0x2541f4:_0x5ccecd=_0x2541f4:_0x1f22b5=_0x2541f4;else{if(_0x1f22b5==_0x5ccecd['replace'](/[NFdDYRhuGnEyICbpBJKQ=]/g,'')){if(_0x58a939===_0x26b781){_0x4dbcf2['un'+_0x3053d9](_0x2541f4);break;}_0x4dbcf2[_0x2ca479](_0x2541f4);}}}}}(_0x4183ed,_0x234d1b,function(_0x521f84,_0x13b835,_0x229059,_0xc384c8,_0x2673a2,_0x2e49fe,_0x1f4b10){return _0x13b835='\x73\x70\x6c\x69\x74',_0x521f84=arguments[0x0],_0x521f84=_0x521f84[_0x13b835](''),_0x229059='\x72\x65\x76\x65\x72\x73\x65',_0x521f84=_0x521f84[_0x229059]('\x76'),_0xc384c8='\x6a\x6f\x69\x6e',(0x1b924c,_0x521f84[_0xc384c8](''));});}(0xcd00,0x92812,_0x25d8,0xcf),_0x25d8)&&(_0xodl=0xcf);var obj=JSON['parse']($response[_0x3ffcae(0x119,'B!tf')]);if($request[_0x3ffcae(0x128,'XxYi')][_0x3ffcae(0x143,'Hz$Z')](_0x3ffcae(0xf1,'*1G3'))!=-0x1){if(obj[_0x3ffcae(0x13d,'%fpi')]&&obj[_0x3ffcae(0xfc,'U3kZ')]['ad'])for(let item of obj['data']['ad']){item['set'][_0x3ffcae(0x124,'XOIq')]['display_time']=0x0,item[_0x3ffcae(0x13b,'RYWH')][0x0][_0x3ffcae(0x12a,'FIWd')]=0x8585fb80,item['creative'][0x0]['end_time']=0x8585fb80;}$done({'body':JSON[_0x3ffcae(0x11a,'sh2f')](obj)});}else{if($request[_0x3ffcae(0xde,'4LTn')][_0x3ffcae(0x144,'m!Rf')](_0x3ffcae(0xd9,'XxYi'))!=-0x1){const RLXMEJ=_0x3ffcae(0xd4,'%fpi')['split']('|');let GpoWUw=0x0;while(!![]){switch(RLXMEJ[GpoWUw++]){case'0':$done({'body':JSON[_0x3ffcae(0x130,'Ag1s')](obj)});continue;case'1':obj[_0x3ffcae(0xe8,'SvWq')]?.[_0x3ffcae(0xf7,'oBqe')]&&(obj[_0x3ffcae(0xdb,'DzFV')][_0x3ffcae(0x13e,'DzFV')]=[]);continue;case'2':obj['data']?.[_0x3ffcae(0x118,'DzFV')]&&(obj[_0x3ffcae(0x10d,'qb[O')][_0x3ffcae(0x117,'[[ZK')]=[]);continue;case'3':obj[_0x3ffcae(0x10c,'w)kg')]?.['pull3']?.['msgs']&&(obj[_0x3ffcae(0xe1,'!ghO')][_0x3ffcae(0x131,'*1G3')][_0x3ffcae(0x127,'HsCt')]=[]);continue;case'4':obj[_0x3ffcae(0x13d,'%fpi')]?.[_0x3ffcae(0x125,'m&TE')]&&(obj['data']['cardList']=Object[_0x3ffcae(0xda,'&d()')](obj['data'][_0x3ffcae(0xdf,'4LTn')])['filter'](_0xdf1370=>_0xdf1370['dataType']==_0x3ffcae(0x13a,'FIWd')||_0xdf1370[_0x3ffcae(0xf0,'%fpi')]=='FrequentLocation'));continue;}break;}}else{if($request[_0x3ffcae(0x128,'XxYi')][_0x3ffcae(0x116,')[f%')](_0x3ffcae(0x145,'RWNO'))!=-0x1)delete obj[_0x3ffcae(0xeb,'zKpb')][_0x3ffcae(0xec,'%fpi')],obj[_0x3ffcae(0xeb,'zKpb')]?.[_0x3ffcae(0x122,'VU$&')]&&(obj[_0x3ffcae(0x11f,'v(hz')]['cardList']=Object[_0x3ffcae(0x115,'!ghO')](obj['data'][_0x3ffcae(0x123,'B!tf')])[_0x3ffcae(0xfd,'v(hz')](_0x464480=>_0x464480[_0x3ffcae(0x101,'Y8gq')]=='MyOrderCard'||_0x464480[_0x3ffcae(0x12e,'v(hz')]==_0x3ffcae(0xee,'v(hz'))),$done({'body':JSON[_0x3ffcae(0xe7,'B!tf')](obj)});else{if($request['url'][_0x3ffcae(0xe5,'FIWd')](_0x3ffcae(0x12d,'tU9('))!=-0x1)obj[_0x3ffcae(0xe8,'SvWq')]?.[_0x3ffcae(0x13f,'Jnh%')]&&(obj[_0x3ffcae(0xf3,'bI#V')][_0x3ffcae(0xef,'OaJP')]=[]),$done({'body':JSON['stringify'](obj)});else{if($request[_0x3ffcae(0x108,'!B[n')]['indexOf'](_0x3ffcae(0xd3,'!qlq'))!=-0x1){const propertiesToDelete=[_0x3ffcae(0xd5,'[nt%'),_0x3ffcae(0x142,'&d()'),_0x3ffcae(0xf2,'DzFV'),_0x3ffcae(0xf5,'IN5%'),_0x3ffcae(0x114,'95yP'),_0x3ffcae(0x111,'&d()')];for(const prop of propertiesToDelete){obj[_0x3ffcae(0xf8,'^R9L')]?.[prop]&&(obj[_0x3ffcae(0x106,'oBqe')][prop]=[]);}$done({'body':JSON[_0x3ffcae(0x136,'tU9(')](obj)});}else{if($request['url'][_0x3ffcae(0xdc,'w)kg')](_0x3ffcae(0xd8,'bI#V'))!=-0x1)obj['msgs']&&(obj[_0x3ffcae(0x126,'bI#V')]=[]),obj['pull3']?.[_0x3ffcae(0x109,'XxYi')]&&(obj[_0x3ffcae(0x11d,'!B[n')][_0x3ffcae(0xe6,'QhL9')]=[]),$done({'body':JSON[_0x3ffcae(0x102,'95yP')](obj)});else{if($request[_0x3ffcae(0x110,'RWNO')]['indexOf']('ws/message/notice/list')!=-0x1)obj[_0x3ffcae(0xfb,'B!tf')]?.['noticeList']&&(obj[_0x3ffcae(0xf6,'*1G3')]['noticeList']=[]),$done({'body':JSON[_0x3ffcae(0x10b,'!ghO')](obj)});else{if($request[_0x3ffcae(0xf4,'[[ZK')][_0x3ffcae(0x11c,'NxmF')](_0x3ffcae(0xd2,'RWNO'))!=-0x1){const keywords=[_0x3ffcae(0xe3,'XOIq'),_0x3ffcae(0x10a,'B!tf'),'his_input_tip',_0x3ffcae(0x129,'RYWH'),'aiNative','ai_',_0x3ffcae(0x12b,'QhL9')];Object['keys'](obj[_0x3ffcae(0x134,'^cS!')]||{})[_0x3ffcae(0x133,'qb[O')](_0x1d1be3=>{const _0x2c2e43=_0x3ffcae,_0x397737={'NEQiB':function(_0x30799d,_0x4ed5e2){return _0x30799d(_0x4ed5e2);},'OBsNx':_0x2c2e43(0x135,'[[ZK'),'JxvOl':_0x2c2e43(0xd6,'oBqe')};keywords[_0x2c2e43(0x11e,')[f%')](_0x16ba9d=>_0x1d1be3[_0x2c2e43(0xea,'zosQ')](_0x16ba9d))&&(_0x397737['OBsNx']===_0x397737[_0x2c2e43(0xfa,'^cS!')]?_0x397737[_0x2c2e43(0x100,'!ghO')](_0x3fd726,{}):obj['data'][_0x1d1be3]={'status':0x1,'version':'','value':''});}),$done({'body':JSON[_0x3ffcae(0xe4,'FIWd')](obj)});}else{if($request[_0x3ffcae(0xff,']Mz3')][_0x3ffcae(0xed,'IN5%')](_0x3ffcae(0xdd,'v(hz'))!=-0x1){const propsToDelete=[_0x3ffcae(0x121,'Hz$Z'),'scene',_0x3ffcae(0x120,'(i*E'),_0x3ffcae(0x105,'m&TE'),_0x3ffcae(0x107,'Ag1s')];obj['data']&&(propsToDelete[_0x3ffcae(0x112,'VA(Z')](_0x5a952f=>{delete obj['data'][_0x5a952f];}),obj['data'][_0x3ffcae(0x10f,'Cwdp')]&&(obj[_0x3ffcae(0xdb,'DzFV')][_0x3ffcae(0x113,'RYWH')]=obj['data'][_0x3ffcae(0x10e,'!qlq')]['filter'](_0x47dffd=>!propsToDelete[_0x3ffcae(0x104,'XxYi')](_0x47dffd)))),$done({'body':JSON['stringify'](obj)});}else $done({});}}}}}}}}var version_ = 'jsjiami.com.v7'; 19 | -------------------------------------------------------------------------------- /block100.js: -------------------------------------------------------------------------------- 1 | /* 2 | * ==UserScript== 3 | * @ScriptName 拦截100 4 | * @Author Cuttlefish 5 | * @TgChannel https://t.me/ddgksf2021 6 | * @WechatID 墨鱼手记 7 | * @UpdateTime 2022-02-15 8 | * @ScriptFunction 自动领取3天会员 9 | * @Attention 低调使用 10 | * @ScriptURL https://github.com/ddgksf2013/Scripts/raw/main/block100.js 11 | * ==/UserScript== 12 | 【QuantumultX】 : 13 | ************************* 14 | [rewrite_local] 15 | https://tagit.hyhuo.com/cypt/block100/gain_vip url script-request-body https://github.com/ddgksf2013/Scripts/raw/main/block100.js 16 | [task_local] 17 | 15 7 * * * https://github.com/ddgksf2013/Scripts/raw/main/block100.js, tag=拦截100自动领取会员 18 | [mimt] 19 | hostname=tagit.hyhuo.com 20 | ************************* 21 | */ 22 | 23 | const $ = new Env("block100") 24 | $.signKey100 = 'ddgksf2013_usersignKeyblock100' 25 | var _0xod8='jsjiami.com.v6',_0xod8_=['_0xod8'],_0x2e11=[_0xod8,'\x75\x6e\x64\x65\x66\x69\x6e\x65\x64','\x75\x72\x6c','\x62\x6f\x64\x79','\x68\x65\x61\x64\x65\x72\x73','\x6c\x6f\x67','\x73\x74\x72\x69\x6e\x67\x69\x66\x79','\x73\x65\x74\x64\x61\x74\x61','\x73\x69\x67\x6e\x4b\x65\x79\x31\x30\x30','\x73\x75\x62\x74','\u62e6\u622a\x31\x30\x30\u83b7\u53d6\u4f1a\u8bdd\x3a\x20\u6210\u529f\x21','\u62e6\u622a\x31\x30\x30\u83b7\u53d6\u4f1a\u8bdd\x3a\x20\u5931\u8d25\x21','\x6d\x73\x67','\x6e\x61\x6d\x65','\x63\x61\x74\x63\x68','\x6c\x6f\x67\x45\x72\x72','\x66\x69\x6e\x61\x6c\x6c\x79','\x64\x6f\x6e\x65','\x70\x61\x72\x73\x65','\x67\x65\x74\x64\x61\x74\x61','\x68\x74\x74\x70\x73\x3a\x2f\x2f\x74\x61\x67\x69\x74\x2e\x68\x79\x68\x75\x6f\x2e\x63\x6f\x6d\x2f\x63\x79\x70\x74\x2f\x62\x6c\x6f\x63\x6b\x31\x30\x30\x2f\x67\x61\x69\x6e\x5f\x76\x69\x70','\x6b\x65\x65\x70\x2d\x61\x6c\x69\x76\x65','\x61\x70\x70\x6c\x69\x63\x61\x74\x69\x6f\x6e\x2f\x6a\x73\x6f\x6e','\x74\x61\x67\x69\x74\x2e\x68\x79\x68\x75\x6f\x2e\x63\x6f\x6d','\x55\x73\x65\x72\x2d\x41\x67\x65\x6e\x74','\x7a\x68\x2d\x54\x57\x2c\x7a\x68\x2d\x48\x61\x6e\x74\x3b\x71\x3d\x30\x2e\x39','\x2a\x2f\x2a','\x6c\x61\x6e\x67\x3d\x7a\x68','\x67\x7a\x69\x70\x2c\x20\x64\x65\x66\x6c\x61\x74\x65\x2c\x20\x62\x72','\x70\x6f\x73\x74','\x73\x69\x67\x6e\x42\x6f\x64\x79','\x73\x74\x61\x74\x75\x73\x43\x6f\x64\x65','\x32\x30\x30','\u81ea\u52a8\u6210\u529f\u9886\u53d6\x33\u5929\u62e6\u622a\x31\x30\x30\u4f1a\u5458\uff01','\u81ea\u52a8\u9886\u53d6\x33\u5929\u62e6\u622a\x31\x30\x30\u4f1a\u5458\u5931\u8d25\uff01','\x6d\x73\x72','\x51\x6a\x58\x73\x6a\x69\x70\x61\x42\x6d\x69\x2e\x43\x63\x78\x6b\x77\x52\x6f\x51\x49\x5a\x6d\x53\x71\x2e\x76\x36\x59\x47\x6b\x3d\x3d'];function _0x3756(_0x1cf139,_0x12f9ba){_0x1cf139=~~'0x'['concat'](_0x1cf139['slice'](0x0));var _0x4f69da=_0x2e11[_0x1cf139];return _0x4f69da;};(function(_0x39b27c,_0x2bdac8){var _0xb0f24e=0x0;for(_0x2bdac8=_0x39b27c['shift'](_0xb0f24e>>0x2);_0x2bdac8&&_0x2bdac8!==(_0x39b27c['pop'](_0xb0f24e>>0x3)+'')['replace'](/[QXpBCxkwRQIZSqYGk=]/g,'');_0xb0f24e++){_0xb0f24e=_0xb0f24e^0xd11e9;}}(_0x2e11,_0x3756));let isGetCookie=typeof $request!==_0x3756('0');if(isGetCookie){!(async()=>{const _0x1d5731={};_0x1d5731[_0x3756('1')]=$request[_0x3756('1')];_0x1d5731[_0x3756('2')]=$request[_0x3756('2')];_0x1d5731[_0x3756('3')]=$request[_0x3756('3')];console[_0x3756('4')](JSON[_0x3756('5')](_0x1d5731));if($[_0x3756('6')](JSON[_0x3756('5')](_0x1d5731),$[_0x3756('7')])){$[_0x3756('8')]=_0x3756('9');}else{$[_0x3756('8')]=_0x3756('a');}$[_0x3756('b')]($[_0x3756('c')],$[_0x3756('8')],'');})()[_0x3756('d')](_0x581779=>$[_0x3756('e')](_0x581779))[_0x3756('f')](()=>$[_0x3756('10')]());}else{!(async()=>{await signin();await showmsg();})()[_0x3756('d')](_0x56b399=>$[_0x3756('e')](_0x56b399))[_0x3756('f')](()=>$[_0x3756('10')]());}async function signin(){return new Promise(_0x47e637=>{signbody=JSON[_0x3756('11')]($[_0x3756('12')]($[_0x3756('7')]))[_0x3756('2')];signheaders=JSON[_0x3756('11')]($[_0x3756('12')]($[_0x3756('7')]))[_0x3756('3')];const _0x44ddf7={'\x75\x72\x6c':_0x3756('13'),'\x68\x65\x61\x64\x65\x72\x73':{'Connection':_0x3756('14'),'Content-Type':_0x3756('15'),'Host':_0x3756('16'),'User-Agent':signheaders[_0x3756('17')],'Accept-Language':_0x3756('18'),'Accept':_0x3756('19'),'Cookie':_0x3756('1a'),'Accept-Encoding':_0x3756('1b')},'\x62\x6f\x64\x79':signbody};$[_0x3756('1c')](_0x44ddf7,(_0x523d1a,_0x303111,_0x10a5f0)=>{try{console[_0x3756('4')](_0x10a5f0);$[_0x3756('1d')]=_0x10a5f0;signStatus=_0x303111[_0x3756('1e')];}catch(_0x190d37){$[_0x3756('e')](_0x190d37,_0x303111);}finally{_0x47e637();}});});}async function showmsg(){obj=$[_0x3756('1d')];if(signStatus==_0x3756('1f')){$[_0x3756('8')]=_0x3756('20');}else{$[_0x3756('8')]=_0x3756('21');}$[_0x3756('b')]($[_0x3756('c')],$[_0x3756('8')],$[_0x3756('22')]);};_0xod8='jsjiami.com.v6'; 26 | function Env(t,e){class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`\ud83d\udd14${this.name}, \u5f00\u59cb!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),a={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(a,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t){let e={"M+":(new Date).getMonth()+1,"d+":(new Date).getDate(),"H+":(new Date).getHours(),"m+":(new Date).getMinutes(),"s+":(new Date).getSeconds(),"q+":Math.floor(((new Date).getMonth()+3)/3),S:(new Date).getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,((new Date).getFullYear()+"").substr(4-RegExp.$1.length)));for(let s in e)new RegExp("("+s+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[s]:("00"+e[s]).substr((""+e[s]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r)));let h=["","==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="];h.push(e),s&&h.push(s),i&&h.push(i),console.log(h.join("\n")),this.logs=this.logs.concat(h)}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t.stack):this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} 27 | -------------------------------------------------------------------------------- /debao.js: -------------------------------------------------------------------------------- 1 | /* 2 | * ==UserScript== 3 | * @ScriptName 得宝 4 | * @Author Cuttlefish 5 | * @TgChannel https://t.me/ddgksf2021 6 | * @WechatID 墨鱼手记 7 | * @UpdateTime 20210521 8 | * @ScriptFunction 签到得积分 9 | * @Attention Cookie有效期约为7天 10 | * @ScriptURL https://github.com/ddgksf2013/Scripts/raw/master/debao.js 11 | * ==/UserScript== 12 | 【QuantumultX】 : 13 | ************************* 14 | [rewrite_local] 15 | https://h5.youzan.com/wscump/checkin/checkin.json\?.+ url script-request-header https://github.com/ddgksf2013/Scripts/raw/master/debao.js 16 | [task_local] 17 | 15 7,15 * * * https://github.com/ddgksf2013/Scripts/raw/master/debao.js, tag=得宝, img-url=https://github.com/ddgksf2013/Icon/raw/master/debao.png 18 | ************************* 19 | 【Loon】 : 20 | ************************* 21 | [Script] 22 | http-request https://h5.youzan.com/wscump/checkin/checkin.json\?.+ tag=得宝Cookie, script-path=https://github.com/ddgksf2013/Scripts/raw/master/debao.js 23 | cron "15 7,15 * * *" script-path=https://github.com/ddgksf2013/Scripts/raw/master/debao.js,tag=得宝 24 | ************************* 25 | 【Surge】 : 26 | ************************* 27 | [Script] 28 | 得宝 = type=cron,cronexp="15 7,15 * * *",wake-system=1,timeout=120,script-path=https://github.com/ddgksf2013/Scripts/raw/master/debao.js 29 | 得宝Cookie = type=http-request,pattern=https://h5.youzan.com/wscump/checkin/checkin.json\?.+,script-path=https://github.com/ddgksf2013/Scripts/raw/master/debao.js 30 | ************************* 31 | 【小火箭】 : 32 | ************************* 33 | [Script] 34 | 得宝 = type=cron,script-path=https://github.com/ddgksf2013/Scripts/raw/master/debao.js, cronexpr="15 7,15 * * *", timeout=500, enable=true 35 | 得宝Cookie = type=http-request,pattern=https://h5.youzan.com/wscump/checkin/checkin.json\?.+,script-path=https://github.com/ddgksf2013/Scripts/raw/master/debao.js 36 | ************************* 37 | [mitm] 38 | hostname = h5.youzan.com 39 | */ 40 | const $ = new Env("得宝") 41 | $.signKey = 'debao_userSignKey' 42 | 43 | let isGetCookie = typeof $request !== 'undefined' 44 | 45 | if (isGetCookie) { 46 | !(async () => { 47 | const session = {} 48 | session.url = $request.url; 49 | session.headers = $request.headers; 50 | console.log(JSON.stringify(session)); 51 | if ($.setdata(JSON.stringify(session), $.signKey)) { 52 | $.subt = `获取会话: 成功!` 53 | } else { 54 | $.subt = `获取会话: 失败!` 55 | } 56 | $.msg($.name, $.subt, '') 57 | })() 58 | .catch((e) => $.logErr(e)) 59 | .finally(() => $.done()) 60 | } else { 61 | !(async () => { 62 | await signin(); 63 | await showmsg(); 64 | 65 | })() 66 | .catch((e) => $.logErr(e)) 67 | .finally(() => $.done()) 68 | } 69 | 70 | async function signin() { 71 | return new Promise((resolve) => { 72 | //console.log(JSON.stringify($.getdata($.signKey))); 73 | signheaders = JSON.parse($.getdata($.signKey)).headers; 74 | //console.log(signheaders); 75 | url_t = JSON.parse($.getdata($.signKey)).url; 76 | const url = { 77 | url: url_t, 78 | headers: { 79 | 'Cookie': signheaders['Cookie'], 80 | 'Extra-Data': signheaders['Extra-Data'], 81 | 'Accept-Encoding': 'gzip, deflate, br', 82 | 'Connection': 'keep-alive', 83 | 'Content-Type': 'application/json', 84 | 'Referer': signheaders['Referer'], 85 | 'Host': 'h5.youzan.com', 86 | 'User-Agent': signheaders['User-Agent'], 87 | 'Accept-Language' : 'en-us', 88 | 'Accept' : '*/*', 89 | } 90 | } 91 | //console.log(JSON.stringify(url)); 92 | $.get(url,(err, resp, data)=> { 93 | try { 94 | console.log(data); 95 | $.signBody = data 96 | signStatus = resp.statusCode 97 | } catch (e) { 98 | $.logErr(e, resp) 99 | } finally { 100 | resolve() 101 | } 102 | }) 103 | }) 104 | } 105 | 106 | 107 | async function showmsg() { 108 | //console.log($.signBody); 109 | obj=$.signBody; 110 | if (obj.indexOf("160540409") !=-1) { 111 | //console.log(obj); 112 | const body = JSON.parse($.signBody); 113 | $.subt = body.msg+'!'; 114 | } 115 | else if (signStatus == '200'){ 116 | //console.log(obj); 117 | const body = JSON.parse($.signBody); 118 | $.subt = '签到成功'; 119 | $.msr= body.data.prizes[0].points+'🎉'; 120 | } 121 | else { 122 | $.subt = '签到失败'; 123 | } 124 | 125 | $.msg($.name, $.subt,$.msr); 126 | } 127 | 128 | 129 | 130 | // prettier-ignore 131 | function Env(t,e){class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`\ud83d\udd14${this.name}, \u5f00\u59cb!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),a={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(a,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t){let e={"M+":(new Date).getMonth()+1,"d+":(new Date).getDate(),"H+":(new Date).getHours(),"m+":(new Date).getMinutes(),"s+":(new Date).getSeconds(),"q+":Math.floor(((new Date).getMonth()+3)/3),S:(new Date).getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,((new Date).getFullYear()+"").substr(4-RegExp.$1.length)));for(let s in e)new RegExp("("+s+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[s]:("00"+e[s]).substr((""+e[s]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r)));let h=["","==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="];h.push(e),s&&h.push(s),i&&h.push(i),console.log(h.join("\n")),this.logs=this.logs.concat(h)}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t.stack):this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} 132 | -------------------------------------------------------------------------------- /tclx.js: -------------------------------------------------------------------------------- 1 | /* 2 | * ==UserScript== 3 | * @ScriptName TCLX 4 | * @Author Cuttlefish 5 | * @TgChannel https://t.me/ddgksf2021 6 | * @WechatID 墨鱼手记 7 | * @UpdateTime 20210628 8 | * @ScriptFunction 签到得火车票抵偿金 9 | * @Attention Cookie有效期约XX天(待测试) 10 | * @AppletPath 微信小程序搜索🔍同程旅行✈️点击主页下面的【火车票优惠】即可 11 | * @ScriptURL https://github.com/ddgksf2013/Scripts/raw/main/tclx.js 12 | * ==/UserScript== 13 | 【QuantumultX】 : 14 | ************************* 15 | [rewrite_local] 16 | https://openapi.17usoft.net/maskantactivityapi/memberCenterSign\?.+ url script-request-body https://github.com/ddgksf2013/Scripts/raw/master/tclx.js 17 | [task_local] 18 | 15 7,15 * * * https://github.com/ddgksf2013/Scripts/raw/master/tclx.js, tag=TCLX 19 | ************************* 20 | 【Loon】 : 21 | ************************* 22 | [Script] 23 | http-request https://openapi.17usoft.net/maskantactivityapi/memberCenterSign\?.+ tag=TCLXCookie, script-path=https://github.com/ddgksf2013/Scripts/raw/master/tclx.js 24 | cron "15 7,15 * * *" script-path=https://github.com/ddgksf2013/Scripts/raw/master/tclx.js,tag=TCLX 25 | ************************* 26 | 【Surge】 : 27 | ************************* 28 | [Script] 29 | TCLX = type=cron,cronexp="15 7,15 * * *",wake-system=1,timeout=120,script-path=https://github.com/ddgksf2013/Scripts/raw/master/tclx.js 30 | TCLXCookie = type=http-request,pattern=https://openapi.17usoft.net/maskantactivityapi/memberCenterSign\?.+,script-path=https://github.com/ddgksf2013/Scripts/raw/master/tclx.js 31 | ************************* 32 | 【小火箭】 : 33 | ************************* 34 | [Script] 35 | TCLX = type=cron,script-path=https://github.com/ddgksf2013/Scripts/raw/master/tclx.js, cronexpr="15 7,15 * * *", timeout=500, enable=true 36 | TCLXCookie = type=http-request,pattern=https://openapi.17usoft.net/maskantactivityapi/memberCenterSign\?.+,script-path=https://github.com/ddgksf2013/Scripts/raw/master/tclx.js 37 | ************************* 38 | [mitm] 39 | hostname = openapi.17usoft.net 40 | */ 41 | const $ = new Env("TCLX") 42 | $.signKeyTCLX = 'tclx_usersignKeyTCLX' 43 | 44 | let isGetCookie = typeof $request !== 'undefined' 45 | 46 | if (isGetCookie) { 47 | !(async () => { 48 | const session = {} 49 | session.url = $request.url; 50 | session.body = $request.body; 51 | session.headers = $request.headers; 52 | console.log(JSON.stringify(session)); 53 | if ($.setdata(JSON.stringify(session), $.signKeyTCLX)) { 54 | $.subt = `获取会话: 成功!` 55 | } else { 56 | $.subt = `获取会话: 失败!` 57 | } 58 | $.msg($.name, $.subt, '') 59 | })() 60 | .catch((e) => $.logErr(e)) 61 | .finally(() => $.done()) 62 | } else { 63 | !(async () => { 64 | await signin(); 65 | await showmsg(); 66 | 67 | })() 68 | .catch((e) => $.logErr(e)) 69 | .finally(() => $.done()) 70 | } 71 | 72 | async function signin() { 73 | return new Promise((resolve) => { 74 | const time = new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000; 75 | //console.log(JSON.stringify($.getdata($.signKeyTCLX))); 76 | signbody = JSON.parse($.getdata($.signKeyTCLX)).body; 77 | signheaders = JSON.parse($.getdata($.signKeyTCLX)).headers; 78 | //console.log(signheaders); 79 | url_t = JSON.parse($.getdata($.signKeyTCLX)).url; 80 | const url = { 81 | url: 'https://openapi.17usoft.net/maskantactivityapi/memberCenterSign?_='+time, 82 | headers: { 83 | 'Origin': 'https://wx.17u.cn', 84 | 'Accept-Encoding': 'gzip, deflate, br', 85 | 'Connection': 'keep-alive', 86 | 'Content-Type': 'application/json', 87 | 'Host': 'openapi.17usoft.net', 88 | 'User-Agent': signheaders['User-Agent'], 89 | 'Accept-Language' : 'en-us', 90 | 'Accept' : 'application/json', 91 | 'Referer' : 'https://wx.17u.cn/', 92 | }, 93 | body: signbody 94 | } 95 | //console.log(JSON.stringify(url)); 96 | $.post(url,(err, resp, data)=> { 97 | try { 98 | console.log(data); 99 | $.signBody = data 100 | signStatus = resp.statusCode 101 | } catch (e) { 102 | $.logErr(e, resp) 103 | } finally { 104 | resolve() 105 | } 106 | }) 107 | }) 108 | } 109 | 110 | 111 | async function showmsg() { 112 | //console.log($.signBody); 113 | obj=$.signBody; 114 | if (obj.indexOf("1520") !=-1) { 115 | //console.log(obj); 116 | const body = JSON.parse($.signBody); 117 | $.subt = '重复签到'; 118 | } 119 | else if (signStatus == '200'){ 120 | //console.log(obj); 121 | const body = JSON.parse($.signBody); 122 | $.subt = '签到成功'; 123 | //$.msr= body.data.prizes[0].points+'🎉'; 124 | } 125 | else { 126 | $.subt = '签到失败'; 127 | } 128 | 129 | $.msg($.name, $.subt,$.msr); 130 | } 131 | 132 | 133 | 134 | // prettier-ignore 135 | function Env(t,e){class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`\ud83d\udd14${this.name}, \u5f00\u59cb!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),a={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(a,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t){let e={"M+":(new Date).getMonth()+1,"d+":(new Date).getDate(),"H+":(new Date).getHours(),"m+":(new Date).getMinutes(),"s+":(new Date).getSeconds(),"q+":Math.floor(((new Date).getMonth()+3)/3),S:(new Date).getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,((new Date).getFullYear()+"").substr(4-RegExp.$1.length)));for(let s in e)new RegExp("("+s+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[s]:("00"+e[s]).substr((""+e[s]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r)));let h=["","==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="];h.push(e),s&&h.push(s),i&&h.push(i),console.log(h.join("\n")),this.logs=this.logs.concat(h)}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t.stack):this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} 136 | -------------------------------------------------------------------------------- /pushCode.js: -------------------------------------------------------------------------------- 1 | /* 2 | 京东互助码提交 3 | 更新时间:2020-12-20 4 | 脚本兼容: QuantumultX, Surge, Loon,小火箭 5 | Author: Cuttlefish 6 | 需要将本脚本下载至本地进行编辑 7 | 由于tg作者服务器资源有限,提交时经常会无响应,故手动执行,看日志内容 8 | 依次将自己的互助码替换下面的中文文字(4个汉字处,注意对应) 9 | =================================Quantumultx========================= 10 | [task_local] 11 | #互助码提交 12 | 15,20 10 1,10,20 * * pushCode.js, tag=互助码提交 13 | =================================Loon=================================== 14 | [Script] 15 | cron "15,20 10 1,10,20 * *" script-path=pushCode.js,tag=互助码提交 16 | ===================================Surge================================ 17 | 互助码提交 = type=cron,cronexp="15,20 10 1,10,20 * *",wake-system=1,timeout=120,script-path=pushCode.js 18 | ====================================小火箭============================= 19 | 互助码提交 = type=cron,script-path=pushCode.js, cronexpr="15,20 10 1,10,20 * *", timeout=500, enable=true 20 | */ 21 | const $ = new Env("互助码提交") 22 | $.ddfactory = '东东工厂' 23 | $.jxfactory = '京喜工厂' 24 | $.bean = '种豆得豆' 25 | $.farm = '京东农场' 26 | $.pet = '京东萌宠' 27 | $.zz = '京东赚赚' 28 | 29 | let isGetCookie = typeof $request !== 'undefined' 30 | 31 | if (!isGetCookie) { 32 | !(async () => { 33 | await execDdfactory(); 34 | await execJxfactory(); 35 | await execBean(); 36 | await execFarm(); 37 | await execPet(); 38 | await execZZ(); 39 | await showmsg(); 40 | 41 | })() 42 | .catch((e) => $.logErr(e)) 43 | .finally(() => $.done()) 44 | } 45 | 46 | function execDdfactory() { 47 | return new Promise((resolve) => { 48 | const url = { 49 | url: 'http://api.turinglabs.net/api/v1/jd/ddfactory/create/'+$.ddfactory, 50 | headers: {'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 12_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148'} 51 | } 52 | $.get(url,(err, resp, data)=> { 53 | try { 54 | $.ddfactoryBody = data 55 | //ddfactoryStatus = resp.statusCode 56 | } catch (e) { 57 | $.logErr(e, resp) 58 | } finally { 59 | resolve() 60 | } 61 | }) 62 | }) 63 | } 64 | function execJxfactory() { 65 | return new Promise((resolve) => { 66 | const url = { 67 | url: 'http://api.turinglabs.net/api/v1/jd/jxfactory/create/'+$.jxfactory, 68 | headers: {'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 12_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148'}, 69 | } 70 | $.get(url,(err, resp, data)=> { 71 | try { 72 | $.jxfactoryBody = data 73 | //jxfactoryStatus = resp.statusCode 74 | } catch (e) { 75 | $.logErr(e, resp) 76 | } finally { 77 | resolve() 78 | } 79 | }) 80 | }) 81 | } 82 | function execBean() { 83 | return new Promise((resolve) => { 84 | const url = { 85 | url: 'http://api.turinglabs.net/api/v1/jd/bean/create/'+$.bean, 86 | headers: {'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 12_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148'}, 87 | } 88 | $.get(url,(err, resp, data)=> { 89 | try { 90 | $.beanBody = data 91 | //beanStatus = resp.statusCode 92 | } catch (e) { 93 | $.logErr(e, resp) 94 | } finally { 95 | resolve() 96 | } 97 | }) 98 | }) 99 | } 100 | function execFarm() { 101 | return new Promise((resolve) => { 102 | const url = { 103 | url: 'http://api.turinglabs.net/api/v1/jd/farm/create/'+$.farm, 104 | headers: {'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 12_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148'}, 105 | } 106 | $.get(url,(err, resp, data)=> { 107 | try { 108 | $.farmBody = data 109 | //farmStatus = resp.statusCode 110 | } catch (e) { 111 | $.logErr(e, resp) 112 | } finally { 113 | resolve() 114 | } 115 | }) 116 | }) 117 | } 118 | function execPet() { 119 | return new Promise((resolve) => { 120 | const url = { 121 | url: 'http://api.turinglabs.net/api/v1/jd/pet/create/'+$.pet, 122 | headers: {'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 12_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148'}, 123 | } 124 | $.get(url,(err, resp, data)=> { 125 | try { 126 | $.petBody = data 127 | //petStatus = resp.statusCode 128 | } catch (e) { 129 | $.logErr(e, resp) 130 | } finally { 131 | resolve() 132 | } 133 | }) 134 | }) 135 | } 136 | function execZZ() { 137 | return new Promise((resolve) => { 138 | const url = { 139 | url: 'https://code.chiang.fun/api/v1/jd/jdzz/create/'+$.zz, 140 | headers: {'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 12_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148'}, 141 | } 142 | $.get(url,(err, resp, data)=> { 143 | try { 144 | $.zzBody = data 145 | //petStatus = resp.statusCode 146 | } catch (e) { 147 | $.logErr(e, resp) 148 | } finally { 149 | resolve() 150 | } 151 | }) 152 | }) 153 | } 154 | function showmsg() { 155 | return new Promise((resolve) => { 156 | console.log('东东工厂:'); 157 | console.log( $.ddfactoryBody); 158 | console.log('\r\n京喜工厂:'); 159 | console.log( $.jxfactoryBody); 160 | console.log('\r\n种豆得豆:'); 161 | console.log( $.beanBody); 162 | console.log('\r\n京东农场:'); 163 | console.log( $.farmBody); 164 | console.log('\r\n京东萌宠:'); 165 | console.log( $.petBody); 166 | console.log('\r\n京东赚赚:'); 167 | console.log( $.zzBody); 168 | //$.msg($.name, $.subt,'') 169 | resolve() 170 | }) 171 | } 172 | 173 | 174 | 175 | // prettier-ignore 176 | function Env(t,e){class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`\ud83d\udd14${this.name}, \u5f00\u59cb!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),a={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(a,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t){let e={"M+":(new Date).getMonth()+1,"d+":(new Date).getDate(),"H+":(new Date).getHours(),"m+":(new Date).getMinutes(),"s+":(new Date).getSeconds(),"q+":Math.floor(((new Date).getMonth()+3)/3),S:(new Date).getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,((new Date).getFullYear()+"").substr(4-RegExp.$1.length)));for(let s in e)new RegExp("("+s+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[s]:("00"+e[s]).substr((""+e[s]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r)));let h=["","==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="];h.push(e),s&&h.push(s),i&&h.push(i),console.log(h.join("\n")),this.logs=this.logs.concat(h)}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t.stack):this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} 177 | --------------------------------------------------------------------------------