├── 52pojie-DailyBonus └── 52pojie.js ├── BDTieBa-DailyBonus └── TieBa.js ├── Bahamut └── BahamutDailyBonus.js ├── Bilibili-DailyBonus ├── ExchangePoints.js └── Manga.js ├── JD-DailyBonus └── JD_DailyBonus.js ├── KuaiKan-DailyBonus └── KKMH.js ├── LICENSE ├── Loon ├── Loon_GetCookie.conf ├── Loon_GetTask.conf └── Loon_TF_Download.conf ├── NobyDa_BoxJs.json ├── QuantumultX ├── AdRule.list ├── AdRuleTest.list ├── File │ ├── 91.js │ ├── Wechat.js │ ├── Zymh.js │ ├── aimeiju.js │ ├── dapian.js │ ├── vsco.js │ ├── wnyd.js │ └── xjsp.js ├── Js.conf ├── Js_Remote_Cookie.conf ├── Rewrite_lhie1.conf └── TestFlightDownload.conf ├── README.md ├── Shortcuts └── PolicySwitch.js ├── Sub-store-parser └── DataQuery.js ├── Surge ├── AdRule.list ├── AdRuleTest.list ├── Apple.list ├── Download.list ├── JS │ ├── BaiduCloud.js │ ├── Bili_Auto_Regions.js │ ├── CamScanner.js │ ├── IPA_install.js │ ├── Kuwo.js │ ├── MIX.js │ ├── NiChi.js │ ├── PicsArt.js │ ├── Polarr.js │ ├── Super.js │ ├── VUE.js │ ├── Wps.js │ ├── jibjab.js │ ├── luqi.js │ └── vivavideo.js ├── Module │ ├── GetCookie.sgmodule │ ├── HuiJuDongManAds.sgmodule │ ├── IPA_install.sgmodule │ ├── RewriteRules.sgmodule │ └── TestFlightDownload.sgmodule └── WeChat.list ├── Time-based-One-Time-Password ├── README.md └── TOTP.min.js └── iQIYI-DailyBonus └── iQIYI.js /52pojie-DailyBonus/52pojie.js: -------------------------------------------------------------------------------- 1 | /* 2 | 吾爱破解签到脚本 3 | 4 | 更新时间: 2021.09.22 5 | 脚本兼容: QuantumultX, Surge, Loon, Node.js 6 | 电报频道: @NobyDa 7 | 问题反馈: @NobyDa_bot 8 | 9 | ************************ 10 | QX, Surge, Loon说明: 11 | ************************ 12 | 手动登录 https://www.52pojie.cn/home.php 如通知成功获取cookie, 则可以使用此签到脚本. 13 | 获取Cookie后, 请将Cookie脚本禁用并移除主机名, 以免产生不必要的MITM. 14 | 脚本将在每天上午9点执行, 您可以修改执行时间. 15 | 16 | ************************ 17 | Node.js说明: 18 | ************************ 19 | 需自行安装"got"与"tough-cookie"模块. 例: npm install got tough-cookie -g 20 | 21 | 抓取Cookie说明: 22 | 浏览器打开 https://www.52pojie.cn/home.php 登录账号后, 开启抓包软件并刷新页面. 23 | 抓取该URL请求头下的Cookie字段, 填入以下CookieWA的单引号内即可. */ 24 | 25 | const CookieWA = ''; 26 | 27 | //Bark APP 通知推送Key 28 | const barkKey = ''; 29 | 30 | /*********************** 31 | Surge 4.2.0+ 脚本配置: 32 | ************************ 33 | 34 | [Script] 35 | 吾爱签到 = type=cron,cronexp=0 9 * * *,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/52pojie-DailyBonus/52pojie.js 36 | 37 | 吾爱获取Cookie = type=http-request,pattern=https:\/\/www\.52pojie\.cn\/home\.php\?,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/52pojie-DailyBonus/52pojie.js 38 | 39 | [MITM] 40 | hostname= www.52pojie.cn 41 | 42 | ************************ 43 | QuantumultX 远程脚本配置: 44 | ************************ 45 | 46 | [task_local] 47 | # 吾爱签到 48 | 0 9 * * * https://raw.githubusercontent.com/NobyDa/Script/master/52pojie-DailyBonus/52pojie.js 49 | 50 | [rewrite_local] 51 | # 获取Cookie 52 | https:\/\/www\.52pojie\.cn\/home\.php\? url script-request-header https://raw.githubusercontent.com/NobyDa/Script/master/52pojie-DailyBonus/52pojie.js 53 | 54 | [mitm] 55 | hostname= www.52pojie.cn 56 | 57 | ************************ 58 | Loon 2.1.0+ 脚本配置: 59 | ************************ 60 | 61 | [Script] 62 | # 吾爱签到 63 | cron "0 9 * * *" script-path=https://raw.githubusercontent.com/NobyDa/Script/master/52pojie-DailyBonus/52pojie.js 64 | 65 | # 获取Cookie 66 | http-request https:\/\/www\.52pojie\.cn\/home\.php\? script-path=https://raw.githubusercontent.com/NobyDa/Script/master/52pojie-DailyBonus/52pojie.js 67 | 68 | [Mitm] 69 | hostname= www.52pojie.cn 70 | */ 71 | 72 | var $ = new Env('吾爱破解'); 73 | var date = new Date() 74 | if (typeof $request != "undefined") { 75 | GetCookie() 76 | } else { 77 | checkin() 78 | } 79 | 80 | function checkin() { 81 | $.get({ 82 | url: 'https://www.52pojie.cn/home.php?mod=task&do=apply&id=2&mobile=no', 83 | headers: { 84 | Cookie: CookieWA || $.getdata("CookieWA"), 85 | } 86 | }, async function(error, response, data) { 87 | if (error && !data) { 88 | $.msgBody = `签到请求失败 ‼️‼️\n${error}` 89 | } else { 90 | if (data.match(/(ÒÑÍê³É|\u606d\u559c\u60a8|��̳΢�š��ᰮ�ƽ�)/)) { 91 | $.msgBody = date.getMonth() + 1 + "月" + date.getDate() + "日, 签到成功 🎉" 92 | } else if (data.match(/(ÄúÒÑ|\u4e0b\u671f\u518d\u6765|>��Ǹ������)/)) { 93 | $.msgBody = date.getMonth() + 1 + "月" + date.getDate() + "日, 已签过 ⚠️" 94 | } else if (data.match(/(ÏȵǼ|\u9700\u8981\u5148\u767b\u5f55|�Ҫ�ȵ�¼���ܼ�)/)) { 95 | $.msgBody = "签到失败, Cookie失效 ‼️‼️" 96 | } else if (response.statusCode == 403) { 97 | $.msgBody = "服务器暂停签到 ⚠️" 98 | } else { 99 | $.msgBody = "脚本待更新 ‼️‼️" 100 | } 101 | } 102 | if (barkKey) { 103 | await BarkNotify($, barkKey, $.name, $.msgBody); 104 | } 105 | $.msg($.name, ``, $.msgBody); 106 | $.done(); 107 | }) 108 | } 109 | 110 | function GetCookie() { 111 | try { 112 | if ($request.headers && $request.url.match(/www\.52pojie\.cn/)) { 113 | var CookieName = "吾爱破解"; 114 | var CookieKey = "CookieWA"; 115 | var CookieValue = $request.headers['Cookie']; 116 | if ($.getdata(CookieKey)) { 117 | if ($.getdata(CookieKey) != CookieValue) { 118 | var cookie = $.setdata(CookieValue, CookieKey); 119 | if (!cookie) { 120 | $.msg("", "", "更新" + CookieName + "Cookie失败 ‼️"); 121 | } else { 122 | $.msg("", "", "更新" + CookieName + "Cookie成功 🎉"); 123 | } 124 | } 125 | } else { 126 | var cookie = $.setdata(CookieValue, CookieKey); 127 | if (!cookie) { 128 | $.msg("", "", "首次写入" + CookieName + "Cookie失败 ‼️"); 129 | } else { 130 | $.msg("", "", "首次写入" + CookieName + "Cookie成功 🎉"); 131 | } 132 | } 133 | } else { 134 | $.msg("写入Cookie失败", "", "请检查匹配URL或配置内脚本类型 ‼️"); 135 | } 136 | } catch (eor) { 137 | $.msg("写入Cookie失败", "", "未知错误 ‼️") 138 | $.log(JSON.stringify(eor) + "\n" + eor + "\n" + JSON.stringify($request.headers)) 139 | } 140 | $.done(); 141 | } 142 | 143 | //Bark APP notify 144 | async function BarkNotify(c,k,t,b){for(let i=0;i<3;i++){console.log(`🔷Bark notify >> Start push (${i+1})`);const s=await new Promise((n)=>{c.post({url:'https://api.day.app/push',headers:{'Content-Type':'application/json'},body:JSON.stringify({title:t,body:b,device_key:k,ext_params:{group:t}})},(e,r,d)=>r&&r.status==200?n(1):n(d||e))});if(s===1){console.log('✅Push success!');break}else{console.log(`❌Push failed! >> ${s.message||s}`)}}}; 145 | 146 | //Compatible code from https://github.com/chavyleung/scripts/blob/master/Env.min.js 147 | 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("","")}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{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=["",""];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("",`${s} \u79d2`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} -------------------------------------------------------------------------------- /BDTieBa-DailyBonus/TieBa.js: -------------------------------------------------------------------------------- 1 | /* 2 | 百度贴吧签到脚本 3 | 4 | 脚本修改自: https://github.com/sazs34/TaskConfig 5 | 兼容: QuantumultX, Surge4, Loon 6 | 7 | 获取Cookie说明: 8 | 打开百度贴吧App后(AppStore中国区, 非内部版),点击"我的", 如通知成功获取cookie, 则可以使用此签到脚本. 9 | 获取Cookie后, 请将Cookie脚本禁用并移除主机名,以免产生不必要的MITM. 10 | 脚本将在每天上午9:00执行, 您可以修改执行时间。 11 | 12 | ************************ 13 | Surge 4.2.0+ 脚本配置: 14 | ************************ 15 | 16 | [Script] 17 | 贴吧签到 = type=cron,cronexp=0 9 * * *,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/BDTieBa-DailyBonus/TieBa.js 18 | 19 | 贴吧获取Cookie = type=http-request,pattern=https?:\/\/(c\.tieba\.baidu\.com|180\.97\.\d+\.\d+)\/c\/s\/login,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/BDTieBa-DailyBonus/TieBa.js 20 | 21 | [MITM] 22 | hostname= c.tieba.baidu.com 23 | 24 | ************************ 25 | QuantumultX 本地脚本配置: 26 | ************************ 27 | 28 | [task_local] 29 | # 贴吧签到 30 | 0 9 * * * TieBa.js 31 | 32 | [rewrite_local] 33 | # 获取Cookie 34 | https?:\/\/(c\.tieba\.baidu\.com|180\.97\.\d+\.\d+)\/c\/s\/login url script-request-header TieBa.js 35 | 36 | [mitm] 37 | hostname= c.tieba.baidu.com 38 | 39 | ************************ 40 | Loon 2.1.0+ 脚本配置: 41 | ************************ 42 | 43 | [Script] 44 | # 贴吧签到 45 | cron "0 9 * * *" script-path=https://raw.githubusercontent.com/NobyDa/Script/master/BDTieBa-DailyBonus/TieBa.js 46 | 47 | # 获取Cookie 48 | http-request https?:\/\/(c\.tieba\.baidu\.com|180\.97\.\d+\.\d+)\/c\/s\/login script-path=https://raw.githubusercontent.com/NobyDa/Script/master/BDTieBa-DailyBonus/TieBa.js 49 | 50 | [Mitm] 51 | hostname= c.tieba.baidu.com 52 | 53 | 54 | */ 55 | var $nobyda = nobyda(); 56 | var cookieVal = $nobyda.read("CookieTB"); 57 | var useParallel = 0; //0自动切换,1串行,2并行(当贴吧数量大于30个以后,并行可能会导致QX崩溃,所以您可以自动切换) 58 | var singleNotifyCount = 20; //想签到几个汇总到一个通知里,这里就填几个(比如我有13个要签到的,这里填了5,就会分三次消息通知过去) 59 | var process = { 60 | total: 0, 61 | result: [ 62 | // { 63 | // bar:'', 64 | // level:0, 65 | // exp:0, 66 | // errorCode:0, 67 | // errorMsg:'' 68 | // } 69 | ] 70 | }; 71 | var url_fetch_sign = { 72 | url: "https://tieba.baidu.com/mo/q/newmoindex", 73 | headers: { 74 | "Content-Type": "application/octet-stream", 75 | Referer: "https://tieba.baidu.com/index/tbwise/forum", 76 | Cookie: cookieVal, 77 | "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 12_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/16A366" 78 | } 79 | }; 80 | var url_fetch_add = { 81 | url: "https://tieba.baidu.com/sign/add", 82 | method: "POST", 83 | headers: { 84 | "Content-Type": "application/x-www-form-urlencoded", 85 | Cookie: cookieVal, 86 | "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 10_1_1 like Mac OS X; zh-CN) AppleWebKit/537.51.1 (KHTML, like Gecko) Mobile/14B100 UCBrowser/10.7.5.650 Mobile" 87 | }, 88 | body: "" 89 | }; 90 | if ($nobyda.isRequest) { 91 | GetCookie() 92 | } else { 93 | signTieBa() 94 | } 95 | 96 | 97 | function signTieBa() { 98 | useParallel = $nobyda.read("BDTB_DailyBonus_Mode") || useParallel 99 | singleNotifyCount = $nobyda.read("BDTB_DailyBonus_notify") || singleNotifyCount 100 | if (!cookieVal) { 101 | $nobyda.notify("贴吧签到", "签到失败", "未获取到cookie"); 102 | return $nobyda.done() 103 | } 104 | $nobyda.get(url_fetch_sign, function(error, response, data) { 105 | if (error) { 106 | $nobyda.notify("贴吧签到", "签到失败", "未获取到签到列表"); 107 | $nobyda.done() 108 | } else { 109 | // $nobyda.notify("贴吧签到", "贴吧列表", response.body); 110 | var body = JSON.parse(data); 111 | var isSuccessResponse = body && body.no == 0 && body.error == "success" && body.data.tbs; 112 | if (!isSuccessResponse) { 113 | $nobyda.notify("贴吧签到", "签到失败", (body && body.error) ? body.error : "接口数据获取失败"); 114 | return $nobyda.done() 115 | } 116 | process.total = body.data.like_forum.length; 117 | if (body.data.like_forum && body.data.like_forum.length > 0) { 118 | if (useParallel == 1 || (useParallel == 0 && body.data.like_forum.length >= 30)) { 119 | signBars(body.data.like_forum, body.data.tbs, 0); 120 | } else { 121 | for (const bar of body.data.like_forum) { 122 | signBar(bar, body.data.tbs); 123 | } 124 | } 125 | } else { 126 | $nobyda.notify("贴吧签到", "签到失败", "请确认您有关注的贴吧"); 127 | return $nobyda.done() 128 | } 129 | } 130 | }) 131 | } 132 | 133 | function signBar(bar, tbs) { 134 | if (bar.is_sign == 1) { //已签到的,直接不请求接口了 135 | process.result.push({ 136 | bar: `${bar.forum_name}`, 137 | level: bar.user_level, 138 | exp: bar.user_exp, 139 | errorCode: 9999, 140 | errorMsg: "已签到" 141 | }); 142 | checkIsAllProcessed(); 143 | } else { 144 | url_fetch_add.body = `tbs=${tbs}&kw=${bar.forum_name}&ie=utf-8`; 145 | $nobyda.post(url_fetch_add, function(error, response, data) { 146 | if (error) { 147 | process.result.push({ 148 | bar: bar.forum_name, 149 | errorCode: 999, 150 | errorMsg: '接口错误' 151 | }); 152 | checkIsAllProcessed(); 153 | } else { 154 | try { 155 | var addResult = JSON.parse(data); 156 | if (addResult.no == 0) { 157 | process.result.push({ 158 | bar: bar.forum_name, 159 | errorCode: 0, 160 | errorMsg: `获得${addResult.data.uinfo.cont_sign_num}积分,第${addResult.data.uinfo.user_sign_rank}个签到` 161 | }); 162 | } else { 163 | process.result.push({ 164 | bar: bar.forum_name, 165 | errorCode: addResult.no, 166 | errorMsg: addResult.error 167 | }); 168 | } 169 | } catch (e) { 170 | $nobyda.notify("贴吧签到", "贴吧签到数据处理异常", JSON.stringify(e)); 171 | $nobyda.done() 172 | } 173 | checkIsAllProcessed(); 174 | } 175 | }) 176 | } 177 | } 178 | 179 | function signBars(bars, tbs, index) { 180 | //$nobyda.notify("贴吧签到", `进度${index}/${bars.length}`, ""); 181 | if (index >= bars.length) { 182 | //$nobyda.notify("贴吧签到", "签到已满", `${process.result.length}`); 183 | checkIsAllProcessed(); 184 | } else { 185 | var bar = bars[index]; 186 | if (bar.is_sign == 1) { //已签到的,直接不请求接口了 187 | process.result.push({ 188 | bar: `${bar.forum_name}`, 189 | level: bar.user_level, 190 | exp: bar.user_exp, 191 | errorCode: 9999, 192 | errorMsg: "已签到" 193 | }); 194 | signBars(bars, tbs, ++index); 195 | } else { 196 | url_fetch_add.body = `tbs=${tbs}&kw=${bar.forum_name}&ie=utf-8`; 197 | $nobyda.post(url_fetch_add, function(error, response, data) { 198 | if (error) { 199 | process.result.push({ 200 | bar: bar.forum_name, 201 | errorCode: 999, 202 | errorMsg: '接口错误' 203 | }); 204 | signBars(bars, tbs, ++index); 205 | } else { 206 | try { 207 | var addResult = JSON.parse(data); 208 | if (addResult.no == 0) { 209 | process.result.push({ 210 | bar: bar.forum_name, 211 | errorCode: 0, 212 | errorMsg: `获得${addResult.data.uinfo.cont_sign_num}积分,第${addResult.data.uinfo.user_sign_rank}个签到` 213 | }); 214 | } else { 215 | process.result.push({ 216 | bar: bar.forum_name, 217 | errorCode: addResult.no, 218 | errorMsg: addResult.error 219 | }); 220 | } 221 | } catch (e) { 222 | $nobyda.notify("贴吧签到", "贴吧签到数据处理异常", JSON.stringify(e)); 223 | $nobyda.done() 224 | } 225 | signBars(bars, tbs, ++index) 226 | } 227 | }) 228 | } 229 | } 230 | } 231 | 232 | function checkIsAllProcessed() { 233 | //$nobyda.notify("贴吧签到", `最终进度${process.result.length}/${process.total}`, ""); 234 | if (process.result.length != process.total) return; 235 | for (var i = 0; i < Math.ceil(process.total / singleNotifyCount); i++) { 236 | var notify = ""; 237 | var spliceArr = process.result.splice(0, singleNotifyCount); 238 | var notifySuccessCount = 0; 239 | for (const res of spliceArr) { 240 | if (res.errorCode == 0 || res.errorCode == 9999) { 241 | notifySuccessCount++; 242 | } 243 | if (res.errorCode == 9999) { 244 | notify += `【${res.bar}】已经签到,当前等级${res.level},经验${res.exp} 245 | `; 246 | } else { 247 | notify += `【${res.bar}】${res.errorCode==0?'签到成功':'签到失败'},${res.errorCode==0?res.errorMsg:('原因:'+res.errorMsg)} 248 | `; 249 | } 250 | } 251 | $nobyda.notify("贴吧签到", `签到${spliceArr.length}个,成功${notifySuccessCount}个`, notify); 252 | $nobyda.done() 253 | } 254 | } 255 | 256 | function GetCookie() { 257 | var headerCookie = $request.headers["Cookie"]; 258 | if (headerCookie) { 259 | if ($nobyda.read("CookieTB") != undefined) { 260 | if ($nobyda.read("CookieTB") != headerCookie) { 261 | if (headerCookie.indexOf("BDUSS") != -1) { 262 | var cookie = $nobyda.write(headerCookie, "CookieTB"); 263 | if (!cookie) { 264 | $nobyda.notify("更新贴吧Cookie失败‼️", "", ""); 265 | } else { 266 | $nobyda.notify("更新贴吧Cookie成功 🎉", "", ""); 267 | } 268 | } 269 | } 270 | } else { 271 | if (headerCookie.indexOf("BDUSS") != -1) { 272 | var cookie = $nobyda.write(headerCookie, "CookieTB"); 273 | if (!cookie) { 274 | $nobyda.notify("首次写入贴吧Cookie失败‼️", "", ""); 275 | } else { 276 | $nobyda.notify("首次写入贴吧Cookie成功 🎉", "", ""); 277 | } 278 | } 279 | } 280 | } 281 | $nobyda.done() 282 | } 283 | 284 | function nobyda() { 285 | const isRequest = typeof $request != "undefined" 286 | const isSurge = typeof $httpClient != "undefined" 287 | const isQuanX = typeof $task != "undefined" 288 | const notify = (title, subtitle, message) => { 289 | if (isQuanX) $notify(title, subtitle, message) 290 | if (isSurge) $notification.post(title, subtitle, message) 291 | } 292 | const write = (value, key) => { 293 | if (isQuanX) return $prefs.setValueForKey(value, key) 294 | if (isSurge) return $persistentStore.write(value, key) 295 | } 296 | const read = (key) => { 297 | if (isQuanX) return $prefs.valueForKey(key) 298 | if (isSurge) return $persistentStore.read(key) 299 | } 300 | const adapterStatus = (response) => { 301 | if (response) { 302 | if (response.status) { 303 | response["statusCode"] = response.status 304 | } else if (response.statusCode) { 305 | response["status"] = response.statusCode 306 | } 307 | } 308 | return response 309 | } 310 | const get = (options, callback) => { 311 | if (isQuanX) { 312 | if (typeof options == "string") options = { 313 | url: options 314 | } 315 | options["method"] = "GET" 316 | $task.fetch(options).then(response => { 317 | callback(null, adapterStatus(response), response.body) 318 | }, reason => callback(reason.error, null, null)) 319 | } 320 | if (isSurge) $httpClient.get(options, (error, response, body) => { 321 | callback(error, adapterStatus(response), body) 322 | }) 323 | } 324 | const post = (options, callback) => { 325 | if (isQuanX) { 326 | if (typeof options == "string") options = { 327 | url: options 328 | } 329 | options["method"] = "POST" 330 | $task.fetch(options).then(response => { 331 | callback(null, adapterStatus(response), response.body) 332 | }, reason => callback(reason.error, null, null)) 333 | } 334 | if (isSurge) { 335 | $httpClient.post(options, (error, response, body) => { 336 | callback(error, adapterStatus(response), body) 337 | }) 338 | } 339 | } 340 | const done = (value = {}) => { 341 | if (isQuanX) return $done(value) 342 | if (isSurge) isRequest ? $done(value) : $done() 343 | } 344 | return { 345 | isRequest, 346 | notify, 347 | write, 348 | read, 349 | get, 350 | post, 351 | done 352 | } 353 | }; -------------------------------------------------------------------------------- /Bilibili-DailyBonus/ExchangePoints.js: -------------------------------------------------------------------------------- 1 | /* 2 | 哔哩哔哩漫画, 积分商城自动抢购脚本 3 | 4 | 脚本兼容: Surge, QuantumultX, Loon 5 | 6 | ************************* 7 | 【 抢购脚本注意事项 】: 8 | ************************* 9 | 10 | 该脚本需要使用签到脚本获取Cookie后方可使用. 11 | 默认兑换积分商城中的"积分兑换", 兑换数量为用户积分可兑换的最大值 (可于BoxJs内修改) 12 | 默认执行时间为中午12:00:10、12:00:20、12:00:30 13 | 14 | BoxJs订阅地址: https://raw.githubusercontent.com/NobyDa/Script/master/NobyDa_BoxJs.json 15 | 16 | ************************* 17 | 【 Surge & Loon 脚本配置 】: 18 | ************************* 19 | 20 | [Script] 21 | cron "10,20,30 0 12 * * *" script-path=https://raw.githubusercontent.com/NobyDa/Script/master/Bilibili-DailyBonus/ExchangePoints.js, wake-system=1, timeout=60 22 | 23 | ************************* 24 | 【 QX 1.0.10+ 脚本配置 】 : 25 | ************************* 26 | 27 | [task_local] 28 | 10,20,30 0 12 * * * https://raw.githubusercontent.com/NobyDa/Script/master/Bilibili-DailyBonus/ExchangePoints.js, tag=哔哩哔哩漫画抢券, enabled=true 29 | 30 | */ 31 | 32 | // 新建一个实例对象, 把兼容函数定义到$中, 以便统一调用 33 | let $ = new nobyda(); 34 | 35 | // 读取兑换商品名, 默认兑换积分商城中的"积分兑换"; 该接口为BoxJs预留, 以便修改 36 | let productName = $.read('BM_ProductName') || '积分兑换'; 37 | 38 | // 读取兑换数量, 默认兑换最大值; 该接口为BoxJs预留, 以便修改 39 | let productNum = $.read('BM_ProductNum'); 40 | 41 | // 读取循环抢购次数, 默认100次; 该接口为BoxJs预留, 以便修改 42 | let exchangeNum = $.read('BM_ExchangeNum') || '100'; 43 | 44 | // 读取哔哩哔哩漫画签到脚本所使用的Cookie 45 | let cookie = $.read('CookieBM'); 46 | 47 | // 预留的空对象, 便于函数之间读取数据 48 | let user = {}; 49 | 50 | (async function() { // 立即运行的匿名异步函数 51 | // 使用await关键字声明, 表示以同步方式执行异步函数, 可以简单理解为顺序执行 52 | await Promise.all([ //该方法用于将多个实例包装成一个新的实例, 可以简单理解为同时调用函数, 以进一步提高执行速度 53 | GetUserPoint(), //查询积分函数 54 | ListProduct() //查询商品函数 55 | ]); 56 | await ExchangeProduct(); //上面的查询都完成后, 则执行抢购 57 | $.done(); //抢购完成后调用Surge、QX内部特有的函数, 用于退出脚本执行 58 | })(); 59 | 60 | function GetUserPoint() { 61 | const pointUrl = { //查询积分接口 62 | url: 'https://manga.bilibili.com/twirp/pointshop.v1.Pointshop/GetUserPoint', 63 | headers: { //请求头 64 | 'Cookie': cookie //用户鉴权Cookie 65 | } 66 | } 67 | return new Promise((resolve) => { //主函数返回Promise实例对象, 以便后续调用时可以实现顺序执行异步函数 68 | $.post(pointUrl, (error, resp, data) => { //使用post请求查询, 再使用回调函数处理返回的结果 69 | try { //使用try方法捕获可能出现的代码异常 70 | if (error) { 71 | throw new Error(error); //如果请求失败, 例如无法联网, 则抛出一个异常 72 | } else { 73 | const body = JSON.parse(data); //解析响应体json并转化为对象 74 | if (body.code == 0 && body.data) { //如果响应体为预期格式 75 | user.point = parseInt(body.data.point); //把查询的积分赋值到全局变量user中 76 | console.log(`\n当前积分: ${body.data.point}`); //打印日志 77 | } else { //否则抛出一个异常 78 | throw new Error(body.msg || data); 79 | } 80 | } 81 | } catch (e) { //接住try代码块中抛出的异常, 并打印日志 82 | console.log(`\n查询积分: 失败\n出现错误: ${e.message}`); 83 | } finally { //finally语句在try和catch之后无论有无异常都会执行 84 | resolve(); //异步操作成功时调用, 将Promise对象的状态标记为"成功", 表示已完成查询积分 85 | } 86 | }) 87 | }) 88 | } 89 | 90 | function ListProduct() { 91 | const listUrl = { //查询商品接口 92 | url: 'https://manga.bilibili.com/twirp/pointshop.v1.Pointshop/ListProduct', 93 | headers: {} 94 | } 95 | return new Promise((resolve) => { //主函数返回Promise实例对象, 以便后续调用时可以实现顺序执行异步函数 96 | $.post(listUrl, (error, resp, data) => { //使用post请求查询, 再使用回调函数处理返回的结果 97 | try { //使用try方法捕获可能出现的代码异常 98 | if (error) { 99 | throw new Error(error); //如果请求失败, 例如无法联网, 则抛出一个异常 100 | } else { 101 | const body = JSON.parse(data); //解析响应体json并转化为对象 102 | if (body.code == 0 && body.data.length >= 1) { //如果接口正常返回商品信息 103 | // 按全局变量所填写的商品名进行过滤, 并把商品信息赋值到全局变量user中 104 | user.list = body.data.filter(t => t.title == productName).pop(); 105 | if (!user.list) { 106 | throw new Error('请检查商品名'); //如果填错商品名则抛出一个异常 107 | } else { //否则打印日志 108 | console.log(`\n查询商品: ${productName}\n商品库存: ${user.list.remain_amount}`) 109 | } 110 | } else { //否则抛出一个异常 111 | throw new Error('无商品列表'); 112 | } 113 | } 114 | } catch (e) { //接住try代码块中抛出的异常并打印日志 115 | console.log(`\n查询商品: ${productName}\n出现错误: ${e.message}`); 116 | } finally { //finally语句在try和catch之后无论有无异常都会执行 117 | resolve(); //异步操作成功时调用, 将Promise对象的状态标记为"成功", 表示已完成查询商品 118 | } 119 | }) 120 | }) 121 | } 122 | 123 | function ExchangeProduct() { 124 | return new Promise(async (resolve) => { //主函数返回Promise实例对象, 以便后续调用时可以实现顺序执行异步函数, 该实例函数带有async关键字, 表示里面有异步操作, 例如可使用await得到异步结果 125 | if (user.list && user.list.remain_amount && user.point >= 100) { //如果商品有库存并且用户积分大于100则进行抢购 126 | //兑换商品数量(用户积分 除与 商品单价得到兑换数量), 并转成整数; 默认兑换最大数量 127 | const num = parseInt(productNum || (user.point / user.list.real_cost)); 128 | const exchangeUrl = { 129 | url: 'https://manga.bilibili.com/twirp/pointshop.v1.Pointshop/Exchange', //兑换商品接口 130 | headers: { //请求头 131 | 'Content-Type': 'application/json', //声明请求体数据格式 132 | 'Cookie': cookie //用户鉴权Cookie 133 | }, 134 | body: JSON.stringify({ //请求体转成字符串类型 135 | product_id: user.list.id, //兑换的商品id 136 | product_num: num, //兑换的商品数量 137 | point: num * user.list.real_cost //消耗的积分总数 (兑换数量乘单价得到积分总数) 138 | }) 139 | }; 140 | for (let i = 0; i < parseInt(exchangeNum); i++) { //根据全局变量定义的次数, 暴力循环抢购 141 | // 循环内调用另一个抢购函数, 并传入请求、第几次循环、兑换数量等参数, 142 | // 使用await关键字声明, 表示需要等待每一次的执行结果 143 | const run = await startExchange(exchangeUrl, i, num); 144 | if (run) { 145 | break; //如果函数返回布尔值true, 则跳出循环, 脚本结束 146 | } 147 | } 148 | } else { //商品无库存或用户积分小于100等情况, 则不执行抢购, 脚本结束 149 | console.log(`\n抢购终止: 不具备兑换条件`); //打印日志 150 | } 151 | resolve(); //将主函数的Promise对象状态标记为"成功", 表示已完成抢购任务 152 | }) 153 | } 154 | 155 | function startExchange(url, item, amount) { 156 | return new Promise((resolve) => { //主函数返回Promise实例对象, 以便后续调用时可以实现顺序执行异步函数 157 | $.post(url, (error, resp, data) => { //使用post请求查询, 再使用回调函数处理返回的结果 158 | try { //使用try方法捕获可能出现的代码异常 159 | if (error) { 160 | throw new Error(error); //如果请求失败, 例如无法联网, 则抛出一个异常 161 | } else { 162 | const body = JSON.parse(data); //解析响应体json并转化为对象 163 | if (body.code == 0) { //如果抢购成功, 则输出日志和通知 164 | console.log(`\n抢购成功: 第${item+1}次\n抢购数量: ${amount}\n消耗积分: ${amount * user.list.real_cost}`); 165 | $.notify('哔哩哔哩漫画抢券', '', `"${productName}"抢购成功, 数量: ${amount}, 消耗积分: ${amount * user.list.real_cost}`); 166 | resolve(true); //将Promise对象的状态标记为"成功", 然后返回一个布尔值true用于跳出循环 167 | } else { 168 | throw new Error(body.msg || '未知'); //抢购失败则抛出异常 169 | } 170 | } 171 | } catch (e) { //接住try代码块中抛出的异常并打印日志 172 | console.log(`\n抢购失败: 第${item+1}次\n失败原因: ${e.message}`); 173 | resolve(); //将Promise对象的状态标记为"成功", 但不返回任何值, 表示继续循环抢购 174 | } 175 | }) 176 | }) 177 | } 178 | 179 | function nobyda() { 180 | const isSurge = typeof $httpClient != "undefined"; 181 | const isQuanX = typeof $task != "undefined"; 182 | const isNode = typeof require == "function"; 183 | const node = (() => { 184 | if (isNode) { 185 | const request = require('request'); 186 | return { 187 | request 188 | } 189 | } else { 190 | return null; 191 | } 192 | })() 193 | const adapterStatus = (response) => { 194 | if (response) { 195 | if (response.status) { 196 | response["statusCode"] = response.status 197 | } else if (response.statusCode) { 198 | response["status"] = response.statusCode 199 | } 200 | } 201 | return response 202 | } 203 | this.read = (key) => { 204 | if (isQuanX) return $prefs.valueForKey(key) 205 | if (isSurge) return $persistentStore.read(key) 206 | } 207 | this.notify = (title, subtitle, message) => { 208 | if (isQuanX) $notify(title, subtitle, message) 209 | if (isSurge) $notification.post(title, subtitle, message) 210 | if (isNode) console.log(`${title}\n${subtitle}\n${message}`) 211 | } 212 | this.post = (options, callback) => { 213 | options.headers['User-Agent'] = 'User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/609.3.5.0.2 (KHTML, like Gecko) Mobile/17G80 BiliApp/822 mobi_app/ios_comic channel/AppStore BiliComic/822' 214 | if (isQuanX) { 215 | if (typeof options == "string") options = { 216 | url: options 217 | } 218 | options["method"] = "POST" 219 | $task.fetch(options).then(response => { 220 | callback(null, adapterStatus(response), response.body) 221 | }, reason => callback(reason.error, null, null)) 222 | } 223 | if (isSurge) { 224 | options.headers['X-Surge-Skip-Scripting'] = false 225 | $httpClient.post(options, (error, response, body) => { 226 | callback(error, adapterStatus(response), body) 227 | }) 228 | } 229 | if (isNode) { 230 | node.request.post(options, (error, response, body) => { 231 | callback(error, adapterStatus(response), body) 232 | }) 233 | } 234 | } 235 | this.done = () => { 236 | if (isQuanX || isSurge) { 237 | $done() 238 | } 239 | } 240 | }; -------------------------------------------------------------------------------- /Bilibili-DailyBonus/Manga.js: -------------------------------------------------------------------------------- 1 | /* 2 | 哔哩哔哩漫画签到 3 | 4 | 脚本兼容: QuantumultX, Surge, Loon 5 | 电报频道:@NobyDa 6 | 问题反馈:@NobyDa_bot 7 | 如果转载,请注明出处 8 | 9 | 说明: 10 | 打开哔哩哔哩漫画后 (AppStore中国区),单击"我的", 如果通知获取cookie成功, 则可以使用此脚本. 11 | 12 | 脚本将在每天上午9点执行。 您可以修改执行时间。 13 | 14 | ~~~~~~~~~~~~~~~~ 15 | Surge 4.2.0+ : 16 | 17 | [Script] 18 | Bili漫画签到 = type=cron,cronexp=0 9 * * *,wake-system=1,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/Bilibili-DailyBonus/Manga.js 19 | 20 | Bili漫画Cookie = type=http-request,pattern=^https:\/\/app\.bilibili\.com\/x\/v2\/account\/myinfo,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/Bilibili-DailyBonus/Manga.js 21 | 22 | [MITM] 23 | hostname = app.bilibili.com 24 | ~~~~~~~~~~~~~~~~ 25 | QX 1.0.10+ : 26 | 27 | [task_local] 28 | 0 9 * * * https://raw.githubusercontent.com/NobyDa/Script/master/Bilibili-DailyBonus/Manga.js, tag=Bili漫画签到 29 | 30 | [rewrite_local] 31 | #获取Bili漫画Cookie 32 | ^https:\/\/app\.bilibili\.com\/x\/v2\/account\/myinfo url script-request-header https://raw.githubusercontent.com/NobyDa/Script/master/Bilibili-DailyBonus/Manga.js 33 | 34 | [mitm] 35 | hostname = app.bilibili.com 36 | ~~~~~~~~~~~~~~~~ 37 | */ 38 | 39 | const $ = new Env(`哔哩哔哩漫画`); 40 | 41 | const cookie = $.getdata("CookieBM") || ''; // 哔哩哔哩漫画Cookie 42 | 43 | const barkKey = ''; //Bark APP 通知推送Key 44 | 45 | if (typeof $request !== 'undefined') { 46 | GetCookie() 47 | } else { 48 | checkin() 49 | } 50 | 51 | function checkin() { 52 | const bilibili = { 53 | url: 'https://manga.bilibili.com/twirp/activity.v1.Activity/ClockIn', 54 | headers: { 55 | Cookie: cookie, 56 | }, 57 | body: "platform=ios" 58 | }; 59 | $.post(bilibili, async function(error, response, data) { 60 | if (error && !data) { 61 | $.msgBody = `请求失败!\n${error}`; 62 | } else if (parseInt(response.status) == 200) { 63 | $.msgBody = "签到成功!🎉"; 64 | } else if (/duplicate/.test(data)) { 65 | $.msgBody = "今日已签过 ⚠️"; 66 | } else if (/uid must/.test(data)) { 67 | $.msgBody = "Cookie失效 ‼️‼️"; 68 | } else { 69 | $.msgBody = `签到失败 ‼️\n${data}`; 70 | } 71 | if (barkKey) { 72 | await BarkNotify($, barkKey, $.name, $.msgBody); 73 | } 74 | $.msg($.name, ``, $.msgBody); 75 | $.done(); 76 | }) 77 | } 78 | 79 | function GetCookie() { 80 | var CookieName = "B站漫画"; 81 | var CookieKey = "CookieBM"; 82 | var regex = /SESSDATA=.+?;/; 83 | if ($request.headers) { 84 | var header = $request.headers['Cookie'] ? $request.headers['Cookie'] : ""; 85 | if (header.indexOf("SESSDATA=") != -1) { 86 | var CookieValue = regex.exec(header)[0]; 87 | if ($.getdata(CookieKey)) { 88 | if ($.getdata(CookieKey) != CookieValue) { 89 | var cookie = $.setdata(CookieValue, CookieKey); 90 | if (!cookie) { 91 | $.msg("更新" + CookieName + "Cookie失败‼️", "", ""); 92 | } else { 93 | $.msg("更新" + CookieName + "Cookie成功 🎉", "", ""); 94 | } 95 | } 96 | } else { 97 | var cookie = $.setdata(CookieValue, CookieKey); 98 | if (!cookie) { 99 | $.msg("首次写入" + CookieName + "Cookie失败‼️", "", ""); 100 | } else { 101 | $.msg("首次写入" + CookieName + "Cookie成功 🎉", "", ""); 102 | } 103 | } 104 | } else { 105 | $.msg("写入" + CookieName + "Cookie失败‼️", "", "Cookie关键值缺失"); 106 | } 107 | } else { 108 | $.msg("写入" + CookieName + "Cookie失败‼️", "", "配置错误, 无法读取请求头,"); 109 | } 110 | $.done() 111 | } 112 | 113 | //Bark APP notify 114 | async function BarkNotify(c,k,t,b){for(let i=0;i<3;i++){console.log(`🔷Bark notify >> Start push (${i+1})`);const s=await new Promise((n)=>{c.post({url:'https://api.day.app/push',headers:{'Content-Type':'application/json'},body:JSON.stringify({title:t,body:b,device_key:k,ext_params:{group:t}})},(e,r,d)=>r&&r.status==200?n(1):n(d||e))});if(s===1){console.log('✅Push success!');break}else{console.log(`❌Push failed! >> ${s.message||s}`)}}}; 115 | 116 | // https://github.com/chavyleung/scripts/blob/master/Env.min.js 117 | 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)} -------------------------------------------------------------------------------- /KuaiKan-DailyBonus/KKMH.js: -------------------------------------------------------------------------------- 1 | /* 2 | 快看漫画签到脚本 3 | 4 | 更新时间: 2021.9.22 5 | 脚本兼容: QuantumultX, Surge4, Loon, Node.js 6 | 电报频道: @NobyDa 7 | 问题反馈: @NobyDa_bot 8 | 9 | 获取Cookie说明: 10 | 打开快看漫画App后(AppStore中国区),点击"我的", 如通知成功获取cookie, 则可以使用此签到脚本. 11 | 获取Cookie后, 请将Cookie脚本禁用并移除主机名,以免产生不必要的MITM. 12 | 脚本将在每天上午9:00执行, 您可以修改执行时间。 13 | 14 | 如果使用Node.js, 需自行安装got与tough-cookie模块. 例: npm install got tough-cookie -g 15 | 16 | Node.js用户抓取Cookie说明: 17 | 开启抓包, 打开快看漫画App后(AppStore中国区),点击"我的" 返回抓包app搜索关键字 passport/user 复制请求头Cookie填入以下cookie处的单引号内即可 18 | */ 19 | 20 | var cookie = '' 21 | 22 | var barkKey = ''; //Bark APP 通知推送key 23 | 24 | /********************* 25 | QuantumultX 远程脚本配置: 26 | ********************** 27 | [task_local] 28 | 0 9 * * * https://raw.githubusercontent.com/NobyDa/Script/master/KuaiKan-DailyBonus/KKMH.js, tag=快看漫画, img-url=https://ftp.bmp.ovh/imgs/2020/09/a3345da5e9094363.png, enabled=true 29 | 30 | [rewrite_local] 31 | # 获取Cookie 32 | ^https:\/\/api\.kkmh\.com\/v\d\/passport\/user url script-request-header https://raw.githubusercontent.com/NobyDa/Script/master/KuaiKan-DailyBonus/KKMH.js 33 | 34 | [mitm] 35 | hostname= api.kkmh.com 36 | 37 | ********************** 38 | Surge 4.2.0+ 脚本配置: 39 | ********************** 40 | [Script] 41 | 快看漫画签到 = type=cron,cronexp=0 9 * * *,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/KuaiKan-DailyBonus/KKMH.js 42 | 43 | 快看漫画获取Cookie = type=http-request,pattern=^https:\/\/api\.kkmh\.com\/v\d\/passport\/user,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/KuaiKan-DailyBonus/KKMH.js 44 | 45 | [MITM] 46 | hostname= api.kkmh.com 47 | 48 | ************************ 49 | Loon 2.1.0+ 脚本配置: 50 | ************************ 51 | 52 | [Script] 53 | # 快看漫画签到 54 | cron "0 9 * * *" script-path=https://raw.githubusercontent.com/NobyDa/Script/master/KuaiKan-DailyBonus/KKMH.js 55 | 56 | # 获取Cookie 57 | http-request ^https:\/\/api\.kkmh\.com\/v\d\/passport\/user script-path=https://raw.githubusercontent.com/NobyDa/Script/master/KuaiKan-DailyBonus/KKMH.js 58 | 59 | [Mitm] 60 | hostname= api.kkmh.com 61 | 62 | */ 63 | var LogDetails = false; //响应日志 64 | var $ = new Env('快看漫画'); 65 | var date = new Date() 66 | var imgUrl = { 67 | 'open-url': 'kuaikan://', 68 | 'media-url': 'https://ftp.bmp.ovh/imgs/2020/09/16da56c186ffa6a2.png' 69 | }; 70 | 71 | (async () => { 72 | if (typeof $request != "undefined") { 73 | GetCookie() 74 | } else if (cookie || $.getdata("@KKMH.COOKIE")) { 75 | if (cookie) $.setdata(cookie, "@KKMH.COOKIE"); 76 | LogDetails = $.getdata("@KKMH.LOG") === "true" || LogDetails 77 | await Checkin(); 78 | } else { 79 | $.msg($.name, "", "签到终止, 未获取Cookie ⚠️", imgUrl); 80 | } 81 | })().finally(() => { 82 | $.done(); 83 | }) 84 | 85 | function Checkin() { 86 | return new Promise(resolve => { 87 | $.get({ 88 | url: 'https://h5.kuaikanmanhua.com/v2/checkin/task_center/checkin', 89 | headers: { 90 | 'Cookie': cookie || $.getdata("@KKMH.COOKIE"), 91 | 'User-Agent': 'Kuaikan/5.75.0/575000(iPhone;Scale/3.00) (iPhone; CPU)', 92 | 'X-Device': '0' 93 | } 94 | }, async (error, response, data) => { 95 | try { 96 | if (error) throw new Error(error) 97 | const cc = JSON.parse(data) 98 | const Details = LogDetails ? data ? `response:\n${data}` : '' : '' 99 | if (cc.code == 200) { 100 | $.log(`${$.name} 成功${Details}`) 101 | const pop = cc.data.check_in_home_info.pop_title 102 | const text = cc.data.check_in_home_info.check_in_bubble_text 103 | const title = cc.data.check_in_home_info.check_in_title 104 | const score = cc.data.check_in_home_info.user_score 105 | const kkb = cc.data.check_in_home_info.user_kkb 106 | const uid = $.getdata("@KKMH.COOKIE") ? $.getdata("@KKMH.COOKIE").match(/uid=(\d+)/) : '' 107 | const rep = $.getdata("@KKMH.DATE") == date.getDate() && (uid ? uid[1] : '') == $.getdata("@KKMH.UID") 108 | const gift = await GiftPack(title); 109 | $.subtitle = rep ? '今天已签过!' : pop; 110 | $.msgBody = `${rep?``:text+', '}现有${$.score||score}积分, ${$.kkb||kkb}KK币\n${gift||title} 🎉`; 111 | $.setdata(JSON.stringify(date.getDate()), "@KKMH.DATE") 112 | $.setdata(uid ? uid[1] : '', "@KKMH.UID") 113 | } else { 114 | $.log(`${$.name} 失败${Details}`) 115 | if (cc.code == 401) { 116 | $.msgBody = 'Cookie失效 ⚠️'; 117 | } else { 118 | $.msgBody = cc.message || '未知错误 ⚠️'; 119 | } 120 | } 121 | } catch (err) { 122 | $.logErr(err) 123 | $.msgBody = `错误, 已输出日志 ⚠️`; 124 | } finally { 125 | $.msg($.name, $.subtitle || '', $.msgBody, imgUrl); 126 | if (barkKey) { 127 | await BarkNotify($, barkKey, $.name, $.msgBody); 128 | } 129 | resolve() 130 | } 131 | }) 132 | }) 133 | } 134 | 135 | function GiftPack(type) { 136 | return new Promise(resolve => { 137 | if (!type.match(/今(日|天)可领/)) return resolve(); 138 | $.get({ 139 | url: 'https://h5.kuaikanmanhua.com/v1/checkin/api/check/open_gift_bag', 140 | headers: { 141 | 'Cookie': cookie || $.getdata("@KKMH.COOKIE"), 142 | 'User-Agent': 'Kuaikan/5.75.0/575000(iPhone;Scale/3.00) (iPhone; CPU)', 143 | 'X-Device': '0' 144 | } 145 | }, (error, response, data) => { 146 | try { 147 | if (error) throw new Error(error) 148 | const cc = JSON.parse(data) 149 | const Details = LogDetails ? data ? `response:\n${data}` : '' : '' 150 | if (cc.code == 200 && cc.data) { 151 | $.log(`${$.name} 成功${Details}`) 152 | $.kkb = cc.data.giftBagKkb ? cc.data.giftBagKkb + cc.data.kkb : cc.data.kkb 153 | $.score = cc.data.score; 154 | $.gifts = `领取连签礼包成功`; 155 | if (cc.data.giftBagScore) $.gifts += `, +${cc.data.giftBagScore}积分`; 156 | if (cc.data.giftBagKkb) $.gifts += `, +${cc.data.giftBagKkb}KK币`; 157 | if (cc.data.giftBagSupplement) $.gifts += `, +1 补签胶囊`; 158 | if (cc.data.giftBagCardCoupon) $.gifts += `, +1 ${cc.data.cardCoupon.title}`; 159 | if (cc.data.giftBagYouzanCoupon) $.gifts += `, +1 ${cc.data.youzanCoupon.title}`; 160 | } else { 161 | $.log(`${$.name} 失败${Details}`) 162 | $.gifts = `领取连签礼包失败, ${cc.message || '未知错误'}` 163 | } 164 | } catch (err) { 165 | $.logErr(err) 166 | $.gifts = `领取连签礼包错误, 已输出日志` 167 | } finally { 168 | resolve($.gifts) 169 | } 170 | }) 171 | }) 172 | } 173 | 174 | function GetCookie() { 175 | const RA = $.getdata("@KKMH.COOKIE") 176 | const TM = $.getdata("@KKMH.TIME") 177 | if (JSON.stringify($request.headers).match(/session=/)) { 178 | if (RA != $request.headers['Cookie']) { 179 | if ($.setdata($request.headers['Cookie'], "@KKMH.COOKIE")) { 180 | $.setdata(JSON.stringify(Date.now()), "@KKMH.TIME") 181 | if (!TM || TM && (Date.now() - TM) / 1000 >= 21600) { 182 | $.msg(`${RA?`更新`:`首次写入`}${$.name}Cookie成功 🎉`, "", "", imgUrl) 183 | } else if (RA.match(/uid=\d+/)[0] == $request.headers['Cookie'].match(/uid=\d+/)[0]) { 184 | $.log(`\n更新${$.name}Cookie成功! 🎉\n检测到频繁通知, 已转为输出日志`) 185 | } else { 186 | $.msg(`更新${$.name}Cookie成功 🎉`, "", "", imgUrl) 187 | } 188 | } else { 189 | $.msg(`${RA?`更新`:`首次写入`}${$.name}Cookie失败‼️`, "", "", imgUrl) 190 | } 191 | } else { 192 | $.log(`${$.name}-Cookie相同, 跳过写入 ⚠️`) 193 | } 194 | } else { 195 | $.log(`${$.name}-请求不含Cookie, 跳过写入 ‼️`) 196 | } 197 | } 198 | 199 | //Bark APP notify 200 | async function BarkNotify(c,k,t,b){for(let i=0;i<3;i++){console.log(`🔷Bark notify >> Start push (${i+1})`);const s=await new Promise((n)=>{c.post({url:'https://api.day.app/push',headers:{'Content-Type':'application/json'},body:JSON.stringify({title:t,body:b,device_key:k,ext_params:{group:t}})},(e,r,d)=>r&&r.status==200?n(1):n(d||e))});if(s===1){console.log('✅Push success!');break}else{console.log(`❌Push failed! >> ${s.message||s}`)}}} 201 | 202 | //Compatible code from https://github.com/chavyleung/scripts/blob/master/Env.min.js 203 | 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)} -------------------------------------------------------------------------------- /Loon/Loon_GetCookie.conf: -------------------------------------------------------------------------------- 1 | # 该订阅仅适用于Loon, 用于解决任务脚本的Cookie获取, 具体获取方法请看相关脚本内注释. 2 | # 您可在使用后手动将其禁用, 以避免无意义的MITM. 3 | # URL : https://raw.githubusercontent.com/NobyDa/Script/master/Loon/Loon_GetCookie.conf 4 | 5 | http-request ^https:\/\/(api\.m|me-api|ms\.jr)\.jd\.com\/(client\.action\?functionId=signBean|user_new\/info\/GetJDUserInfoUnion\?|gw\/generic\/hy\/h5\/m\/appSign\?) script-path=https://raw.githubusercontent.com/NobyDa/Script/master/JD-DailyBonus/JD_DailyBonus.js, requires-body=1, tag=获取京东Cookie 6 | 7 | http-request ^https:\/\/passport\.iqiyi\.com\/apis\/user\/info\.action script-path=https://raw.githubusercontent.com/NobyDa/Script/master/iQIYI-DailyBonus/iQIYI.js, tag=爱奇艺Cookie 8 | 9 | http-request ^https:\/\/www\.52pojie\.cn\/home\.php\? script-path=https://raw.githubusercontent.com/NobyDa/Script/master/52pojie-DailyBonus/52pojie.js, tag=吾爱破解Cookie 10 | 11 | http-request ^https:\/\/passport\.biligame\.com\/api\/login\/sso.+?version%22%3A%22(3|4|5) script-path=https://raw.githubusercontent.com/NobyDa/Script/master/Bilibili-DailyBonus/Manga.js, tag=哔哩漫画Cookie 12 | 13 | http-request ^https?:\/\/(c\.tieba\.baidu\.com|180\.97\.\d+\.\d+)\/c\/s\/login script-path=https://raw.githubusercontent.com/NobyDa/Script/master/BDTieBa-DailyBonus/TieBa.js, tag=百度贴吧Cookie 14 | 15 | http-request ^https?:\/\/api\.kkmh\.com\/v\d\/passport\/user script-path=https://raw.githubusercontent.com/NobyDa/Script/master/KuaiKan-DailyBonus/KKMH.js, tag=快看漫画Cookie 16 | 17 | [MITM] 18 | hostname = passport.iqiyi.com, www.52pojie.cn, api.m.jd.com, ms.jr.jd.com, me-api.jd.com, passport.biligame.com, c.tieba.baidu.com, api.kkmh.com -------------------------------------------------------------------------------- /Loon/Loon_GetTask.conf: -------------------------------------------------------------------------------- 1 | # 该签到脚本订阅仅适用于Loon, 您需要获取Cookie后方可使用. 2 | # URL : https://raw.githubusercontent.com/NobyDa/Script/master/Loon/Loon_GetTask.conf 3 | 4 | # 京东签到, 执行时间: 0:05 5 | cron "5 0 * * *" ,timeout=30, script-path=https://raw.githubusercontent.com/NobyDa/Script/master/JD-DailyBonus/JD_DailyBonus.js,tag=京东签到 6 | 7 | # 爱奇艺, 执行时间: 08:00 8 | cron "0 8 * * *" script-path=https://raw.githubusercontent.com/NobyDa/Script/master/iQIYI-DailyBonus/iQIYI.js,tag=爱奇艺 9 | 10 | # 哔哩哔哩漫画, 执行时间: 08:02 11 | cron "2 8 * * *" script-path=https://raw.githubusercontent.com/NobyDa/Script/master/Bilibili-DailyBonus/Manga.js,tag=哔哩哔哩漫画 12 | 13 | # 百度贴吧, 执行时间: 08:03-08:05 (3次) 14 | cron "3,4,5 8 * * *" script-path=https://raw.githubusercontent.com/NobyDa/Script/master/BDTieBa-DailyBonus/TieBa.js,tag=百度贴吧(客户端) 15 | 16 | # 快看漫画, 执行时间: 08:06 17 | cron "6 8 * * *" script-path=https://raw.githubusercontent.com/NobyDa/Script/master/KuaiKan-DailyBonus/KKMH.js, tag=快看漫画 -------------------------------------------------------------------------------- /Loon/Loon_TF_Download.conf: -------------------------------------------------------------------------------- 1 | # 该脚本订阅仅适用于Loon, 用于更新TestFlight App时, 提示"APP不可用"问题. 解除区域限制. 2 | 3 | http-request ^https?:\/\/testflight\.apple\.com\/v\d\/accounts\/.+?\/install$ requires-body=1,max-size=0,script-path=https://gist.githubusercontent.com/NobyDa/9be418b93afc5e9c8a8f4d28ae403cf2/raw/TF_Download.js, tag=TF区域限制解除 4 | 5 | [MITM] 6 | hostname = testflight.apple.com -------------------------------------------------------------------------------- /NobyDa_BoxJs.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "NobyDa.app.sub", 3 | "name": "NobyDa 脚本订阅", 4 | "description": "该订阅兼容BoxJs以及QX Gallery", 5 | "author": "@NobyDa", 6 | "icon": "https://avatars2.githubusercontent.com/u/53217160", 7 | "repo": "https://github.com/NobyDa/Script/tree/master", 8 | "apps": [{ 9 | "id": "多合一签到", 10 | "name": "京东", 11 | "keys": ["CookiesJD"], 12 | "descs_html": [ 13 | "

获取Cookie以及脚本配置请查看脚本注释

", 14 | "

如需修改Cookie列表请严格按照JSON格式修改

", 15 | "

建议通过脚本获取Cookie

", 16 | "
", 17 | "

签到相关教程

", 18 | "

" 19 | ], 20 | "settings": [{ 21 | "id": "JD_DailyBonusLog", 22 | "name": "详细响应日志", 23 | "val": false, 24 | "type": "boolean", 25 | "desc": "打印原始签到结果, 用于调试脚本, 一般用户建议关闭." 26 | }, { 27 | "id": "JD_Crash_disable", 28 | "name": "崩溃自动禁用", 29 | "val": true, 30 | "type": "boolean", 31 | "desc": "脚本运行崩溃时(如VPN断连), 下次运行时将自动禁用相关崩溃接口(仅部分接口启用), 注: 崩溃时可能会误禁用正常接口." 32 | }, { 33 | "id": "JD_Retry_disable", 34 | "name": "签到接口增强", 35 | "val": true, 36 | "type": "boolean", 37 | "desc": "用于部分接口提示\"不含活动数据\"问题, 开启后会进行二次查询, 注: 可能会导致崩溃(小概率)." 38 | }, { 39 | "id": "JD_Follow_disable", 40 | "name": "自动关注店铺", 41 | "val": true, 42 | "type": "boolean", 43 | "desc": "部分接口签到过程可能需要关注店铺, 如介意可选择关闭." 44 | }, { 45 | "id": "JD_DailyBonusDisables", 46 | "name": "签到接口禁用", 47 | "val": "", 48 | "type": "checkboxes", 49 | "desc": "", 50 | "items": [{ 51 | "key": "JDBean", 52 | "label": "京东京豆" 53 | }, { 54 | "key": "JRSteel", 55 | "label": "金融钢镚" 56 | }, { 57 | "key": "JDTurn", 58 | "label": "京东转盘" 59 | }, { 60 | "key": "JDGStore", 61 | "label": "京东超市" 62 | }, { 63 | "key": "JDCard", 64 | "label": "京东卡包" 65 | }, { 66 | "key": "JD3C", 67 | "label": "京东数码" 68 | }, { 69 | "key": "JDSuitcase", 70 | "label": "京东箱包" 71 | }, { 72 | "key": "JDChild", 73 | "label": "京东童装" 74 | }, { 75 | "key": "JDBaby", 76 | "label": "京东母婴" 77 | }, { 78 | "key": "JDCash", 79 | "label": "京东红包" 80 | }, { 81 | "key": "JDFSale", 82 | "label": "京东闪购" 83 | }, { 84 | "key": "JDBook", 85 | "label": "京东图书" 86 | }, { 87 | "key": "JDStory", 88 | "label": "失眠补贴" 89 | }, { 90 | "key": "JDPhone", 91 | "label": "手机小时达" 92 | }, { 93 | "key": "JDSchool", 94 | "label": "京东校园" 95 | }, { 96 | "key": "JDUndies", 97 | "label": "京东内衣" 98 | }, { 99 | "key": "JDShoes", 100 | "label": "京东鞋靴" 101 | }, { 102 | "key": "JDShand", 103 | "label": "京东二手" 104 | }, { 105 | "key": "JDHealth", 106 | "label": "京东健康" 107 | }, { 108 | "key": "JDWomen", 109 | "label": "京东女装" 110 | }, { 111 | "key": "JDSecKill", 112 | "label": "京东秒杀" 113 | }, { 114 | "key": "JTDouble", 115 | "label": "金贴双签" 116 | }, { 117 | "key": "JDVege", 118 | "label": "京东菜场" 119 | }, { 120 | "key": "JDClean", 121 | "label": "京东清洁" 122 | }, { 123 | "key": "JDCare", 124 | "label": "京东个护" 125 | }, { 126 | "key": "JDaccompany", 127 | "label": "京东陪伴" 128 | }, { 129 | "key": "JDCube", 130 | "label": "京东魔方" 131 | }, { 132 | "key": "JDJiaDian", 133 | "label": "京东家电" 134 | }, { 135 | "key": "JDDouble", 136 | "label": "京豆双签" 137 | }, { 138 | "key": "subsidy", 139 | "label": "京东金贴" 140 | }, { 141 | "key": "JDGetCash", 142 | "label": "京东现金" 143 | }, { 144 | "key": "JDShake", 145 | "label": "京东摇一摇" 146 | }, { 147 | "key": "Qbear", 148 | "label": "总京豆查询" 149 | }, { 150 | "key": "TCash", 151 | "label": "总红包查询" 152 | }, { 153 | "key": "TSteel", 154 | "label": "总钢镚查询" 155 | }, { 156 | "key": "TotalSubsidy", 157 | "label": "总金贴查询" 158 | }, { 159 | "key": "TotalMoney", 160 | "label": "总现金查询" 161 | }] 162 | }, { 163 | "id": "JD_DailyBonusTimeOut", 164 | "name": "超时退出 (毫秒)", 165 | "val": "", 166 | "type": "number", 167 | "placeholder": "默认无超时 (点击以展开说明)", 168 | "desc": "按需填写, 用于由网络不稳定引起的脚本中断, 正常或越狱用户建议留空. 如QX日志出现大量\"JS Context timeout\"后脚本中断时, 建议填写6000" 169 | }, { 170 | "id": "JD_DailyBonusDelay", 171 | "name": "接口延迟 (毫秒)", 172 | "val": "", 173 | "type": "number", 174 | "placeholder": "默认并发无延迟 (点击以展开说明)", 175 | "desc": "延迟作用于每个签到接口, 该参数接受随机或指定延迟(例: '2000'则表示延迟2秒; '2000-5000'则表示延迟最小2秒,最大5秒内的随机延迟), 如填入延迟则切换顺序签到(耗时较长); VPN重启或越狱用户建议填写1(顺序执行), Surge用户请注意在SurgeUI界面调整脚本超时." 176 | }, { 177 | "id": "CookiesJD", 178 | "name": "Cookie列表", 179 | "val": "", 180 | "type": "textarea", 181 | "autoGrow": false, 182 | "rows": 9, 183 | "val": "[\n {\n \"cookie\": \"此处填写账号1 Cookie\"\n },\n {\n \"cookie\": \"此处填写账号2 Cookie\",\n \"jrBody\": \"此处填写账号2 钢镚Body\"\n }\n]", 184 | "placeholder": "[ {\"cookie\": \"pt_key=xxx;pt_pin=yyy;\", \"jrBody\": \"reqData=zzz\"} ]", 185 | "desc": "Cookie和钢镚签到Body列表, 如需修改请严格按照JSON格式填写; \"cookie\"为必须, 其他为可选." 186 | }], 187 | "scripts": [{ 188 | "name": "京东签到", 189 | "script": "https://raw.githubusercontent.com/NobyDa/Script/master/JD-DailyBonus/JD_DailyBonus.js" 190 | }, { 191 | "name": "初始化设置", 192 | "script": "https://gist.githubusercontent.com/NobyDa/91cbe57dd50b3588a975af8922507a72/raw/JD_initial.js" 193 | }], 194 | "author": "@NobyDa", 195 | "repo": "https://github.com/NobyDa/Script/tree/master/JD-DailyBonus", 196 | "icons": ["https://raw.githubusercontent.com/NobyDa/mini/master/Alpha/jd.png", "https://raw.githubusercontent.com/NobyDa/mini/master/Color/jd.png"] 197 | }, { 198 | "id": "iQIYI", 199 | "name": "爱奇艺", 200 | "keys": ["CookieQY"], 201 | "descs_html": [ 202 | "

获取Cookie以及脚本配置请查看脚本注释

" 203 | ], 204 | "settings": [{ 205 | "id": "iQIYI_LogDetails", 206 | "name": "响应日志", 207 | "val": false, 208 | "type": "boolean", 209 | "desc": "" 210 | }], 211 | "script": "https://raw.githubusercontent.com/NobyDa/Script/master/iQIYI-DailyBonus/iQIYI.js", 212 | "author": "@NobyDa", 213 | "repo": "https://github.com/NobyDa/Script/blob/master/iQIYI-DailyBonus/iQIYI.js", 214 | "icons": ["https://raw.githubusercontent.com/NobyDa/mini/master/Alpha/iQIYI.png", "https://raw.githubusercontent.com/NobyDa/mini/master/Color/iQIYI.png"] 215 | }, { 216 | "id": "BiliManga", 217 | "name": "哔哩漫画", 218 | "keys": ["CookieBM"], 219 | "descs_html": [ 220 | "

获取Cookie以及脚本配置请查看脚本注释

" 221 | ], 222 | "script": "https://raw.githubusercontent.com/NobyDa/Script/master/Bilibili-DailyBonus/Manga.js", 223 | "author": "@NobyDa", 224 | "repo": "https://github.com/NobyDa/Script/blob/master/Bilibili-DailyBonus/Manga.js", 225 | "icons": ["https://raw.githubusercontent.com/NobyDa/mini/master/Alpha/manga.png", "https://raw.githubusercontent.com/NobyDa/mini/master/Color/manga.png"] 226 | }, { 227 | "id": "BiliMangaPoints", 228 | "name": "哔哩漫画抢券", 229 | "descs_html": [ 230 | "

脚本配置请查看脚本注释

" 231 | ], 232 | "keys": ["BM_ProductName", "BM_ProductNum", "BM_ExchangeNum"], 233 | "settings": [{ 234 | "id": "BM_ProductName", 235 | "name": "商品名", 236 | "val": "积分兑换", 237 | "type": "text", 238 | "placeholder": "(点击以展开说明)", 239 | "desc": "要抢购的积分商城商品名" 240 | }, { 241 | "id": "BM_ProductNum", 242 | "name": "兑换数量", 243 | "val": "", 244 | "type": "text", 245 | "placeholder": "(点击以展开说明)", 246 | "desc": "要兑换的数量, 默认为积分可兑换的最大值" 247 | }, { 248 | "id": "BM_ExchangeNum", 249 | "name": "抢购次数", 250 | "val": "", 251 | "type": "text", 252 | "placeholder": "(点击以展开说明)", 253 | "desc": "默认暴力抢购100次" 254 | }], 255 | "script": "https://raw.githubusercontent.com/NobyDa/Script/master/Bilibili-DailyBonus/ExchangePoints.js", 256 | "author": "@NobyDa", 257 | "repo": "https://github.com/NobyDa/Script/blob/master/Bilibili-DailyBonus/ExchangePoints.js", 258 | "icons": ["https://raw.githubusercontent.com/NobyDa/mini/master/Alpha/manga.png", "https://raw.githubusercontent.com/NobyDa/mini/master/Color/manga.png"] 259 | }, { 260 | "id": "BaiduTB", 261 | "name": "百度贴吧", 262 | "keys": ["CookieTB"], 263 | "descs_html": [ 264 | "

获取Cookie以及脚本配置请查看脚本注释

" 265 | ], 266 | "settings": [{ 267 | "id": "BDTB_DailyBonus_Mode", 268 | "name": "签到模式", 269 | "val": "0", 270 | "type": "radios", 271 | "desc": "", 272 | "items": [{ 273 | "key": "0", 274 | "label": "自动切换" 275 | }, { 276 | "key": "1", 277 | "label": "顺序执行" 278 | }, { 279 | "key": "2", 280 | "label": "并发执行" 281 | }] 282 | }, { 283 | "id": "BDTB_DailyBonus_notify", 284 | "name": "通知汇总", 285 | "val": "", 286 | "type": "number", 287 | "placeholder": "默认20 (点击以展开说明)", 288 | "desc": "想签到几个汇总到一个通知里, 这里就填几个(比如我有13个要签到的, 这里填了5, 就会分三次推送通知)" 289 | }], 290 | "script": "https://raw.githubusercontent.com/NobyDa/Script/master/BDTieBa-DailyBonus/TieBa.js", 291 | "author": "@sazs34, @NobyDa", 292 | "repo": "https://github.com/sazs34/TaskConfig/blob/master/task/sign_baidu_tieba_v2.js", 293 | "icons": ["https://raw.githubusercontent.com/NobyDa/mini/master/Alpha/tieba.png", "https://raw.githubusercontent.com/NobyDa/mini/master/Color/tieba.png"] 294 | }, { 295 | "id": "52poje", 296 | "name": "吾爱破解", 297 | "keys": ["CookieWA"], 298 | "descs_html": [ 299 | "

获取Cookie以及脚本配置请查看脚本注释

" 300 | ], 301 | "script": "https://raw.githubusercontent.com/NobyDa/Script/master/52pojie-DailyBonus/52pojie.js", 302 | "author": "@NobyDa", 303 | "repo": "https://github.com/NobyDa/Script/blob/master/52pojie-DailyBonus/52pojie.js", 304 | "icons": ["https://raw.githubusercontent.com/NobyDa/mini/master/Alpha/52pj.png", "https://raw.githubusercontent.com/NobyDa/mini/master/Color/52pj.png"] 305 | }, { 306 | "id": "KuaiKan", 307 | "name": "快看漫画", 308 | "keys": ["@KKMH.COOKIE", "@KKMH.TIME", "@KKMH.UID", "@KKMH.DATE"], 309 | "descs_html": [ 310 | "

获取Cookie以及脚本配置请查看脚本注释

" 311 | ], 312 | "settings": [{ 313 | "id": "@KKMH.LOG", 314 | "name": "响应日志", 315 | "val": false, 316 | "type": "boolean", 317 | "desc": "打印原始签到结果, 用于调试脚本, 一般用户建议关闭." 318 | }], 319 | "script": "https://raw.githubusercontent.com/NobyDa/Script/master/KuaiKan-DailyBonus/KKMH.js", 320 | "author": "@NobyDa", 321 | "repo": "https://github.com/NobyDa/Script/blob/master/KuaiKan-DailyBonus/KKMH.js", 322 | "icons": ["https://raw.githubusercontent.com/NobyDa/mini/master/Alpha/KuaiKan.png", "https://raw.githubusercontent.com/NobyDa/mini/master/Color/KuaiKan.png"] 323 | }, { 324 | "id": "Bahamut", 325 | "name": "巴哈姆特", 326 | "keys": ["@ND_BAHA.ID", "@ND_BAHA.PW", "@ND_BAHA.TOTP", "@ND_BAHA.GUILD", "@ND_BAHA.ANSWER", "@ND_BAHA.ADS"], 327 | "descs_html": [ 328 | "

获取Cookie以及脚本配置请查看脚本注释

" 329 | ], 330 | "settings": [{ 331 | "id": "@ND_BAHA.ADS", 332 | "name": "签到广告", 333 | "val": false, 334 | "type": "boolean", 335 | "desc": "开启后将签到双倍巴币奖励, 默认关闭. 请注意, 此功能耗时过长(30秒以上), 如果使用Surge请调整该脚本超时为300秒" 336 | }, { 337 | "id": "@ND_BAHA.GUILD", 338 | "name": "签到公会", 339 | "val": true, 340 | "type": "boolean", 341 | "desc": "开启后将自动签到公会" 342 | }, { 343 | "id": "@ND_BAHA.ANSWER", 344 | "name": "动画疯答题", 345 | "val": true, 346 | "type": "boolean", 347 | "desc": "开启后将自动答题" 348 | }, { 349 | "id": "@ND_BAHA.ID", 350 | "name": "用户名", 351 | "val": "", 352 | "type": "text", 353 | "placeholder": "(点击以展开说明)", 354 | "desc": "输入用户名(账号)" 355 | }, { 356 | "id": "@ND_BAHA.PW", 357 | "name": "用户密码", 358 | "val": "", 359 | "type": "text", 360 | "placeholder": "", 361 | "desc": "输入用户密码" 362 | }, { 363 | "id": "@ND_BAHA.TOTP", 364 | "name": "两步验证令牌", 365 | "val": "", 366 | "type": "text", 367 | "placeholder": "(点击以展开说明)", 368 | "desc": "输入网站生成的16位令牌, 如未设置两步验证, 请留空" 369 | }], 370 | "script": "https://raw.githubusercontent.com/NobyDa/Script/master/Bahamut/BahamutDailyBonus.js", 371 | "author": "@NobyDa", 372 | "repo": "https://github.com/NobyDa/Script/blob/master/Bahamut/BahamutDailyBonus.js", 373 | "icons": ["https://raw.githubusercontent.com/NobyDa/mini/master/Alpha/bahamutGame.png", "https://raw.githubusercontent.com/NobyDa/mini/master/Color/bahamutGame.png"] 374 | }, { 375 | "id": "BiliRegion", 376 | "name": "哔哩番剧自动地区", 377 | "descs_html": [ 378 | "

脚本配置请查看脚本注释

" 379 | ], 380 | "keys": ["BiliArea_Policy", "BiliArea_CN", "BiliArea_HK", "BiliArea_TW", "BiliArea_DF", "BiliArea_disabled"], 381 | "settings": [{ 382 | "id": "BiliAreaNotify", 383 | "name": "静默运行", 384 | "val": false, 385 | "type": "boolean", 386 | "desc": "开启后将不再发出切换策略通知" 387 | }, { 388 | "id": "BiliDoubanRating", 389 | "name": "豆瓣评分", 390 | "val": true, 391 | "type": "boolean", 392 | "desc": "关闭后将不再查询豆瓣评分, 可显著提高相关页面载入速度" 393 | }, { 394 | "id": "BiliArea_Policy", 395 | "name": "策略组名", 396 | "val": "", 397 | "type": "text", 398 | "placeholder": "(点击以展开说明)", 399 | "desc": "哔哩哔哩分流的策略组名" 400 | }, { 401 | "id": "BiliArea_CN", 402 | "name": "中国大陆-子策略名", 403 | "val": "DIRECT", 404 | "type": "text", 405 | "placeholder": "(点击以展开说明)", 406 | "desc": "哔哩哔哩分流策略组里的中国大陆子策略名" 407 | }, { 408 | "id": "BiliArea_HK", 409 | "name": "中国香港-子策略名", 410 | "val": "", 411 | "type": "text", 412 | "placeholder": "(点击以展开说明)", 413 | "desc": "哔哩哔哩分流策略组里的香港子策略名" 414 | }, { 415 | "id": "BiliArea_TW", 416 | "name": "中国台湾-子策略名", 417 | "val": "", 418 | "type": "text", 419 | "placeholder": "(点击以展开说明)", 420 | "desc": "哔哩哔哩分流策略组里的台湾子策略名" 421 | }, { 422 | "id": "BiliArea_DF", 423 | "name": "后备-子策略名", 424 | "val": "", 425 | "type": "text", 426 | "placeholder": "(点击以展开说明)", 427 | "desc": "部分番剧可能会被屏蔽, 使用该策略以避免页面加载失败. 建议填写台湾子策略" 428 | }, { 429 | "id": "BiliArea_disabled", 430 | "name": "WiFi黑名单", 431 | "val": "", 432 | "type": "text", 433 | "placeholder": "(点击以展开说明)", 434 | "desc": "WiFi名称以逗号分隔, 名单内将跳过策略切换" 435 | }], 436 | "author": "@NobyDa", 437 | "repo": "https://github.com/NobyDa/Script/blob/master/Surge/JS/Bili_Auto_Regions.js", 438 | "icons": ["https://raw.githubusercontent.com/NobyDa/mini/master/Alpha/bilibili.png", "https://raw.githubusercontent.com/NobyDa/mini/master/Color/bilibili.png"] 439 | }], 440 | "task": [{ 441 | "config": "0 8 * * * https://raw.githubusercontent.com/NobyDa/Script/master/JD-DailyBonus/JD_DailyBonus.js, tag=京东签到, img-url=https://raw.githubusercontent.com/NobyDa/mini/master/Color/jd.png", 442 | "addons": "https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/Js_Remote_Cookie.conf, tag=NobyDa Cookie获取" 443 | }, { 444 | "config": "5 8 * * * https://raw.githubusercontent.com/NobyDa/Script/master/iQIYI-DailyBonus/iQIYI.js, tag=爱奇艺签到, img-url=https://raw.githubusercontent.com/NobyDa/mini/master/Color/iQIYI.png", 445 | "addons": "https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/Js_Remote_Cookie.conf, tag=NobyDa Cookie获取" 446 | }, { 447 | "config": "10 8 * * * https://raw.githubusercontent.com/NobyDa/Script/master/Bilibili-DailyBonus/Manga.js, tag=哔哩漫画签到, img-url=https://raw.githubusercontent.com/NobyDa/mini/master/Color/manga.png", 448 | "addons": "https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/Js_Remote_Cookie.conf, tag=NobyDa Cookie获取" 449 | }, { 450 | "config": "10,20,30 0 12 * * * https://raw.githubusercontent.com/NobyDa/Script/master/Bilibili-DailyBonus/ExchangePoints.js, tag=哔哩漫画抢券, img-url=https://raw.githubusercontent.com/NobyDa/mini/master/Color/manga.png", 451 | "addons": "https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/Js_Remote_Cookie.conf, tag=NobyDa Cookie获取" 452 | }, { 453 | "config": "15 8 * * * https://raw.githubusercontent.com/NobyDa/Script/master/BDTieBa-DailyBonus/TieBa.js, tag=百度贴吧签到, img-url=https://raw.githubusercontent.com/NobyDa/mini/master/Color/tieba.png", 454 | "addons": "https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/Js_Remote_Cookie.conf, tag=NobyDa Cookie获取" 455 | }, { 456 | "config": "20 8 * * * https://raw.githubusercontent.com/NobyDa/Script/master/52pojie-DailyBonus/52pojie.js, tag=吾爱破解签到, img-url=https://raw.githubusercontent.com/NobyDa/mini/master/Color/52pj.png", 457 | "addons": "https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/Js_Remote_Cookie.conf, tag=NobyDa Cookie获取" 458 | }, { 459 | "config": "25 8 * * * https://raw.githubusercontent.com/NobyDa/Script/master/KuaiKan-DailyBonus/KKMH.js, tag=快看漫画签到, img-url=https://raw.githubusercontent.com/NobyDa/mini/master/Color/KuaiKan.png", 460 | "addons": "https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/Js_Remote_Cookie.conf, tag=NobyDa Cookie获取" 461 | }, { 462 | "config": "0 8 * * * https://raw.githubusercontent.com/NobyDa/Script/master/Bahamut/BahamutDailyBonus.js, tag=巴哈姆特签到, img-url=https://raw.githubusercontent.com/NobyDa/mini/master/Color/bahamutGame.png" 463 | }] 464 | } -------------------------------------------------------------------------------- /QuantumultX/File/91.js: -------------------------------------------------------------------------------- 1 | /* 2 | 91短视频 解锁部分限制 3 | http://download.91porn.love/ 4 | 5 | *************************** 6 | QuantumultX: 7 | 8 | [rewrite_local] 9 | ^https?:\/\/.+?\.(my10api|(.*91.*))\.(com|tips|app|xyz)(:\d{2,5}|)\/api.php$ url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/File/91.js 10 | 11 | *************************** 12 | Surge4: 13 | 14 | [Script] 15 | http-response ^https?:\/\/.+?\.(my10api|(.*91.*))\.(com|tips|app|xyz)(:\d{2,5}|)\/api.php$ requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/File/91.js 16 | 17 | [General] 18 | force-http-engine-hosts = *91*:8080, *my10api*:8080 19 | 20 | **************************/ 21 | 22 | let body = $response.body; 23 | let obj = JSON.parse(body && /^\{/.test(body) ? body : '{}'); 24 | if (obj.data && obj.data.match(/^[A-Z0-9]{1000,40000}$/)) { 25 | obj.data = "FCA27C420C9BC230C86627D052F62E5E04CC1B51BF986A7C60673DC92F82697E9EB8C7BFB5AA267AC87399CDF8DBD1B1B25FEA57E27F38D0FCFB0CA5CFD8ED7B809FBCF3372C4DBB22083C4BC85A039512735A83834D7450EFD24EA2712FF841050BE99B7A4A31BBFCBE28BD3522227838BABE6E372874533E51A59A81CBFCB9C943C5C9646091E408D3B68BF6122DA929D558290D186EFBA2BE8019B86E35CB174626952650A959CA1A116ADCF1B14773DB033A8055E56F673682219629775138CDF3C653A0179232C8B653FDEB45D704140F8CA0C7716A02E5F7ED7CB41A68A247E9ECC0B744318534B0501865FBDF68AA1E7167663B59EDD8C56114E4A52B52A2020CA89B0F06F9D626BE3446ED5BF64E2FEE7AEA815CC047DBF3AE0F07DF1B4856070430ECF72AA542E22AF59861F2E48099C6E2CF2C1E3DD938196CB40FEE135A61AC76AAE6011C5A126CF9477AA0FDB76BE94279B66063E93E0FC8CFD802D0E2326B462EE26BF073E22B19A60F8BAF74C891DC57B18C8EFA091C9C66B6E94468E9A7165403A0CD2A3D45B23B2A0A43CEEF16FAF704866B6AC10686C8B6C65FB43DFDA9F531576815E7337E640C22870D8E9E4F1AEB6B5386BA48B264FBE302B2D0724C8D8FE9A147397BF8046114C06A99DF953E43ADBBBD3EBC538AEFC02091156B2782C482F17792D4D9FADBA46FB1BA8491146EC2393AB5C26C33CF0B61854D5492D2171A09AA147ACD9FD75798F43154E70624740A08F49507EF296B9B6FC54680C4A8AC265CF7717C8FA646207BF97A0B8241736FAA61EFB1F828545F515940F7873B20E6A1ABE055746F72F03EF49AAACA30A9C2EEF8E5CDE41BE80B1E5B66F485062F70B36A3ACE30116E062B06F95B404291398337E9449C919C096DE09DDF772CBC7373678AE532AB190C02414F2E0777C62679E5B6790D40FB17D832B4A27308D48D53B2A2302F0616BA6ECDD78947205456B0C063EF1EFE54125131F6755971C4DC84087135A89AFBC9BEC74C530BE9A22067A503DC535F0BF9DA16EE2BE41AF891C1A1A55F7B8522A6CA3D7044740316CAA2A25DE5DE1E67DA72E60FE46B5E49029852C859F2ACDDC57233F47AB3C4290E67B851A55B7C834D4A5DFE3E0E16344D0AF027E70ED05E269DBC955AAC496F0A9F794DD8E5059FA73D6A1A249B9E91921A48FE2CC639B29D97073FD936993E9B4634EAE4F805E1F5F65001FA81EE94FF142FE48C6D25CCE206F8731FFE321611ED0C9D95511B3AD30E43F668409A32742C0383A6B3B43663FAEF31F334C83EC641CC451D2FCBA2287E825206A7A2E980E53C2B6D3F39D4581E96719632425518F8CF04FEA775F6F828B75E7EF3C0F36D952DCA728955DADB3D501FFEA09E21D272912DFA4C5DE82B02A459E94100B522A86BA27D841B26754179606DC9C3A25968A915EB070431DA31E76C8C3F8F689957ECE7CB4644EAA545A8EBC151466554120767BC4353B0D252C566A535182AF6B53247A2C024DAA12E9EEDE31F6988804444E40157429F832BA8A959B9A62449ED822D1532BD52870B46BDA1509C1C9619F1EFDF4EA5BC9C1A49B3EF91B0FF3548C78905D248FD5195843A447F4BAFF13965303A0B9B719327698E2D679B43D4D25A8F4CDB316CD21E6C88E21A98187930C82EB616ABE917E1C2B5C045D97CDD41FA65E999F9B7FFEDAAE0F9B735A9BAC94533A2A14B3D4413E4723D947D23CA48E52A67A6506B647810F45B92AB1703C068E67EF1ECA8C3D3BF2149AEC9C0CD623850338445088C3AFA3CC08D30BF12CFA448A10C4E3C4AA5108F9DC1C7D223A0E1A89B01B1C64DB2DFEFBABC32C4F3EAEA6EA39587D44512E9A3F579844974974EEDDC125EA3A56F3821C9FE387CEA62C37160633E14E99A33FC0CB68D19F58EB6A93380476C01A7A0E9631412BEAD87FDCE17DECA4E475A47B0D6DD82D7EDBCC677D487220B172FED1E26AAA00A1771B11A281F6CC3E9582862331765E162033025DBCD8FC9CC3E50A27C72940A5E0C7692E5B474D132FB11D017706D9D653E1731E5EFC1337A964EB9F0C1865FE475421816ADC7ADACE6FAFA6BA0D8B7FECF766B640D5944254BC9DD638BAB91313DF77C91A8FB74012873AFCB3EACF18CA8D1C67EE16F6F83CA22D59F5D577F5B0844D4FFBC1A6D9C37F5848CB672E32AA48445A1B6D6837CCF98E4D4FE49B5F62186940F868473BA71F2C68C62687D9E5BB4B01E5E079A040275D86E66559025E6253D1759559B1FA60F48B7AC130F0070D21C0E38CDCF63DD755CD790FD3990109A3B856422E8118C5075D6EDFB58EFF8AA4401871036ADB9F766F9FC895F317A9D9DF38BD6E0D3E671BBE79F2C4BC8811F5E94A878D0E922FBAC4C86"; 26 | $done({body: JSON.stringify(obj)}); 27 | } else { 28 | $done({}) 29 | } -------------------------------------------------------------------------------- /QuantumultX/File/Wechat.js: -------------------------------------------------------------------------------- 1 | /* 2 | 微信 去除公众号文章底部广告 3 | 4 | *************************** 5 | QuantumultX: 6 | 7 | [rewrite_local] 8 | ^https?:\/\/mp\.weixin\.qq\.com\/mp\/getappmsgad url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/File/Wechat.js 9 | 10 | [mitm] 11 | hostname = mp.weixin.qq.com 12 | 13 | *************************** 14 | Surge4 or Loon: 15 | 16 | [Script] 17 | http-response ^https?:\/\/mp\.weixin\.qq\.com\/mp\/getappmsgad requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/File/Wechat.js 18 | 19 | [MITM] 20 | hostname = mp.weixin.qq.com 21 | 22 | **************************/ 23 | 24 | var obj = JSON.parse($response.body); 25 | obj.advertisement_num = 0; 26 | obj.advertisement_info = []; 27 | delete obj.appid; 28 | $done({body: JSON.stringify(obj)}); 29 | -------------------------------------------------------------------------------- /QuantumultX/File/Zymh.js: -------------------------------------------------------------------------------- 1 | /* 2 | 解锁知音漫客付费章节 (需登录) 3 | 4 | *************************** 5 | QuantumultX: 6 | 7 | [rewrite_local] 8 | ^https:\/\/(userpurchased|user-api)\.zymk\.cn\/v\d\/(userpurchased\/paychapters|getuserinfo)\/ url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/File/Zymh.js 9 | 10 | [mitm] 11 | hostname = user*.zymk.cn 12 | 13 | *************************** 14 | Surge4 or Loon: 15 | 16 | [Script] 17 | http-response ^https:\/\/(userpurchased|user-api)\.zymk\.cn\/v\d\/(userpurchased\/paychapters|getuserinfo)\/ requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/File/Zymh.js 18 | 19 | [MITM] 20 | hostname = user*.zymk.cn 21 | **************************/ 22 | 23 | var obj = JSON.parse($response.body); 24 | obj.status = 0; 25 | obj.data.isvip = 1; 26 | obj.data.coins = 6666; 27 | obj.data.Cgold = 6666; 28 | $done({body: JSON.stringify(obj)}); -------------------------------------------------------------------------------- /QuantumultX/File/aimeiju.js: -------------------------------------------------------------------------------- 1 | /* 2 | 爱美剧 解锁部分功能 3 | 官网: https://www.mjapp.cc 4 | 脚本原作者: 灰灰 5 | 6 | 可自行添加启动广告/弹窗规则, REGEX: 7 | ^https?://api.bjxkhc.com/index.php/app/ios/ads/index 8 | ^https?://api.bjxkhc.com/index.php/app/ios/ver/index_ios$ 9 | ^https?://api.bjxkhc.com/index.php/app/ios/pay/ok$ 10 | 11 | *************************** 12 | QuantumultX: 13 | 14 | [rewrite_local] 15 | ^https?:\/\/api.bjxkhc.com\/index\.php\/app\/ios\/(vod\/show|(user|vod|topic|type)\/index) url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/File/aimeiju.js 16 | 17 | [mitm] 18 | hostname = api.bjxkhc.com 19 | 20 | *************************** 21 | Surge4 or Loon: 22 | 23 | [Script] 24 | http-response ^https?:\/\/api.bjxkhc.com\/index\.php\/app\/ios\/(vod\/show|(user|vod|topic|type)\/index) requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/File/aimeiju.js 25 | 26 | [MITM] 27 | hostname = api.bjxkhc.com 28 | 29 | **************************/ 30 | 31 | var url = $request.url; 32 | var obj = JSON.parse($response.body || '{}'); 33 | const user = "/index.php/app/ios/user/index"; //用户信息 34 | const show = "/index.php/app/ios/vod/show"; //视频播放页面 35 | const banner = "/index.php/app/ios/vod/index";//首页轮播广告 36 | const topic = "/index.php/app/ios/topic/index";//豆瓣热榜中间广告 37 | const type = "/index.php/app/ios/type/index"//综合专区,美剧专区中间广告 38 | 39 | if (obj.data && obj.data.user && url.indexOf(user) != -1) { 40 | obj.data.user.viptime = "2088-08-08 08:08:08"; 41 | obj.data.user.cion = "88888"; 42 | obj.data.user.vip = "1"; 43 | } 44 | 45 | if (obj.data && url.indexOf(show) != -1) { 46 | obj.data.looktime = -1; 47 | obj.data.vip = "4"; 48 | delete obj.data.advertising;//视频下方轮播,删掉也不能清除广告占位 49 | obj.data.CT_App_Show_Pic1 = "";//联系客服图片 50 | obj.data.CT_App_Show_Url1 = "";//联系客服链接 51 | obj.data.CT_App_Show_Vod1 = "https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=1519044039,3175177225&fm=26&gp=0.jpg";//片头广告,留空的话不会自动播放 52 | obj.data.CT_App_Show_Vod_Time1 = "0";//片头广告显示时间(0秒也短暂显示) 53 | obj.data.CT_App_Show_Vod_Url1 = "";//片头广告链接 54 | obj.data.CT_App_Show_Vod_Type1 = "2";//片头广告显示类型,0一直显示,1暂停播放显示,2显示后自动播放 55 | obj.data.CT_App_Show_Vod_must_Time1 = "0";//片头联系客服图片显示时间,前面改VIP这里自动变0 56 | obj.data.CT_Pic_url1_pause = "";//暂停联系客服图片 57 | obj.data.CT_Pic_url1_pause_skip = "";//暂停联系客服链接 58 | } 59 | 60 | if (obj.data && url.indexOf(banner) != -1) { 61 | for (var i = obj.data.length - 1; i >= 0; i--) { 62 | if (obj.data[i].ad == 1) { 63 | obj.data.splice(i, 1) 64 | } 65 | } 66 | } 67 | 68 | if (obj.data && (url.indexOf(topic) != -1 || url.indexOf(type) != -1)) { 69 | for (var i = obj.data.length - 1; i >= 0; i--) { 70 | if (obj.data[i].ad == 1) { 71 | obj.data[i].ad = 0; 72 | obj.data[i].pic = ""; 73 | delete obj.data[i].url 74 | } 75 | } 76 | } 77 | $done({ body: JSON.stringify(obj) }); -------------------------------------------------------------------------------- /QuantumultX/File/dapian.js: -------------------------------------------------------------------------------- 1 | /* 2 | Bigshot 解锁高级特权(需登录) 3 | 4 | *************************** 5 | QuantumultX: 6 | 7 | [rewrite_local] 8 | ^https:\/\/vni\.kwaiying\.com\/api\/v1\/user\/profile url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/File/dapian.js 9 | 10 | [mitm] 11 | hostname = vni.kwaiying.com 12 | 13 | *************************** 14 | Surge4 or Loon: 15 | 16 | [Script] 17 | http-response ^https:\/\/vni\.kwaiying\.com\/api\/v1\/user\/profile requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/File/dapian.js 18 | 19 | [MITM] 20 | hostname = vni.kwaiying.com 21 | **************************/ 22 | 23 | var obj = JSON.parse($response.body); 24 | 25 | if (obj.data && obj.data.userInfo) { 26 | obj.data.userInfo.isVip = 1; 27 | obj.data.userInfo.memberId = 666 28 | obj.data.userInfo.vipStartTime = 1591430766000; 29 | obj.data.userInfo.vipEndTime = 3043037166000; 30 | } 31 | 32 | $done({ body: JSON.stringify(obj) }); -------------------------------------------------------------------------------- /QuantumultX/File/vsco.js: -------------------------------------------------------------------------------- 1 | /* 2 | VSCO 解锁高级特权 3 | 4 | *************************** 5 | QuantumultX: 6 | 7 | [rewrite_local] 8 | ^https:\/\/(api\.revenuecat\.com\/v\d\/subscribers|vsco\.co\/api\/subscriptions\/\d\.\d\/user-subscriptions)\/ url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/File/vsco.js 9 | 10 | [mitm] 11 | hostname = vsco.co, api.revenuecat.com 12 | 13 | *************************** 14 | Surge4 or Loon: 15 | 16 | [Script] 17 | http-response ^https:\/\/(api\.revenuecat\.com\/v\d\/subscribers|vsco\.co\/api\/subscriptions\/\d\.\d\/user-subscriptions)\/ requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/File/vsco.js 18 | 19 | [MITM] 20 | hostname = vsco.co, api.revenuecat.com 21 | 22 | **************************/ 23 | 24 | let obj = JSON.parse($response.body || '{}'); 25 | 26 | if (obj.user_subscription) { 27 | obj.user_subscription["expires_on_sec"] = 1655536094; 28 | obj.user_subscription["expired"] = false; 29 | obj.user_subscription["payment_type"] = 2; 30 | obj.user_subscription["is_trial_period"] = true; 31 | obj.user_subscription["starts_on_sec"] = 1560831070; 32 | obj.user_subscription["is_active"] = true; 33 | obj.user_subscription["auto_renew"] = true; 34 | obj.user_subscription["last_verified_sec"] = 1560831070; 35 | obj.user_subscription["subscription_code"] = "VSCOANNUAL"; 36 | obj.user_subscription["user_id"] = 54624336; 37 | obj.user_subscription["source"] = 1; 38 | } 39 | 40 | if (obj.subscriber) { 41 | obj.subscriber.subscriptions = { 42 | "com.circles.fin.premium.yearly": { 43 | "billing_issues_detected_at": null, 44 | "expires_date": "2030-02-18T07:52:54Z", 45 | "is_sandbox": false, 46 | "original_purchase_date": "2020-02-11T07:52:55Z", 47 | "period_type": "normal", 48 | "purchase_date": "2020-02-11T07:52:54Z", 49 | "store": "app_store", 50 | "unsubscribe_detected_at": null 51 | } 52 | }; 53 | obj.subscriber.entitlements = { 54 | "membership": { 55 | "expires_date": "2030-02-18T07:52:54Z", 56 | "product_identifier": "com.circles.fin.premium.yearly", 57 | "purchase_date": "2020-02-11T07:52:54Z" 58 | } 59 | }; 60 | } 61 | 62 | $done({ 63 | body: JSON.stringify(obj) 64 | }); -------------------------------------------------------------------------------- /QuantumultX/File/wnyd.js: -------------------------------------------------------------------------------- 1 | /* 2 | 网易蜗牛读书 解锁特权 3 | 原作者: yxiaocai & JO2EY 4 | 5 | *************************** 6 | QuantumultX: 7 | 8 | [rewrite_local] 9 | ^https?:\/\/p\.du\.163\.com\/gain\/readtime\/info\.json url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/File/wnyd.js 10 | 11 | [mitm] 12 | hostname = p.du.163.com 13 | 14 | *************************** 15 | Surge4 or Loon: 16 | 17 | [Script] 18 | http-response ^https?:\/\/p\.du\.163\.com\/gain\/readtime\/info\.json requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/File/wnyd.js 19 | 20 | [MITM] 21 | hostname = p.du.163.com 22 | 23 | **************************/ 24 | var body = $response.body; 25 | var obj = JSON.parse(body); 26 | 27 | obj.tradeEndTime = 1679685290000; 28 | body = JSON.stringify(obj); 29 | $done({body}); 30 | -------------------------------------------------------------------------------- /QuantumultX/File/xjsp.js: -------------------------------------------------------------------------------- 1 | /* 2 | 香蕉视频 解锁部分观看限制 3 | 官网: https://www.aa2.app 4 | 5 | *************************** 6 | QuantumultX: 7 | 8 | [rewrite_local] 9 | ^https?:\/\/.+?\.(pipi|fuli|xiang(jiao|xiang))apps\.com\/(ucp\/index|getGlobalData|(\/|)vod\/reqplay\/) url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/File/xjsp.js 10 | 11 | [mitm] 12 | hostname = ios.fuliapps.com, apple.fuliapps.com, ios.xiangjiaoapps.com, apple.xiangjiaoapps.com, *.xiangxiangapps.com, *.pipiapps.com 13 | 14 | *************************** 15 | Surge4 or Loon: 16 | 17 | [Script] 18 | http-response https?:\/\/.+?\.(pipi|fuli|xiang(jiao|xiang))apps\.com\/(ucp\/index|getGlobalData|(\/|)vod\/reqplay\/) requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/File/xjsp.js 19 | 20 | [MITM] 21 | hostname = ios.fuliapps.com, apple.fuliapps.com, ios.xiangjiaoapps.com, apple.xiangjiaoapps.com, *.xiangxiangapps.com, *.pipiapps.com 22 | 23 | **************************/ 24 | 25 | var body = $response.body; 26 | var url = $request.url; 27 | 28 | if (body) { 29 | var obj = JSON.parse($response.body); 30 | if (/\/ucp\/index/.test(url) && obj.data) { 31 | obj.data.uinfo.minivod_play_daily_remainders = "666"; 32 | obj.data.uinfo.minivod_down_daily_remainders = "666"; 33 | obj.data.uinfo.down_daily_remainders = "666"; 34 | obj.data.uinfo.play_daily_remainders = "666"; 35 | obj.data.uinfo["next_upgrade_need"] = "0"; 36 | obj.data.user.isvip = "1"; 37 | obj.data.user.gicon = "V5"; 38 | obj.data.user.gid = "5"; 39 | } 40 | if (/\/getGlobalData/.test(url) && obj.data) { 41 | obj.data.app_launch_times_adshow = "0"; 42 | obj.data.adgroups = ""; 43 | obj.data.iOS_adgroups = ""; 44 | } 45 | if (/\/reqplay\//.test(url) && obj.data) { 46 | obj.retcode = "0"; 47 | if (obj.data.hasOwnProperty("httpurl_preview")) { 48 | var playurl = obj.data["httpurl_preview"]; 49 | obj.data["httpurl"] = playurl; 50 | }; 51 | } 52 | $done({ body: JSON.stringify(obj) }); 53 | } else { 54 | $done({}) 55 | } -------------------------------------------------------------------------------- /QuantumultX/Js.conf: -------------------------------------------------------------------------------- 1 | hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, mp.weixin.qq.com, www.zhihu.com, api.zhihu.com, link.zhihu.com, vip1.kuwo.cn, p.du.163.com, vsco.co, user*.zymk.cn, vni.kwaiying.com, *.my10api.com, www.luqijianggushi.com, account.wps.cn, origin-prod-phoenix.jibjab.com, api.bjxkhc.com, xy-viva.kakalili.com, ap*.intsig.net, m*.bybutter.com, api.vuevideo.net, api.picsart.c*, ios.fuliapps.com, apple.fuliapps.com, *.pipiapps.com, ios.xiangjiaoapps.com, apple.xiangjiaoapps.com, *.xiangxiangapps.com, api.meiease.c*, trade-acs.m.taobao.com, api.m.jd.com, ios*.prod.ftl.netflix.com, api.revenuecat.com, pan.baidu.com, bmall.camera360.com, api.polaxiong.com 2 | 3 | # 去微信公众号广告 (By Choler) 4 | ^https?:\/\/mp\.weixin\.qq\.com\/mp\/getappmsgad url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/File/Wechat.js 5 | 6 | # 酷我音乐SVIP (By yxiaocai) 7 | ^https?:\/\/vip1\.kuwo\.cn\/(vip\/v2\/user\/vip|vip\/spi/mservice) url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/Kuwo.js 8 | 9 | # 爱美剧Vip (by huihui)(官网:app.meiju2018.com) 10 | ^https?:\/\/api.bjxkhc.com\/index\.php\/app\/ios\/(vod\/show|(user|vod|topic|type)\/index) url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/File/aimeiju.js 11 | # 广告 12 | ^https?://api.bjxkhc.com/index.php/app/ios/ads/index url reject-dict 13 | ^https?://api.bjxkhc.com/index.php/app/ios/ver/index_ios$ url reject 14 | ^https?://api.bjxkhc.com/index.php/app/ios/pay/ok$ url reject-dict 15 | 16 | # 网易蜗牛读书VIP (By yxiaocai and JO2EY) 17 | ^https?://p\.du\.163\.com/readtime/info.json url reject 18 | ^https?:\/\/p\.du\.163\.com\/gain\/readtime\/info\.json url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/File/wnyd.js 19 | 20 | # 知音漫客VIP 21 | ^https:\/\/(userpurchased|user-api)\.zymk\.cn\/v\d\/(userpurchased\/paychapters|getuserinfo)\/ url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/File/Zymh.js 22 | 23 | # VSCO滤镜VIP 24 | ^https:\/\/(api\.revenuecat\.com\/v\d\/subscribers|vsco\.co\/api\/subscriptions\/\d\.\d\/user-subscriptions)\/ url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/File/vsco.js 25 | 26 | # 大片(Bigshot) 视频编辑器 VIP 27 | ^https:\/\/vni\.kwaiying\.com\/api\/v1\/user\/profile url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/File/dapian.js 28 | 29 | # 91短视频 30 | ^https?:\/\/.+?\.(my10api|(.*91.*))\.(com|tips|app|xyz)(:\d{2,5}|)\/api.php$ url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/File/91.js 31 | 32 | # 香蕉视频VIP 33 | ^https?:\/\/.+?\.(pipi|fuli|xiang(jiao|xiang))apps\.com\/(ucp\/index|getGlobalData|(\/|)vod\/reqplay\/) url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/File/xjsp.js 34 | 35 | # 陆琪讲故事 36 | ^https:\/\/www\.luqijianggushi\.com\/api\/v2\/user\/get url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/luqi.js 37 | 38 | # WPS (By eHpo) 39 | ^https://account.wps.cn/api/users/ url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/Wps.js 40 | 41 | # JibJab解锁pro 42 | ^https:\/\/origin-prod-phoenix\.jibjab\.com\/v1\/user url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/jibjab.js 43 | 44 | # 小影 解锁Vip 45 | ^https:\/\/xy-viva\.kakalili\.com\/api\/rest\/u\/vipVerifyReceipt url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/vivavideo.js 46 | 47 | # 扫描全能王 pro 48 | ^https:\/\/(api|api-cs)\.intsig\.net\/purchase\/cs\/query_property\? url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/CamScanner.js 49 | 50 | # VUE pro 51 | ^https:\/\/api\.vuevideo\.net\/api\/v1\/(users\/.+\/profile|subtitle\/prepare) url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/VUE.js 52 | 53 | # NiChi 解锁素材 54 | ^https?:\/\/m(p|ini-hk)\.bybutter\.com\/mood\/(official-templates|privileges) url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/NiChi.js 55 | 56 | # PicsArt美易 pro 57 | ^https:\/\/api\.(picsart|meiease)\.c(n|om)\/users\/show\/me\.json url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/PicsArt.js 58 | 59 | # 百度网盘 解除在线视频倍率/清晰度 60 | ^https:\/\/pan\.baidu\.com\/rest\/\d\.\d\/membership\/user url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/BaiduCloud.js 61 | 62 | # MIX 解锁高级特权 (需恢复购买) 63 | ^https?:\/\/bmall\.camera360\.com\/api\/mix\/recovery url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/MIX.js 64 | 65 | # 泼辣修图 解锁高级特权 (需恢复购买) 66 | ^https:\/\/api\.polaxiong\.com\/v1\/payments\/appleiap\/receipts\/confirmation url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/Polarr.js 67 | 68 | ################################# 69 | ###########其他仓库引用########### 70 | ################################# 71 | 72 | # 去微博应用内广告 (yichahucha) 73 | ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js 74 | ^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)(mix)?timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|!/(photos/pic_recommend_status|live/media_homelist)|video/tiny_stream_video_list|photo/info|remind/unread_count) url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js 75 | 76 | # 知乎去广告 (onewayticket255) 77 | https://api.zhihu.com/(ad|drama|fringe|commercial|market/popover|search/(top|preset|tab)|.*featured-comment-ad) url reject-200 78 | 79 | # 哔哩哔哩动画去广告 (onewayticket255) 80 | https://app.bilibili.com/x/v2/(splash|search/square) url reject-200 81 | https://api.bilibili.com/x/v2/dm/ad url reject-200 82 | 83 | # 京东比价 (yichahucha) 84 | ^https?://api\.m\.jd\.com/client\.action\?functionId=(wareBusiness|serverConfig|basicConfig) url script-response-body https://service.2ti.st/QuanX/Script/jd_tb_price/main.js 85 | 86 | # 淘宝比价 (yichahucha) 87 | ^http://.+/amdc/mobileDispatch url script-request-body https://service.2ti.st/QuanX/Script/jd_tb_price/main.js 88 | ^https?://trade-acs\.m\.taobao\.com/gw/mtop\.taobao\.detail\.getdetail url script-response-body https://service.2ti.st/QuanX/Script/jd_tb_price/main.js 89 | 90 | # Netflix评分 (yichahucha) 91 | ^https?://ios[-\w]*\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-request-header https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js 92 | ^https?://ios[-\w]*\.prod\.ftl\.netflix\.com/iosui/user/.+path=%5B%22videos%22%2C%\d+%22%2C%22summary%22%5D url script-response-body https://raw.githubusercontent.com/yichahucha/surge/master/nf_rating.js 93 | 94 | ################################# 95 | ################################# 96 | ################################# 97 | 98 | -------------------------------------------------------------------------------- /QuantumultX/Js_Remote_Cookie.conf: -------------------------------------------------------------------------------- 1 | # 此远程订阅用于解决QX任务脚本的cookie获取,仅适用于QX 1.0.10及更高版本,您可在使用后手动将其禁用,以避免无意义的MITM。 2 | 3 | hostname = passport.iqiyi.com, www.52pojie.cn, c.tieba.baidu.com, api.m.jd.com, ms.jr.jd.com, me-api.jd.com, passport.biligame.com, api.kkmh.com 4 | 5 | # 爱奇艺 cookie 6 | ^https:\/\/passport\.iqiyi\.com\/apis\/user\/info\.action url script-request-header https://raw.githubusercontent.com/NobyDa/Script/master/iQIYI-DailyBonus/iQIYI.js 7 | 8 | # 吾爱破解 cookie 9 | https:\/\/www\.52pojie\.cn\/home\.php\?mod=space url script-request-header https://raw.githubusercontent.com/NobyDa/Script/master/52pojie-DailyBonus/52pojie.js 10 | 11 | # 百度贴吧 cookie 12 | https?:\/\/(c\.tieba\.baidu\.com|180\.97\.\d+\.\d+)\/c\/s\/login url script-request-header https://raw.githubusercontent.com/NobyDa/Script/master/BDTieBa-DailyBonus/TieBa.js 13 | 14 | # 京东 cookie 15 | ^https:\/\/(api\.m|me-api)\.jd\.com\/(client\.action\?functionId=signBean|user_new\/info\/GetJDUserInfoUnion\?) url script-request-header https://raw.githubusercontent.com/NobyDa/Script/master/JD-DailyBonus/JD_DailyBonus.js 16 | ^https:\/\/ms\.jr\.jd\.com\/gw\/generic\/hy\/h5\/m\/appSign\? url script-request-body https://raw.githubusercontent.com/NobyDa/Script/master/JD-DailyBonus/JD_DailyBonus.js 17 | 18 | # 哔哩哔哩漫画 Get cookie 19 | ^https:\/\/passport\.biligame\.com\/api\/login\/sso.+?version%22%3A%22(3|4|5) url script-request-header https://raw.githubusercontent.com/NobyDa/Script/master/Bilibili-DailyBonus/Manga.js 20 | 21 | # 快看漫画 cookie 22 | ^https:\/\/api\.kkmh\.com\/v\d\/passport\/user url script-request-header https://raw.githubusercontent.com/NobyDa/Script/master/KuaiKan-DailyBonus/KKMH.js -------------------------------------------------------------------------------- /QuantumultX/TestFlightDownload.conf: -------------------------------------------------------------------------------- 1 | # 该订阅仅适用于QuantumultX, 用于更新TestFlight App时, 提示"APP不可用"问题. 解除区域限制. 2 | 3 | hostname = testflight.apple.com 4 | 5 | ^https?:\/\/testflight\.apple\.com\/v\d\/accounts\/.+?\/install$ url script-request-body https://gist.githubusercontent.com/NobyDa/9be418b93afc5e9c8a8f4d28ae403cf2/raw/TF_Download.js -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## TOC 2 | - [Script desc](#script-desc) 3 | - [Daily bonus scripts](#daily-bonus-scripts) 4 | - [Functionality-enhancing scripts](#functionality-enhancing-scripts) 5 | - [Other scripts](#other-scripts) 6 | - [Surge file desc](#surge-file-desc) 7 | - [Surge ruleset](#surge-ruleset) 8 | - [Surge module](#surge-module) 9 | - [QuantumultX file desc](#quantumultx--file-desc) 10 | - [Loon file desc](#loon-file-desc) 11 | - [Disclaimer](#disclaimer) 12 | - [Decrypt](#decrypt) 13 | - [Privacy](#privacy) 14 | - [Commercial](#commercial) 15 | - [Nfringement](#nfringement) 16 | - [Liability](#liability) 17 | - [Change](#change) 18 | - [Special thanks to](#special-thanks-to) 19 | - [License](#license) 20 | 21 | 22 | 23 | > **Please note that the scripts or rewrite rules described below need to open MITM and trust the certificate.** 24 | 25 | ## Script desc 26 | 27 | ### Daily bonus scripts 28 | 29 | | Application | Script name | Available | Maintenance | 30 | | :-----------------------------------------------------: | :----------------------------------------------------------: | :----------: | :---------: | 31 | | [京东商城](https://apps.apple.com/app/id414245413) | [JD_DailyBonus.js](https://github.com/NobyDa/Script/blob/master/JD-DailyBonus/JD_DailyBonus.js) | ✅(2021.7.4) | ✅ | 32 | | [百度贴吧](https://apps.apple.com/app/id477927812) | [TieBa.js](https://github.com/NobyDa/Script/blob/master/BDTieBa-DailyBonus/TieBa.js) | ✅(2021.7.4) | ❌ | 33 | | [吾爱破解](https://www.52pojie.cn/) | [52pojie.js](https://github.com/NobyDa/Script/blob/master/52pojie-DailyBonus/52pojie.js) | ❌(2021.11) | ❌ | 34 | | [爱奇艺](https://apps.apple.com/cn/app/id393765873) | [iQIYI.js](https://github.com/NobyDa/Script/blob/master/iQIYI-DailyBonus/iQIYI.js) | ✅(2022.1.26) | ❌ | 35 | | [快看漫画](https://apps.apple.com/app/id906936224) | [KKMH.js](https://github.com/NobyDa/Script/blob/master/KuaiKan-DailyBonus/KKMH.js) | ✅(2022.1.26) | ✅ | 36 | | [哔哩哔哩漫画](https://apps.apple.com/app/id1426252715) | [Manga.js](https://github.com/NobyDa/Script/blob/master/Bilibili-DailyBonus/Manga.js) | ✅(2022.1.26) | ✅ | 37 | | [巴哈姆特](https://www.gamer.com.tw/) | [BahamutDailyBonus.js](https://github.com/NobyDa/Script/blob/master/Bahamut/BahamutDailyBonus.js) | ✅(2022.1.26) | ✅ | 38 | 39 | ------ 40 | 41 | ### Functionality-enhancing scripts 42 | 43 | | Script name | Main Functions | Maintenance | 44 | | :----------------------------------------------------------: | :----------------------------------------------------------: | :---------: | 45 | | [PolicySwitch.js](https://github.com/NobyDa/Script/blob/master/Shortcuts/PolicySwitch.js) | Switch [QX](https://apps.apple.com/app/id1443988620),[Surge](https://apps.apple.com/app/id1442620678),[Loon](https://apps.apple.com/app/id1373567447) policy groups using ios [shortcut](https://apps.apple.com/app/id1462947752). | ✅ | 46 | | [DataQuery.js](https://github.com/NobyDa/Script/blob/master/Sub-store-parser/DataQuery.js) | Server(VPN) traffic query based on [Sub-Store](https://github.com/Peng-YM/Sub-Store). | ✅ | 47 | | [Bili_Auto_Regions.js](https://github.com/NobyDa/Script/blob/master/Surge/JS/Bili_Auto_Regions.js) | [Bilibili anime](https://apps.apple.com/cn/app/id736536022) auto switch region & show [douban](https://www.douban.com/) rating. | ✅ | 48 | | [ExchangePoints.js](https://github.com/NobyDa/Script/blob/master/Bilibili-DailyBonus/ExchangePoints.js) | [Bilibili manga](https://apps.apple.com/app/id1426252715) points mall auto snap up. | ✅ | 49 | 50 | --- 51 | 52 | 53 | 54 | ### Other scripts 55 | 56 | | Application | Script name | Main Functions | Available | Maintenance | 57 | | :----------------------------------------------------------: | :----------------------------------------------------------: | :---------------------: | :---------: | :---------: | 58 | | [Bigshot](https://apps.apple.com/app/id1274910157) | [dapian.js](https://github.com/NobyDa/Script/blob/master/QuantumultX/File/dapian.js) | Unlock membership | ✅(2021.7.3) | ❌ | 59 | | [VSCO](https://apps.apple.com/app/id588013838) | [vsco.js](https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/File/vsco.js) | Unlock membership | ✅(2021.7.3) | ✅ | 60 | | [JibJab](https://apps.apple.com/app/id875561136) | [jibjab.js](https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/jibjab.js) | Unlock membership | ✅(2021.7.3) | ❌ | 61 | | [NiChi](https://apps.apple.com/app/id1442041390) | [NiChi.js](https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/NiChi.js) | Unlock material pack | ✅(2021.7.3) | ❌ | 62 | | [美易Picsart](https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/PicsArt.js) | [PicsArt.js](https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/PicsArt.js) | Unlock membership | ✅(2021.7.3) | ✅ | 63 | | [MIX滤镜大师](https://apps.apple.com/app/id913947918) | [MIX.js](https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/MIX.js) | Unlock in-app purchases | ✅(2021.7.6) | ❌ | 64 | | [Polarr 泼辣](https://apps.apple.com/app/id988173374) | [Polarr.js](https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/Polarr.js) | Unlock in-app purchases | ✅(2021.7.6) | ❌ | 65 | | [小影VivaVideo](https://apps.apple.com/app/id738897668) | [vivavideo.js](https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/vivavideo.js) | Unlock membership | ✅(2021.7.3) | ❌ | 66 | | [CamScanner](https://apps.apple.com/app/id388627783) | [CamScanner.js](https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/CamScanner.js) | Unlock some benefits | ❌ | ❌ | 67 | | [酷我音乐](https://apps.apple.com/cn/app/id588673713) | [Kuwo.js](https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/Kuwo.js) | Unlock vip listen | ✅(2021.7.3) | ❌ | 68 | | [知音漫客](https://apps.apple.com/app/id1012491820) | [Zymh.js](https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/File/Zymh.js) | Unlock vip chapters | ✅(2021.7.3) | ✅ | 69 | | [91短视频](http://download.91porn.love/) | [91.js](https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/File/91.js) | Unlock membership | ✅(2021.7.3) | ❌ | 70 | | [香蕉视频](https://www.aa2.app) | [xjsp.js](https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/File/xjsp.js) | Unlock membership | ✅(2021.7.3) | ❌ | 71 | | [爱美剧](https://www.mjapp.cc) | [aimeiju.js](https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/File/aimeiju.js) | Unlock membership | ✅(2021.7.3) | ❌ | 72 | | [网易蜗牛读书](https://apps.apple.com/app/id1127249355) | [wnyd.js](https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/File/wnyd.js) | Unlock membership | ✅(2021.7.3) | ❌ | 73 | | [陆琪讲故事](https://apps.apple.com/app/id1435575842) | [luqi.js](https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/luqi.js) | Unlock radio | ✅(2021.7.3) | ❌ | 74 | | [WPS Office](https://apps.apple.com/app/id1491101673) | [Wps.js](https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/Wps.js) | Unlock membership | ✅(2021.7.3) | ❌ | 75 | | [百度网盘](https://apps.apple.com/app/id547166701) | [BaiduCloud.js](https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/BaiduCloud.js) | Unlock video speed | ✅(2021.7.6) | ❌ | 76 | | [WeChat](https://apps.apple.com/app/id414478124) | [Wechat.js](https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/File/Wechat.js) | Remove ads | ✅(2021.7.3) | ❌ | 77 | | [皮皮虾](https://apps.apple.com/cn/app/id1393912676) | [Super.js](https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/Super.js) | Remove ads | ✅(2021.7.3) | ❌ | 78 | 79 | --- 80 | 81 | 82 | 83 | ## Surge file desc 84 | 85 | ### Surge ruleset 86 | 87 | | File name | Number | Integrate | Desc | Maintenance | 88 | | :----------------------------------------------------------: | :----: | :----------------------------------------------------------: | :-------------------------------: | :---------: | 89 | | [AdRule.list](https://raw.githubusercontent.com/NobyDa/Script/master/Surge/AdRule.list) | 8000+ | [lhie1](https://github.com/lhie1/Rules), [ConnersHua](https://github.com/ConnersHua/Profiles) | Private ad ruleset | ❌ | 90 | | [AdRuleTest.list](https://raw.githubusercontent.com/NobyDa/Script/master/Surge/AdRuleTest.list) | 1300+ | [Scomper](https://github.com/scomper/Surge) | Private ad ruleset (test only). | ❌ | 91 | | [WeChat.list](https://raw.githubusercontent.com/NobyDa/Script/master/Surge/WeChat.list) | 180+ | N/A | WeChat ruleset (china) | ✅ | 92 | | [Apple.list](https://raw.githubusercontent.com/NobyDa/Script/master/Surge/Apple.list) | 60+ | N/A | Apple ruleset (global) | ✅ | 93 | | [Download.list](https://raw.githubusercontent.com/NobyDa/Script/master/Surge/Download.list) | 15+ | N/A | Some BT, Thunder, download rules. | ❌ | 94 | 95 | ### Surge module 96 | 97 | | Module name | Desc | Maintenance | 98 | | :----------------------------------------------------------: | :----------------------------------------------------------: | :---------: | 99 | | [RewriteRules.sgmodule](https://raw.githubusercontent.com/NobyDa/Script/master/Surge/Module/RewriteRules.sgmodule) | Private ad rewrite rules, integrate [lhie1](https://github.com/lhie1/Rules)、[ConnersHua](https://github.com/ConnersHua/Profiles)、[onewayticket255](https://github.com/onewayticket255/Surge-Script) and [Choler](https://github.com/Choler/Surge/tree/master/Ruleset). | ❌ | 100 | | [HuiJuDongManAds.sgmodule](https://raw.githubusercontent.com/NobyDa/Script/master/Surge/Module/HuiJuDongManAds.sgmodule) | Please see the desc in module. | ✅ | 101 | | [IPA_install.sgmodule](https://raw.githubusercontent.com/NobyDa/Script/master/Surge/Module/IPA_install.sgmodule) | Use Surge to assist in install IPA (signed version) | ❌ | 102 | | [TestFlightDownload.sgmodule](https://raw.githubusercontent.com/NobyDa/Script/master/Surge/Module/TestFlightDownload.sgmodule) | Please see the desc in module. | ✅ | 103 | | [GetCookie.sgmodule](https://raw.githubusercontent.com/NobyDa/Script/master/Surge/Module/GetCookie.sgmodule) | Please see the desc in module. | ✅ | 104 | 105 | --- 106 | 107 | ## QuantumultX file desc 108 | 109 | | Name | Integrate | Number | Desc | Type | Maintenance | 110 | | :----------------------------------------------------------: | :----------------------------------------------------------: | :----: | :---------------------------: | :-----: | :---------: | 111 | | [AdRule.list](https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/AdRule.list) | [lhie1](https://github.com/lhie1/Rules) | 7000+ | Private ad rules. | Rule | ❌ | 112 | | [AdRuleTest.list](https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/AdRuleTest.list) | [Scomper](https://github.com/scomper/Surge) | 1300+ | Private ad rules (test only). | Rule | ❌ | 113 | | [Rewrite_lhie1.conf](https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/Rewrite_lhie1.conf) | [lhie1](https://github.com/lhie1/Rules)、[onewayticket255](https://github.com/onewayticket255/Surge-Script)、[Choler](https://github.com/Choler/Surge/tree/master/Ruleset) | 400+ | Private rewrite rules. | Rewrite | ❌ | 114 | | [Js.conf](https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/Js.conf) | N/A | N/A | Remote script subscription. | Rewrite | ✅ | 115 | | [Js_Remote_Cookie.conf](https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/Js_Remote_Cookie.conf) | N/A | N/A | Please see the desc in file. | Rewrite | ✅ | 116 | | [TestFlightDownload.conf](https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/TestFlightDownload.conf) | N/A | N/A | Please see the desc in file. | Rewrite | ✅ | 117 | 118 | Rules of type "Rule" include only ad hosts. Please select the REJECT policy. 119 | 120 | 121 |
Difference between QuantumultX versions (Click to view) 122 | 123 | * AppStore version QX1.0.0 (120) This version is the initial version, JS function is unlimited. 124 | * AppStore version QX1.0.1 (130) This version adds support V2Ray(protocols), but restricts the keywords of the script VIP type. 125 | 126 | * AppStore version QX1.0.2 (136) This version adds support HTTP(protocols) and relaxes certain script keyword restrictions, but restricts script remote subscriptions 127 | * AppStore version QX1.0.3 (155) This version removes the keyword restriction and restores the script remote subscription, however, the remote script needs to comment the device ID before execution. 128 | * AppStore version QX1.0.4 (164) This version completely restricts remote script subscriptions, meaning that all scripts can only use local paths. 129 | * AppStore version QX1.0.5 (192) This version adds a timed script task function. 130 | * AppStore version QX1.0.6 (212) This version supports modifying HTTP request body, and replaying HTTP request. 131 | * AppStore version QX1.0.7 (240) This version supports TLS 1.3 (TLS-based proxy protocol), and Trojan(protocols). 132 | * ... 133 | * AppStore version QX1.0.10 (313) In this version, script remote subscription has been restored. 134 | 135 | QX1.0.3 add device ID, a simple example: 136 | 137 | ```ini 138 | /** 139 | * @supported 23AD6B11CD4B 140 | */ 141 | 142 | let obj = JSON.parse($response.body) 143 | obj["example"] = 0; 144 | $done({body:JSON.stringify(obj)}) 145 | ``` 146 | 147 | The above random generated device ID can be found at the bottom of Quantumult X additional menu, and it may change after system restore. 148 | 149 |
150 | 151 | --- 152 | 153 | ## Loon file desc 154 | 155 | | File name | Desc | Type | Maintenance | 156 | | :----------------------------------------------------------: | :-----------------------------: | :------------------: | :---------: | 157 | | [Loon_GetCookie.conf](https://raw.githubusercontent.com/NobyDa/Script/master/Loon/Loon_GetCookie.conf) | Please see the desc in file. | Subscription scripts | ✅ | 158 | | [Loon_GetTask.conf](https://raw.githubusercontent.com/NobyDa/Script/master/Loon/Loon_GetTask.conf) | Timed script task subscription. | Subscription scripts | ✅ | 159 | | [Loon_TF_Download.conf](https://raw.githubusercontent.com/NobyDa/Script/master/Loon/Loon_TF_Download.conf) | Please see the desc in file. | Subscription scripts | ✅ | 160 | 161 | 162 | 163 | --- 164 | 165 | ## Disclaimer 166 | 167 | ``` 168 | In the following disclaimer : 169 | 170 | "Script project" specifically refers to the open source scripts and rules in https://github.com/NobyDa/Script/tree/master 171 | 172 | "NobyDa" specifically refers to the author and owner in https://github.com/NobyDa/Script/tree/master 173 | ``` 174 | 175 | ### Decrypt 176 | 177 | 1. Any unlocking and decryption analysis scripts involved in the "Script project" are for resource sharing and study purposes only. 178 | 179 | 2. Legality, accuracy, completeness, and validity cannot be guaranteed. **Please judge for yourself based on the actual situation.** 180 | 181 | 3. You must completely delete the scripts involving decryption from your computer or phone within **24 hours** of downloading. 182 | 183 | ### Privacy 184 | 185 | 1. Any user who indirectly uses any of the scripts in the "Script project", including but not limited to violating relevant laws and regulations or establishing VPS to spread, **NobyDa is not responsible for any privacy leakage or other consequences caused by this.** 186 | 187 | ### Commercial 188 | 189 | 1. Do not use any scripts of the "Script project" for commercial or illegal purposes, **otherwise you will be responsible for the consequences.** 190 | 191 | ### Nfringement 192 | 193 | 1. If any company or individual believes that a scripts from "Script project" may be infringe on rights, you should promptly notify and provide proof of **identity** and **ownership**, and we will delete the scripts after receiving the relevant documents. 194 | 195 | ### Liability 196 | 197 | 1. NobyDa is not responsible for any scripts problems, **including but not limited to any loss or damage caused by any scripting errors.** 198 | 199 | ### Change 200 | 201 | 1. Anyone viewing or using the scripts of the "Script project" in any way, directly or indirectly, should read this statement carefully. And NobyDa reserves the right to change or supplement this disclaimer at any time. 202 | 203 | 2. **Once you use or copy any related scripts of the "Script project", you will be deemed to have accepted this disclaimer.** 204 | 205 | ## Special thanks to 206 | 207 | * [@sazs34](https://github.com/sazs34) 208 | * [@lhie1](https://github.com/lhie1) 209 | * [@Scomper](https://github.com/scomper) 210 | * [@onewayticket255](https://github.com/onewayticket255) 211 | * [@Choler](https://github.com/Choler) 212 | * [@ConnersHua](https://github.com/ConnersHua) 213 | 214 | ## License 215 | 216 | [GPLv3](LICENSE) 217 | -------------------------------------------------------------------------------- /Shortcuts/PolicySwitch.js: -------------------------------------------------------------------------------- 1 | /* 2 | 捷径策略切换脚本, 该脚本需与捷径配合使用. 3 | 4 | 脚本兼容: Surge4.7, QuanX1.0.22(545+), Loon2.1.10(290+) 5 | 捷径地址: https://www.icloud.com/shortcuts/0f5b9a825cad47488a78ff2876b822dd 6 | 7 | 脚本配置: 8 | -----------Surge------------ 9 | [Script] 10 | 捷径策略切换 = type=http-request,pattern=^http:\/\/nobyda\.policy,requires-body=1,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/Shortcuts/PolicySwitch.js 11 | 12 | --------QuantumuitX--------- 13 | [rewrite_local] 14 | ^http:\/\/nobyda\.policy url script-analyze-echo-response https://raw.githubusercontent.com/NobyDa/Script/master/Shortcuts/PolicySwitch.js 15 | 16 | ------------Loon------------ 17 | [Script] 18 | http-request ^http:\/\/nobyda\.policy script-path=https://raw.githubusercontent.com/NobyDa/Script/master/Shortcuts/PolicySwitch.js, requires-body=true, tag=捷径策略切换 19 | 20 | ---------------------------- 21 | */ 22 | 23 | const $ = new nobyda(); 24 | const url = $request.url; 25 | const body = JSON.parse($request.body || '{}'); 26 | 27 | (async function SwitchPoliy() { 28 | let res = {}; 29 | if (/\/getGroup$/.test(url)) 30 | res.group = await $.getGroup(); 31 | if (/\/getPolicy$/.test(url)) 32 | res.policy = await $.getPolicy(body.group); 33 | if (/\/setPolicy$/.test(url)) 34 | res.success = await $.setPolicy(body.group, body.policy); 35 | $.done(res); 36 | })() 37 | 38 | function nobyda() { 39 | const isLoon = typeof($loon) !== "undefined" && $loon > 289; 40 | const isQuanX = typeof($configuration) !== 'undefined'; 41 | const isSurge = typeof($httpAPI) !== 'undefined'; 42 | const m = `不支持您的APP版本, 请等待APP更新 ⚠️`; 43 | this.getGroup = () => { 44 | if (isSurge) { 45 | return new Promise((resolve) => { 46 | $httpAPI("GET", "v1/policies", {}, (b) => resolve(b['policy-groups'])) 47 | }) 48 | } 49 | if (isLoon) { 50 | const getName = JSON.parse($config.getConfig()); 51 | return getName['all_policy_groups']; 52 | } 53 | if (isQuanX) { 54 | return new Promise((resolve) => { 55 | $configuration.sendMessage({ 56 | action: "get_customized_policy" 57 | }).then(b => { 58 | if (b.ret) { 59 | resolve(Object.keys(b.ret).filter(s => b.ret[s].type == "static")); 60 | } else resolve(); 61 | }, () => resolve()); 62 | }) 63 | } 64 | return m; 65 | } 66 | this.getPolicy = (groupName) => { 67 | if (isSurge) { 68 | return new Promise((resolve) => { 69 | $httpAPI("GET", "v1/policy_groups", {}, (b) => { 70 | resolve(b[groupName].map(g => g.name)) 71 | }) 72 | }) 73 | } 74 | if (isLoon) { 75 | return new Promise((resolve) => { 76 | $config.getSubPolicys(groupName, (b) => { 77 | const get = JSON.parse(b || '[]').map(n => n.name); 78 | resolve(get) 79 | }) 80 | }) 81 | } 82 | if (isQuanX) { 83 | return new Promise((resolve) => { 84 | $configuration.sendMessage({ 85 | action: "get_customized_policy", 86 | content: groupName 87 | }).then(b => { 88 | if (b.ret && b.ret[groupName]) { 89 | resolve(b.ret[groupName].candidates); 90 | } else resolve(); 91 | }, () => resolve()); 92 | }) 93 | } 94 | return m; 95 | } 96 | this.setPolicy = (group, policy) => { 97 | if (isSurge) { 98 | return new Promise((resolve) => { 99 | $httpAPI("POST", "v1/policy_groups/select", { 100 | group_name: group, 101 | policy: policy 102 | }, (b) => resolve(!b.error)) 103 | }) 104 | } 105 | if (isLoon) { 106 | const set = $config.setSelectPolicy(group, policy); 107 | return set; 108 | } 109 | if (isQuanX) { 110 | return new Promise((resolve) => { 111 | $configuration.sendMessage({ 112 | action: "set_policy_state", 113 | content: { 114 | [group]: policy 115 | } 116 | }).then((b) => resolve(!b.error), () => resolve()); 117 | }) 118 | } 119 | return m; 120 | } 121 | this.done = (body) => { 122 | const e = { 123 | response: { 124 | body: JSON.stringify(body) 125 | } 126 | }; 127 | $done(typeof($task) != "undefined" ? e.response : e); 128 | } 129 | } -------------------------------------------------------------------------------- /Sub-store-parser/DataQuery.js: -------------------------------------------------------------------------------- 1 | /****************************** 2 | 3 | Sub-Store外置流量查询脚本 4 | 5 | 该脚本基于Sub-Store, 可解决APP使用Sub-Store链接后, 没有流量通知的问题. 使用前需确认您的机场订阅是否支持流量信息. (注:节点名流量信息暂不支持) 6 | Sub-Store订阅管理器: https://github.com/Peng-YM/Sub-Store 7 | 8 | 测试兼容: QuantumultX, Surge, Loon. 9 | 使用方法: 打开Sub-Store => 订阅 => 编辑 => 节点操作+ => 脚本操作 => 填入脚本链接或粘贴脚本 => 保存 10 | 11 | 您的APP更新Sub-Store订阅链接时, 将自动发送流量通知. 12 | 13 | 脚本链接: https://raw.githubusercontent.com/NobyDa/Script/master/Sub-store-parser/DataQuery.js 14 | 15 | ******************************/ 16 | 17 | function operator(proxies) { 18 | try { 19 | if ($request.headers["User-Agent"].match(/Quantumult|Surge|Loon|Decar/) && !$.raw_Name) { 20 | const rawInfo = $.read('subs'); 21 | const readName = $.read('collections'); 22 | const subtag = $request.url.match(/download\/(collection\/)?([\w-_]*)/)[2]; 23 | if ($request.url.match(/\/collection\//)) { //collection subscription. 24 | const isOpen = readName[subtag].process.map(o => o.type).indexOf("Script Operator") != -1; 25 | for (var i = 0; i < readName[subtag].subscriptions.length; i++) { 26 | $.raw_Name = readName[subtag].subscriptions[i]; 27 | if (!isOpen) break; //prevent queries in certain cases. 28 | AllSubs(rawInfo[$.raw_Name].url, $.raw_Name); 29 | } 30 | } else { //single subscription. 31 | $.raw_Name = rawInfo[subtag].name; 32 | AllSubs(rawInfo[subtag].url, $.raw_Name); 33 | } 34 | } 35 | } catch (err) { 36 | $.error(`\n🔹 订阅昵称:「 ${$.raw_Name||'未知'} 」\n🔺 查询失败:「 ${err.message||err} 」`); 37 | } finally { 38 | return proxies; 39 | } 40 | } 41 | 42 | async function AllSubs(subsUrl, subsName) { 43 | try { //reference to https://github.com/KOP-XIAO/QuantumultX/blob/master/Scripts/resource-parser.js 44 | var resp = await $.http.get(subsUrl); 45 | var sinfo = JSON.stringify(resp.headers || '').replace(/ /g, "").toLowerCase(); 46 | if (sinfo.indexOf("total=") == -1 || sinfo.indexOf("download=") == -1) throw new Error('该订阅不包含流量信息'); 47 | var total = (parseFloat(sinfo.split("total=")[1].split(",")[0]) / (1024 ** 3)).toFixed(0); 48 | var usd = ((parseFloat(sinfo.indexOf("upload") != -1 ? sinfo.split("upload=")[1].split(",")[0] : "0") + parseFloat(sinfo.split("download=")[1].split(",")[0])) / (1024 ** 3)).toFixed(2); 49 | var left = ((parseFloat(sinfo.split("total=")[1].split(",")[0]) / (1024 ** 3)) - ((parseFloat(sinfo.indexOf("upload") != -1 ? sinfo.split("upload=")[1].split(",")[0] : "0") + parseFloat(sinfo.split("download=")[1].split(",")[0])) / (1024 ** 3))).toFixed(2); 50 | if (sinfo.indexOf("expire=") != -1) { 51 | var epr = new Date(parseFloat(sinfo.split("expire=")[1].split(",")[0]) * 1000); 52 | var year = epr.getFullYear(); 53 | var mth = epr.getMonth() + 1 < 10 ? '0' + (epr.getMonth() + 1) : (epr.getMonth() + 1); 54 | var day = epr.getDate() < 10 ? "0" + (epr.getDate()) : epr.getDate(); 55 | var epr = `🔹 过期时间:「 ${year}-${mth}-${day} 」`; 56 | } else { 57 | var epr = ""; 58 | } 59 | $.notify(`🔹 订阅昵称:「 ${subsName} 」`, epr, `🔸 已用流量:「 ${usd} GB 」\n🔸 剩余流量:「 ${left} GB 」`); 60 | } catch (er) { 61 | $.error(`\n🔹 订阅昵称:「 ${subsName} 」\n🔺 查询失败:「 ${er.message||er} 」`); 62 | } 63 | } -------------------------------------------------------------------------------- /Surge/Apple.list: -------------------------------------------------------------------------------- 1 | # This ruleset includes 99% of apple inc network connections(global). If there are any missing, please PR. 2 | 3 | DOMAIN-SUFFIX,apple.co 4 | DOMAIN-SUFFIX,apple.cn 5 | DOMAIN-SUFFIX,apple.com 6 | DOMAIN-SUFFIX,apple.com.cn 7 | DOMAIN-SUFFIX,apple.com.cdn20.com 8 | DOMAIN-SUFFIX,apple.com.mwcloudcdn.com 9 | DOMAIN-SUFFIX,apple.com.mwcname.com 10 | DOMAIN-SUFFIX,apple.news 11 | DOMAIN-SUFFIX,appsto.re 12 | DOMAIN-SUFFIX,appstore.com 13 | DOMAIN-SUFFIX,cdn-apple.com 14 | DOMAIN-SUFFIX,apple-cloudkit.com 15 | DOMAIN-SUFFIX,apple-dns.net 16 | DOMAIN-SUFFIX,apple-livephotoskit.com 17 | DOMAIN-SUFFIX,apple-mapkit.com 18 | DOMAIN-SUFFIX,itunes.com.edgekey.net 19 | DOMAIN-SUFFIX,apple.com.edgekey.net 20 | DOMAIN-SUFFIX,apple-support.akadns.net 21 | DOMAIN-SUFFIX,apple.com.edgekey.net.globalredir.akadns.net 22 | DOMAIN-SUFFIX,aaplimg.com 23 | DOMAIN-SUFFIX,crashlytics.com 24 | DOMAIN-SUFFIX,digicert.com 25 | DOMAIN-SUFFIX,itunes.com 26 | DOMAIN-SUFFIX,me.com 27 | DOMAIN-SUFFIX,mzstatic.com 28 | DOMAIN-SUFFIX,apple 29 | 30 | DOMAIN,apple.comscoreresearch.com 31 | 32 | DOMAIN-KEYWORD,icloud 33 | DOMAIN-KEYWORD,testflight 34 | DOMAIN-KEYWORD,apple.com.akadns.net 35 | 36 | IP-CIDR,139.178.128.0/18,no-resolve 37 | IP-CIDR,144.178.0.0/19,no-resolve 38 | IP-CIDR,144.178.36.0/22,no-resolve 39 | IP-CIDR,144.178.48.0/20,no-resolve 40 | IP-CIDR,192.35.50.0/24,no-resolve 41 | IP-CIDR,198.183.17.0/24,no-resolve 42 | IP-CIDR,205.180.175.0/24,no-resolve 43 | IP-CIDR,63.92.224.0/19,no-resolve 44 | IP-CIDR,65.199.22.0/23,no-resolve 45 | IP-CIDR,17.0.0.0/8,no-resolve 46 | IP-CIDR6,2403:300::/32,no-resolve 47 | IP-CIDR6,2620:149::/32,no-resolve 48 | IP-CIDR6,2a01:b740::/32,no-resolve 49 | IP-CIDR6,2a01:b747::/32,no-resolve 50 | 51 | 52 | USER-AGENT,%E5%9C%B0%E5%9B%BE* 53 | USER-AGENT,%E6%9F%A5%E6%89%BE* 54 | USER-AGENT,%E8%AE%BE%E7%BD%AE* 55 | USER-AGENT,*WeatherFoundation* 56 | USER-AGENT,*com.apple.mobileme.fmip1* 57 | USER-AGENT,AppStore* 58 | USER-AGENT,AppleNews* 59 | USER-AGENT,AppleTV* 60 | USER-AGENT,FMDClient* 61 | USER-AGENT,FMFD* 62 | USER-AGENT,FindMy* 63 | USER-AGENT,Maps* 64 | USER-AGENT,Music* 65 | USER-AGENT,TestFlight* 66 | USER-AGENT,com.apple.Maps* 67 | USER-AGENT,com.apple.appstored* 68 | USER-AGENT,com.apple.geod* 69 | USER-AGENT,com.apple.news* 70 | USER-AGENT,com.apple.trustd* 71 | USER-AGENT,com.apple.tv* 72 | USER-AGENT,fmflocatord* 73 | USER-AGENT,geod* 74 | USER-AGENT,locationd* -------------------------------------------------------------------------------- /Surge/Download.list: -------------------------------------------------------------------------------- 1 | # Mac Download 2 | PROCESS-NAME,aria2c 3 | PROCESS-NAME,fdm 4 | PROCESS-NAME,Folx 5 | PROCESS-NAME,NetTransport 6 | PROCESS-NAME,Thunder 7 | PROCESS-NAME,Transmission 8 | PROCESS-NAME,uTorrent 9 | PROCESS-NAME,WebTorrent 10 | PROCESS-NAME,WebTorrent Helper 11 | PROCESS-NAME,DownloadService 12 | PROCESS-NAME,Weiyun 13 | 14 | # bt 15 | DOMAIN-KEYWORD,aria2 16 | DOMAIN-KEYWORD,xunlei 17 | DOMAIN-KEYWORD,yunpan 18 | DOMAIN-KEYWORD,Thunder 19 | DOMAIN-KEYWORD,XLLiveUD 20 | URL-REGEX,(torrent|announce.php\?passkey=|tracker|BitTorrent|bt_key|ed2k|find_node|get_peers|info_hash|magnet:|peer_id=) 21 | -------------------------------------------------------------------------------- /Surge/JS/BaiduCloud.js: -------------------------------------------------------------------------------- 1 | /* 2 | 百度网盘 解锁在线视频倍率/清晰度 3 | 4 | *************************** 5 | QuantumultX: 6 | 7 | [rewrite_local] 8 | https:\/\/pan\.baidu\.com\/rest\/\d\.\d\/membership\/user url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/BaiduCloud.js 9 | 10 | [mitm] 11 | hostname = pan.baidu.com 12 | 13 | *************************** 14 | Surge4 or Loon: 15 | 16 | [Script] 17 | http-response https:\/\/pan\.baidu\.com\/rest\/\d\.\d\/membership\/user requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/BaiduCloud.js 18 | 19 | [MITM] 20 | hostname = pan.baidu.com 21 | 22 | **************************/ 23 | 24 | if ($response.body) { 25 | $done({ 26 | body: JSON.stringify({ 27 | "product_infos": [{ 28 | "product_id": "5310897792128633390", 29 | "start_time": 1417260485, 30 | "end_time": 2147483648, 31 | "buy_time": "1417260485", 32 | "cluster": "offlinedl", 33 | "detail_cluster": "offlinedl", 34 | "product_name": "gz_telecom_exp" 35 | }, { 36 | "product_name": "svip2_nd", 37 | "product_description": "超级会员", 38 | "function_num": 0, 39 | "start_time": 1553702399, 40 | "buy_description": "", 41 | "buy_time": 0, 42 | "product_id": "1", 43 | "auto_upgrade_to_svip": 0, 44 | "end_time": 1672502399, 45 | "cluster": "vip", 46 | "detail_cluster": "svip", 47 | "status": 0 48 | }], 49 | "currenttime": 1573473597, 50 | "reminder": { 51 | "reminderWithContent": [], 52 | "advertiseContent": [] 53 | }, 54 | "request_id": 7501873289383874371 55 | }) 56 | }); 57 | } else { 58 | $done({}); 59 | } -------------------------------------------------------------------------------- /Surge/JS/Bili_Auto_Regions.js: -------------------------------------------------------------------------------- 1 | /************************** 2 | 3 | 哔哩哔哩, 港澳台番剧自动切换地区 & 显示豆瓣评分 4 | 5 | 如需禁用豆瓣评分或策略通知, 可前往BoxJs设置. 6 | BoxJs订阅地址: https://raw.githubusercontent.com/NobyDa/Script/master/NobyDa_BoxJs.json 7 | 8 | Update: 2022.01.26 9 | Author: @NobyDa 10 | Use: Surge, QuanX, Loon 11 | 12 | **************************** 13 | 港澳台自动切换地区说明 : 14 | **************************** 15 | 16 | 地区自动切换功能仅适用于Surge4.7+(iOS),Loon2.1.10(286)+,QuanX1.0.22(543)+ 17 | 低于以上版本仅显示豆瓣评分. 18 | 19 | 您需要配置相关规则集: 20 | Surge、Loon: 21 | https://raw.githubusercontent.com/DivineEngine/Profiles/master/Surge/Ruleset/StreamingMedia/StreamingSE.list 22 | 23 | QuanX: 24 | https://raw.githubusercontent.com/DivineEngine/Profiles/master/Quantumult/Filter/StreamingMedia/StreamingSE.list 25 | 26 | 绑定相关select或static策略组,并且需要具有相关的区域代理服务器纳入您的子策略中,子策略可以是服务器也可以是其他区域策略组. 27 | 最后,您可以通过BoxJs设置策略名和子策略名,或者手动填入脚本. 28 | 29 | 如需搜索指定地区番剧, 可在搜索框添加后缀" 港", " 台", " 中". 例如: 进击的巨人 港 30 | 31 | QX用户注: 使用切换地区功能请确保您的QX=>其他设置=>温和策略机制处于关闭状态, 以及填写策略名和子策略名时注意大小写. 32 | 33 | **************************** 34 | Surge 4.7+ 远程脚本配置 : 35 | **************************** 36 | [Script] 37 | Bili Region = type=http-response,pattern=^https:\/\/ap(p|i)\.bili(bili|api)\.(com|net)\/(pgc\/view\/v\d\/app\/season|x\/v\d\/search\/defaultwords)\?access_key,requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/Bili_Auto_Regions.js 38 | 39 | #可选, 适用于搜索指定地区的番剧 40 | Bili Search = type=http-request,pattern=^https:\/\/ap(p|i)\.bili(bili|api)\.(com|net)\/x\/v\d\/search(\/type)?\?.+?%20(%E6%B8%AF|%E5%8F%B0|%E4%B8%AD)&,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/Bili_Auto_Regions.js 41 | 42 | [MITM] 43 | hostname = ap?.bilibili.com, ap?.biliapi.net 44 | 45 | **************************** 46 | Quantumult X 远程脚本配置 : 47 | **************************** 48 | [rewrite_local] 49 | ^https:\/\/ap(p|i)\.bili(bili|api)\.(com|net)\/(pgc\/view\/v\d\/app\/season|x\/v\d\/search\/defaultwords)\?access_key url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/Bili_Auto_Regions.js 50 | 51 | #可选, 适用于搜索指定地区的番剧 52 | ^https:\/\/ap(p|i)\.bili(bili|api)\.(com|net)\/x\/v\d\/search(\/type)?\?.+?%20(%E6%B8%AF|%E5%8F%B0|%E4%B8%AD)& url script-request-header https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/Bili_Auto_Regions.js 53 | 54 | [mitm] 55 | hostname = ap?.bilibili.com, ap?.biliapi.net 56 | 57 | [filter_local] 58 | #可选, 由于qx纯tun特性, 不添加规则可能会导致脚本失效. 59 | ip-cidr, 203.107.1.1/24, reject 60 | 61 | **************************** 62 | Loon 远程脚本配置 : 63 | **************************** 64 | [Script] 65 | http-response ^https:\/\/ap(p|i)\.bili(bili|api)\.(com|net)\/(pgc\/view\/v\d\/app\/season|x\/v\d\/search\/defaultwords)\?access_key script-path=https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/Bili_Auto_Regions.js, requires-body=true, tag=bili自动地区 66 | 67 | #可选, 适用于搜索指定地区的番剧 68 | http-request ^https:\/\/ap(p|i)\.bili(bili|api)\.(com|net)\/x\/v\d\/search(\/type)?\?.+?%20(%E6%B8%AF|%E5%8F%B0|%E4%B8%AD)& script-path=https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/Bili_Auto_Regions.js, requires-body=true, tag=bili自动地区(搜索) 69 | 70 | [Mitm] 71 | hostname = ap?.bilibili.com, ap?.biliapi.net 72 | 73 | ***************************/ 74 | 75 | let $ = nobyda(); 76 | let run = EnvInfo(); 77 | 78 | async function SwitchRegion(play) { 79 | const Group = $.read('BiliArea_Policy') || '📺 DomesticMedia'; //Your blibli policy group name. 80 | const CN = $.read('BiliArea_CN') || 'DIRECT'; //Your China sub-policy name. 81 | const TW = $.read('BiliArea_TW') || '🇹🇼 sub-policy'; //Your Taiwan sub-policy name. 82 | const HK = $.read('BiliArea_HK') || '🇭🇰 sub-policy'; //Your HongKong sub-policy name. 83 | const DF = $.read('BiliArea_DF') || '🏁 sub-policy'; //Sub-policy name used after region is blocked(e.g. url 404) 84 | const off = $.read('BiliArea_disabled') || ''; //WiFi blacklist(disable region change), separated by commas. 85 | const current = await $.getPolicy(Group); 86 | const area = (() => { 87 | let select; 88 | if (/\u50c5[\u4e00-\u9fa5]+\u6e2f|%20%E6%B8%AF&/.test(play)) { 89 | const test = /\u50c5[\u4e00-\u9fa5]+\u53f0/.test(play); 90 | if (current != HK && (current == TW && test ? 0 : 1)) select = HK; 91 | } else if (/\u50c5[\u4e00-\u9fa5]+\u53f0|%20%E5%8F%B0&/.test(play)) { 92 | if (current != TW) select = TW; 93 | } else if (play === -404) { 94 | if (current != DF) select = DF; 95 | } else if (current != CN) { 96 | select = CN; 97 | } 98 | if ($.isQuanX && current === 'direct' && select === 'DIRECT') { 99 | select = null; //avoid loops in some cases 100 | } 101 | return select; 102 | })() 103 | 104 | if (area && !off.includes($.ssid || undefined)) { 105 | const change = await $.setPolicy(Group, area); 106 | const notify = $.read('BiliAreaNotify') === 'true'; 107 | const msg = SwitchStatus(change, current, area); 108 | if (!notify) { 109 | $.notify((/^(http|-404)/.test(play) || !play) ? `` : play, ``, msg); 110 | } else { 111 | console.log(`${(/^(http|-404)/.test(play)||!play)?``:play}\n${msg}`); 112 | } 113 | if (change) { 114 | return true; 115 | } 116 | } 117 | return false; 118 | } 119 | 120 | function SwitchStatus(status, original, newPolicy) { 121 | if (status && typeof original !== 'number') { 122 | return `${original} => ${newPolicy} => 🟢`; 123 | } else if (original === 2) { 124 | return `切换失败, 策略组名未填写或填写有误 ⚠️` 125 | } else if (original === 3) { 126 | return `切换失败, 不支持您的VPN应用版本 ⚠️` 127 | } else if (status === 0) { 128 | return `切换失败, 子策略名未填写或填写有误 ⚠️` 129 | } else { 130 | return `策略切换失败, 未知错误 ⚠️` 131 | } 132 | } 133 | 134 | function EnvInfo() { 135 | if (typeof($response) !== 'undefined') { 136 | const raw = JSON.parse($response.body); 137 | const data = raw.data || raw.result || {}; 138 | SwitchRegion(data.title || (raw.code === -404 ? -404 : null)) 139 | .then(s => s ? $done({ 140 | status: $.isQuanX ? "HTTP/1.1 408 Request Timeout" : 408, 141 | headers: { 142 | Connection: "close" 143 | }, 144 | body: "{}" 145 | }) : QueryRating(raw, data)); 146 | } else { 147 | const raw = $request.url; 148 | const res = { 149 | url: raw.replace(/%20(%E6%B8%AF|%E5%8F%B0|%E4%B8%AD)&/g, '&') 150 | }; 151 | SwitchRegion(raw).then(() => $done(res)); 152 | } 153 | } 154 | 155 | async function QueryRating(body, play) { 156 | try { 157 | const ratingEnabled = $.read('BiliDoubanRating') === 'false'; 158 | if (!ratingEnabled && play.title && body.data && body.data.badge_info) { 159 | const [t1, t2] = await Promise.all([ 160 | GetRawInfo(play.title), 161 | GetRawInfo(play.origin_name) 162 | ]); 163 | const exYear = body.data.publish.release_date_show.split(/^(\d{4})/)[1]; 164 | const info1 = (play.staff && play.staff.info) || ''; 165 | const info2 = (play.actor && play.actor.info) || ''; 166 | const info3 = (play.celebrity && play.celebrity.map(n => n.name).join('/')) || ''; 167 | const filterInfo = [play.title, play.origin_name, info1 + info2 + info3, exYear]; 168 | const [rating, folk, name, id, other] = ExtractMovieInfo([...t1, ...t2], filterInfo); 169 | const limit = JSON.stringify(body.data.modules) 170 | .replace(/"\u53d7\u9650"/g, `""`).replace(/("area_limit":)1/g, '$10'); 171 | body.data.modules = JSON.parse(limit); 172 | body.data.detail = body.data.new_ep.desc.replace(/连载中,/, ''); 173 | body.data.badge_info.text = `⭐️ 豆瓣:${!$.is403?`${rating||'无评'}分 (${folk||'无评价'})`:`查询频繁!`}`; 174 | body.data.evaluate = `${body.data.evaluate||''}\n\n豆瓣评分搜索结果: ${JSON.stringify(other,0,1)}`; 175 | body.data.new_ep.desc = name; 176 | body.data.styles.unshift({ 177 | name: "⭐️ 点击此处打开豆瓣剧集详情页", 178 | url: `https://m.douban.com/${id?`movie/subject/${id}/`:`search/?query=${encodeURI(play.title)}`}` 179 | }); 180 | } 181 | } catch (err) { 182 | console.log(`Douban rating: \n${err}\n`); 183 | } finally { 184 | $done({ 185 | body: JSON.stringify(body) 186 | }); 187 | } 188 | } 189 | 190 | function ExtractMovieInfo(ret, fv) { 191 | const sole = new Set(ret.map(s => JSON.stringify(s))); //delete duplicate 192 | const f1 = [...sole].map(p => JSON.parse(p)) 193 | .filter(t => { 194 | t.accuracy = 0; 195 | if (t.name && fv[0]) { //title 196 | if (t.name.includes(fv[0].slice(0, 4))) t.accuracy++; 197 | if (t.name.includes(fv[0].slice(-3))) t.accuracy++; 198 | } 199 | if (t.origin && fv[1]) { //origin title 200 | if (t.origin.includes(fv[1].slice(0, 4))) t.accuracy++; 201 | if (t.origin.includes(fv[1].slice(-3))) t.accuracy++; 202 | } 203 | if (t.pd && fv[2]) { //producer or actor 204 | const len = t.pd.split('/').filter(c => fv[2].includes(c)); 205 | t.accuracy += len.length; 206 | } 207 | if (t.year && fv[3] && t.year == fv[3]) t.accuracy++; //year 208 | return Boolean(t.accuracy); 209 | }); 210 | let x = {}; //assign most similar 211 | const f2 = f1.reduce((p, c) => c.accuracy > p ? (x = c, c.accuracy) : p, 0); 212 | return [x.rating, x.folk, x.name, x.id, f1]; 213 | } 214 | 215 | function GetRawInfo(t) { 216 | let res = []; 217 | let st = Date.now(); 218 | return new Promise((resolve) => { 219 | if (!t) return resolve(res); 220 | $.get({ 221 | url: `https://www.douban.com/search?cat=1002&q=${encodeURIComponent(t)}`, 222 | headers: { 223 | 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.3 Safari/605.1.15', 224 | 'Cookie': JSON.stringify(st) 225 | } 226 | }, (error, resp, data) => { 227 | if (error) { 228 | console.log(`Douban rating: \n${t}\nRequest error: ${error}\n`); 229 | } else { 230 | if (/\u767b\u5f55<\/a>\u540e\u91cd\u8bd5\u3002/.test(data)) $.is403 = true; 231 | let s = data.replace(/\n| |&#\d{2}/g, '') 232 | .match(/\[\u7535\u5f71\].+?subject-cast\">.+?<\/span>/g) || []; 233 | for (let i = 0; i < s.length; i++) { 234 | res.push({ 235 | name: s[i].split(/\}\)">(.+?)<\/a>/)[1], 236 | origin: s[i].split(/\u540d:(.+?)(\/|<)/)[1], 237 | pd: s[i].split(/\u539f\u540d.+?\/(.+?)\/\d+<\/span>$/)[1], 238 | rating: s[i].split(/">(\d\.\d)$/)[1] 242 | }) 243 | } 244 | let et = ((Date.now() - st) / 1000).toFixed(2); 245 | console.log(`Douban rating: \n${t}\n${res.length} movie info searched. (${et} s)\n`); 246 | } 247 | resolve(res); 248 | }) 249 | }) 250 | } 251 | 252 | function nobyda() { 253 | const isHTTP = typeof $httpClient != "undefined"; 254 | const isLoon = typeof $loon != "undefined"; 255 | const isQuanX = typeof $task != "undefined"; 256 | const isSurge = typeof $network != "undefined" && typeof $script != "undefined"; 257 | const ssid = (() => { 258 | if (isQuanX && typeof($environment) !== 'undefined') { 259 | return $environment.ssid; 260 | } 261 | if (isSurge && $network.wifi) { 262 | return $network.wifi.ssid; 263 | } 264 | if (isLoon) { 265 | return JSON.parse($config.getConfig()).ssid; 266 | } 267 | })(); 268 | const notify = (title, subtitle, message) => { 269 | console.log(`${title}\n${subtitle}\n${message}`); 270 | if (isQuanX) $notify(title, subtitle, message); 271 | if (isHTTP) $notification.post(title, subtitle, message); 272 | } 273 | const read = (key) => { 274 | if (isQuanX) return $prefs.valueForKey(key); 275 | if (isHTTP) return $persistentStore.read(key); 276 | } 277 | const adapterStatus = (response) => { 278 | if (!response) return null; 279 | if (response.status) { 280 | response["statusCode"] = response.status; 281 | } else if (response.statusCode) { 282 | response["status"] = response.statusCode; 283 | } 284 | return response; 285 | } 286 | const getPolicy = (groupName) => { 287 | if (isSurge) { 288 | if (typeof($httpAPI) === 'undefined') return 3; 289 | return new Promise((resolve) => { 290 | $httpAPI("GET", "v1/policy_groups/select", { 291 | group_name: encodeURIComponent(groupName) 292 | }, (b) => resolve(b.policy || 2)) 293 | }) 294 | } 295 | if (isLoon) { 296 | if (typeof($config.getPolicy) === 'undefined') return 3; 297 | const getName = $config.getPolicy(groupName); 298 | return getName || 2; 299 | } 300 | if (isQuanX) { 301 | if (typeof($configuration) === 'undefined') return 3; 302 | return new Promise((resolve) => { 303 | $configuration.sendMessage({ 304 | action: "get_policy_state" 305 | }).then(b => { 306 | if (b.ret && b.ret[groupName]) { 307 | resolve(b.ret[groupName][1]); 308 | } else resolve(2); 309 | }, () => resolve()); 310 | }) 311 | } 312 | } 313 | const setPolicy = (group, policy) => { 314 | if (isSurge && typeof($httpAPI) !== 'undefined') { 315 | return new Promise((resolve) => { 316 | $httpAPI("POST", "v1/policy_groups/select", { 317 | group_name: group, 318 | policy: policy 319 | }, (b) => resolve(!b.error || 0)) 320 | }) 321 | } 322 | if (isLoon && typeof($config.getPolicy) !== 'undefined') { 323 | const set = $config.setSelectPolicy(group, policy); 324 | return set || 0; 325 | } 326 | if (isQuanX && typeof($configuration) !== 'undefined') { 327 | return new Promise((resolve) => { 328 | $configuration.sendMessage({ 329 | action: "set_policy_state", 330 | content: { 331 | [group]: policy 332 | } 333 | }).then((b) => resolve(!b.error || 0), () => resolve()); 334 | }) 335 | } 336 | } 337 | const get = (options, callback) => { 338 | if (isQuanX) { 339 | options["method"] = "GET"; 340 | $task.fetch(options).then(response => { 341 | callback(null, adapterStatus(response), response.body) 342 | }, reason => callback(reason.error, null, null)) 343 | } 344 | if (isHTTP) { 345 | if (isSurge) options.headers['X-Surge-Skip-Scripting'] = false; 346 | $httpClient.get(options, (error, response, body) => { 347 | callback(error, adapterStatus(response), body) 348 | }) 349 | } 350 | } 351 | return { 352 | getPolicy, 353 | setPolicy, 354 | isSurge, 355 | isQuanX, 356 | isLoon, 357 | notify, 358 | read, 359 | ssid, 360 | get 361 | } 362 | } -------------------------------------------------------------------------------- /Surge/JS/CamScanner.js: -------------------------------------------------------------------------------- 1 | /* 2 | CamScanner 解锁部分高级特权 3 | 4 | *************************** 5 | Quantumult X: 6 | 7 | [rewrite_local] 8 | ^https:\/\/(api|api-cs)\.intsig\.net\/purchase\/cs\/query_property\? url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/CamScanner.js 9 | 10 | [mitm] 11 | hostname = ap*.intsig.net 12 | 13 | *************************** 14 | Surge4 or Loon: 15 | 16 | [Script] 17 | http-response https:\/\/(api|api-cs)\.intsig\.net\/purchase\/cs\/query_property\? requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/CamScanner.js 18 | 19 | [MITM] 20 | hostname = ap*.intsig.net 21 | 22 | *************************** 23 | Quantumult: 24 | 25 | [REWRITE] 26 | https:\/\/(api|api-cs)\.intsig\.net\/purchase\/cs\/query_property\? url simple-response SFRUUC8xLjEgMjAwIE9LCgp7CiAiZGF0YSI6IHsKICAicHNubF92aXBfcHJvcGVydHkiOiB7CiAgICJleHBpcnkiOiAiMTY0MzczMTIwMCIKICB9CiB9Cn0= 27 | 28 | [MITM] 29 | hostname = ap*.intsig.net 30 | 31 | **************************/ 32 | let obj = JSON.parse($response.body); 33 | obj = {"data":{"psnl_vip_property":{"expiry":"1643731200"}}}; 34 | $done({body: JSON.stringify(obj)}); -------------------------------------------------------------------------------- /Surge/JS/IPA_install.js: -------------------------------------------------------------------------------- 1 | /* 2 | * iOS14 IPA辅助安装脚本. 3 | * 4 | * 该脚本仅兼容Surge4.0+, 可解决iOS14或IPadOS14无法在移动端安装IPA的问题. 5 | * 注: 该脚本需要使用"Shu+捷径"或"Jsbox"辅助安装. 具体安装演示请移步TG频道 @NobyDa 查看. 6 | * 7 | * 作者: @NobyDa 8 | * 9 | * Surge模块地址: https://raw.githubusercontent.com/NobyDa/Script/master/Surge/Module/IPA_install.sgmodule 10 | * 11 | * Jsbox辅助安装脚本: https://gist.githubusercontent.com/NobyDa/2489e84ca833a9ae559c2cf534b9cdc8/raw/IPA_Jsbox.js 12 | * 13 | * 捷径地址: https://www.icloud.com/shortcuts/53a7dad769c6453ca2ee54fa2a021ea2 14 | * 15 | */ 16 | 17 | const eva = $request; 18 | const ipaUrl = eva.url.match(/\/jsbox/) ? "http://localhost:8080/download?path=%2Fapp.ipa" : "http://localhost/"; 19 | if (eva.url.match(/install/)) { 20 | $httpClient.head(ipaUrl, (err, resp, data) => { 21 | if (resp && resp.headers && JSON.stringify(resp.headers).match(/UTF-8''.+?\.ipa/) && resp.status == 200) { 22 | const plist = ` 23 | 24 | 25 | 26 | items 27 | 28 | 29 | assets 30 | 31 | 32 | kind 33 | software-package 34 | url 35 | https://nobyda/download${eva.url.match(/jsbox/)?"/jsbox":""} 36 | 37 | 38 | metadata 39 | 40 | bundle-identifier 41 | * 42 | bundle-version 43 | 1.0 44 | kind 45 | software 46 | title 47 | ${decodeURIComponent(JSON.stringify(resp.headers).match(/UTF-8''(.+?)\.ipa/)[1])} 48 | 49 | 50 | 51 | 52 | `; 53 | $done({ 54 | response: { 55 | status: 200, 56 | body: plist 57 | } 58 | }); 59 | } else { 60 | $notification.post('APP安装失败', '', '无法读取IPA安装包'); 61 | $done() 62 | } 63 | }) 64 | } else if (eva.method == "GET") { 65 | $httpClient.head(ipaUrl, (err, resp, data) => { 66 | if (resp && resp.headers && resp.status == 200) { 67 | const name = `正在安装: ${JSON.stringify(resp.headers).match(/UTF-8''(.+?)\.ipa/)[1]} ...` 68 | const size = `应用大小: ${(resp.headers['Content-Length'] / 1000 / 1000).toFixed(2)} MB` 69 | $notification.post(decodeURIComponent(name), size, ''); 70 | } else { 71 | $notification.post('APP安装失败', '', `无法下载IPA安装包`); 72 | } 73 | $done({ 74 | url: ipaUrl 75 | }); 76 | }) 77 | } else { 78 | $done({ 79 | url: ipaUrl 80 | }); 81 | } -------------------------------------------------------------------------------- /Surge/JS/Kuwo.js: -------------------------------------------------------------------------------- 1 | /* 2 | 酷我音乐 解锁会员试听及部分功能 3 | 4 | *************************** 5 | QuantumultX: 6 | 7 | [rewrite_local] 8 | ^https?:\/\/vip1\.kuwo\.cn\/(vip\/v2\/user\/vip|vip\/spi/mservice) url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/Kuwo.js 9 | 10 | [mitm] 11 | hostname = vip1.kuwo.cn 12 | 13 | *************************** 14 | Surge4 or Loon: 15 | 16 | [Script] 17 | http-response ^https?:\/\/vip1\.kuwo\.cn\/(vip\/v2\/user\/vip|vip\/spi/mservice) requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/Kuwo.js 18 | 19 | [MITM] 20 | hostname = vip1.kuwo.cn 21 | 22 | **************************/ 23 | 24 | var body = $response.body; 25 | var url = $request.url; 26 | var obj = JSON.parse(body); 27 | 28 | const vip = '/vip/v2/user/vip'; 29 | const time = '/vip/spi/mservice'; 30 | 31 | if (url.indexOf(vip) != -1) { 32 | obj.data["isNewUser"] = "2"; 33 | obj.data["vipLuxuryExpire"] = "1835312949000"; 34 | obj.data["time"] = "1961170340993"; 35 | obj.data["isYearUser"] = "2"; 36 | obj.data["vipmExpire"] = "1835312949000"; 37 | obj.data["vipOverSeasExpire"] = "1835312949000"; 38 | obj.data["vipExpire"] = "1835312949000"; 39 | obj.data["vip3Expire"] = "1835312949000"; 40 | body = JSON.stringify(obj); 41 | } 42 | 43 | if (url.indexOf(time) != -1) { 44 | obj["isVIPMAutoPay"] = 2; 45 | obj["isVIPLuxAutoPay"] = 2; 46 | body = JSON.stringify(obj); 47 | } 48 | 49 | $done({body}); -------------------------------------------------------------------------------- /Surge/JS/MIX.js: -------------------------------------------------------------------------------- 1 | /* 2 | MIX 解锁特权 (需恢复购买) 3 | 4 | *************************** 5 | QuantumultX: 6 | 7 | [rewrite_local] 8 | https?:\/\/bmall\.camera360\.com\/api\/mix\/recovery url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/MIX.js 9 | 10 | [mitm] 11 | hostname = bmall.camera360.com 12 | 13 | *************************** 14 | Surge4 or Loon: 15 | 16 | [Script] 17 | http-response https?:\/\/bmall\.camera360\.com\/api\/mix\/recovery requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/MIX.js 18 | 19 | [MITM] 20 | hostname = bmall.camera360.com 21 | 22 | **************************/ 23 | 24 | if ($response.body) { 25 | $done({ 26 | body: JSON.stringify({ 27 | "status": 200, 28 | "data": { 29 | "errorCode": 0, 30 | "orderList": [{ 31 | "quantity": "1", 32 | "purchase_date_ms": "1537703444000", 33 | "expires_date": "2028-06-06 06:06:06 Etc\/GMT", 34 | "expires_date_pst": "2028-06-06 06:06:06 America\/Los_Angeles", 35 | "is_in_intro_offer_period": "false", 36 | "transaction_id": "200000535242800", 37 | "is_trial_period": "true", 38 | "original_transaction_id": "200000535242800", 39 | "purchase_date": "2018-09-23 11:50:44 Etc\/GMT", 40 | "product_id": "com.vstudio.MIX.subscription.auto.year", 41 | "original_purchase_date_pst": "2018-09-23 04:50:44 America\/Los_Angeles", 42 | "original_purchase_date_ms": "1537703444000", 43 | "web_order_line_item_id": "200000140095730", 44 | "expires_date_ms": "1843855566000", 45 | "purchase_date_pst": "2018-09-23 04:50:44 America\/Los_Angeles", 46 | "original_purchase_date": "2018-09-23 11:50:44 Etc\/GMT" 47 | }, { 48 | "quantity": "1", 49 | "purchase_date_ms": "1538401707000", 50 | "expires_date": "2028-06-06 06:06:06 Etc\/GMT", 51 | "expires_date_pst": "2028-06-06 06:06:06 America\/Los_Angeles", 52 | "is_in_intro_offer_period": "false", 53 | "transaction_id": "200000539102583", 54 | "is_trial_period": "false", 55 | "original_transaction_id": "200000535242800", 56 | "purchase_date": "2018-10-01 13:48:27 Etc\/GMT", 57 | "product_id": "com.vstudio.MIX.subscription.auto.year", 58 | "original_purchase_date_pst": "2018-09-23 04:50:44 America\/Los_Angeles", 59 | "original_purchase_date_ms": "1537703444000", 60 | "web_order_line_item_id": "200000140095731", 61 | "expires_date_ms": "1843855566000", 62 | "purchase_date_pst": "2018-10-01 06:48:27 America\/Los_Angeles", 63 | "original_purchase_date": "2018-09-23 11:50:44 Etc\/GMT" 64 | }, { 65 | "product_id": "com.vstudio.MIX.Font.ruizigongfangcanlandaheijianonedotzero", 66 | "quantity": "1", 67 | "transaction_id": "200000577197848", 68 | "purchase_date_ms": "1546314438000", 69 | "original_purchase_date_pst": "2018-12-31 19:47:18 America\/Los_Angeles", 70 | "purchase_date_pst": "2018-12-31 19:47:18 America\/Los_Angeles", 71 | "original_purchase_date_ms": "1546314438000", 72 | "is_trial_period": "false", 73 | "original_purchase_date": "2019-01-01 03:47:18 Etc\/GMT", 74 | "original_transaction_id": "200000577197848", 75 | "purchase_date": "2019-01-01 03:47:18 Etc\/GMT" 76 | }], 77 | "autoBindingUserId": "043c8b571a3cd6c06e06db5f", 78 | "pendingRenewalInfo": [{ 79 | "product_id": "com.vstudio.MIX.subscription.auto.year", 80 | "original_transaction_id": "200000535242800", 81 | "auto_renew_product_id": "com.vstudio.MIX.subscription.auto.year", 82 | "auto_renew_status": "0" 83 | }] 84 | }, 85 | "message": "ok", 86 | "exetime": "1555653929373-1555653933781", 87 | "serverTime": 1555653933.7815001 88 | }) 89 | }); 90 | } else { 91 | $done({}) 92 | } -------------------------------------------------------------------------------- /Surge/JS/NiChi.js: -------------------------------------------------------------------------------- 1 | /* 2 | NiChi 解锁素材包 3 | 4 | *************************** 5 | QuantumultX: 6 | 7 | [rewrite_local] 8 | ^https?:\/\/m(p|ini-hk)\.bybutter\.com\/mood\/(official-templates|privileges) url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/NiChi.js 9 | 10 | [mitm] 11 | hostname = m*.bybutter.com 12 | 13 | *************************** 14 | Surge4 or Loon: 15 | 16 | [Script] 17 | http-response https?:\/\/m(p|ini-hk)\.bybutter\.com\/mood\/(official-templates|privileges) requires-body=1,max-size=524288,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/NiChi.js 18 | 19 | [MITM] 20 | hostname = m*.bybutter.com 21 | 22 | **************************/ 23 | 24 | var body = $response.body 25 | .replace(/preview/g, "free") 26 | .replace(/view/g, "unlimited") 27 | .replace(/true/g, "false"); 28 | $done({ body }); -------------------------------------------------------------------------------- /Surge/JS/PicsArt.js: -------------------------------------------------------------------------------- 1 | /* 2 | PicsArt 解锁高级功能 3 | 4 | *************************** 5 | QuantumultX: 6 | 7 | [rewrite_local] 8 | ^https:\/\/api\.(picsart|meiease)\.c(n|om)\/users\/show\/me\.json url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/PicsArt.js 9 | 10 | [mitm] 11 | hostname = api.picsart.c*, api.meiease.c* 12 | 13 | *************************** 14 | Surge4 or Loon: 15 | 16 | [Script] 17 | http-response https:\/\/api\.(picsart|meiease)\.c(n|om)\/users\/show\/me\.json requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/PicsArt.js 18 | 19 | [MITM] 20 | hostname = api.picsart.c*, api.meiease.c* 21 | 22 | **************************/ 23 | 24 | let obj = JSON.parse($response.body); 25 | obj.subscription.granted = "true"; 26 | $done({body: JSON.stringify(obj)}); -------------------------------------------------------------------------------- /Surge/JS/Polarr.js: -------------------------------------------------------------------------------- 1 | /* 2 | Polarr泼辣修图 解锁特权 (需恢复购买) 3 | 4 | *************************** 5 | QuantumultX: 6 | 7 | [rewrite_local] 8 | ^https:\/\/api\.polaxiong\.com\/v1\/payments\/appleiap\/receipts\/confirmation url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/Polarr.js 9 | 10 | [mitm] 11 | hostname = api.polaxiong.com 12 | 13 | *************************** 14 | Surge4 or Loon: 15 | 16 | [Script] 17 | http-response ^https:\/\/api\.polaxiong\.com\/v1\/payments\/appleiap\/receipts\/confirmation requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/Polarr.js 18 | 19 | [MITM] 20 | hostname = api.polaxiong.com 21 | 22 | **************************/ 23 | 24 | const sta = typeof $task !== "undefined" ? "HTTP/1.1 200 OK" : 200; 25 | const res = $response; 26 | const req = $request; 27 | 28 | if (res.body && req.method == "PUT") { 29 | $done({ 30 | body: JSON.stringify({ 31 | "app": "PPE", 32 | "isUnlimited": true, 33 | "membershipExpiryDate": "2028-06-06T08:00:00.000Z" 34 | }), 35 | status: sta, 36 | headers: res.headers 37 | }); 38 | } else { 39 | $done({}); 40 | } 41 | -------------------------------------------------------------------------------- /Surge/JS/Super.js: -------------------------------------------------------------------------------- 1 | /*皮皮虾去广告和水印 by Liquor030 2 | 如果只需要去广告功能请在[URL Rewrite]中添加 3 | 4 | # Remove Super's Ad (By Liquor030) 5 | app_name=super&([\S]*)aid=\d+ app_name=super_pro&$1aid=1412 header 6 | 7 | 可大幅改善使用体验,强烈建议添加并禁用该脚本,在需要的时候开启脚本去水印!! 8 | ===================================== 9 | Feed: /feed/stream 10 | 回复: /comment/cell_reply 11 | 评论: /cell/cell_comment 12 | Detail: /cell/detail 13 | 用户插眼: /ward/list 14 | 用户收藏: /user/favorite 15 | 用户评论: /user/cell_coment 16 | 用户feed: /user/cell_userfeed 17 | 用户发帖: /user/publish_list 18 | 19 | ************************** 20 | QuantumultX: 21 | 22 | [rewrite_local] 23 | ^https?://.*\.snssdk\.com/bds/(feed/stream|comment/cell_reply|cell/cell_comment|cell/detail|ward/list|user/favorite|user/cell_coment|user/cell_userfeed|user/publish_list) url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/Super.js 24 | 25 | [mitm] 26 | hostname = *.snssdk.com 27 | 28 | ************************** 29 | Surge4 or Loon: 30 | 31 | [Script] 32 | http-response ^https?://.*\.snssdk\.com/bds/(feed/stream|comment/cell_reply|cell/cell_comment|cell/detail|ward/list|user/favorite|user/cell_coment|user/cell_userfeed|user/publish_list) requires-body=1,max-size=-1,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/Super.js 33 | 34 | [MITM] 35 | hostname = *.snssdk.com 36 | 37 | **************************/ 38 | 39 | var body = $response.body.replace(/id\":([0-9]{15,})/g, 'id":"$1str"'); 40 | body = JSON.parse(body); 41 | if (body.data.data) { 42 | obj = body.data.data; 43 | } else if (body.data.replies) { 44 | obj = body.data.replies; 45 | } else if (body.data.cell_comments) { 46 | obj = body.data.cell_comments; 47 | } else { 48 | obj = null; 49 | } 50 | 51 | if (obj instanceof Array) { 52 | if (obj != null) { 53 | for (var i in obj) { 54 | if (obj[i].ad_info != null) { 55 | obj.splice(i, 1); 56 | } 57 | if (obj[i].item != null) { 58 | if (obj[i].item.video != null) { 59 | obj[i].item.video.video_download.url_list = obj[i].item.origin_video_download.url_list; 60 | } 61 | for (var j in obj[i].item.comments) { 62 | if (obj[i].item.comments[j].video != null) { 63 | obj[i].item.comments[j].video_download.url_list = obj[i].item.comments[j].video.url_list; 64 | } 65 | } 66 | } 67 | if (obj[i].comment_info != null) { 68 | if (obj[i].comment_info.video != null) { 69 | obj[i].comment_info.video_download.url_list = obj[i].comment_info.video.url_list; 70 | } 71 | } 72 | } 73 | } 74 | } else { 75 | if (obj.item != null) { 76 | if (obj.item.video != null) { 77 | obj.item.video.video_download.url_list = obj.item.origin_video_download.url_list; 78 | } 79 | for (var j in obj.item.comments) { 80 | if (obj.item.comments[j].video != null) { 81 | obj.item.comments[j].video_download.url_list = obj.item.comments[j].video.url_list; 82 | } 83 | } 84 | } 85 | if (obj.comment_info != null) { 86 | if (obj.comment_info.video != null) { 87 | obj.comment_info.video_download.url_list = obj.comment_info.video.url_list; 88 | } 89 | } 90 | } 91 | body = JSON.stringify(body); 92 | body = body.replace(/id\":\"([0-9]{15,})str\"/g, 'id":$1'); 93 | body = body.replace(/\"can_download\":false/g, '"can_download":true'); 94 | body = body.replace(/tplv-ppx-logo.image/g, '0x0.gif'); 95 | body = body.replace(/tplv-ppx-logo/g, '0x0'); 96 | $done({ 97 | body 98 | }); 99 | -------------------------------------------------------------------------------- /Surge/JS/VUE.js: -------------------------------------------------------------------------------- 1 | /* 2 | VUE Vlog 解锁高级功能 (需登录) 3 | 4 | *************************** 5 | QuantumultX: 6 | 7 | [rewrite_local] 8 | ^https:\/\/api\.vuevideo\.net\/api\/v1\/(users\/.+\/profile|subtitle\/prepare) url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/VUE.js 9 | 10 | [mitm] 11 | hostname = api.vuevideo.net 12 | 13 | *************************** 14 | Surge4 or Loon: 15 | 16 | [Script] 17 | http-response https:\/\/api\.vuevideo\.net\/api\/v1\/(users\/.+\/profile|subtitle\/prepare) requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/VUE.js 18 | 19 | [MITM] 20 | hostname = api.vuevideo.net 21 | 22 | **************************/ 23 | var body = $response.body 24 | .replace(/\"isPremium\":false/, "\"isPremium\":true") 25 | .replace(/\"valid\":false/, "\"valid\":true"); 26 | $done({ body }); -------------------------------------------------------------------------------- /Surge/JS/Wps.js: -------------------------------------------------------------------------------- 1 | /* 2 | WPS Office 解锁部分功能 3 | 4 | *************************** 5 | QuantumultX: 6 | 7 | [rewrite_local] 8 | ^https?:\/\/account\.wps\.cn\/api\/users url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/Wps.js 9 | 10 | [mitm] 11 | hostname = account.wps.cn 12 | 13 | *************************** 14 | Surge4 or Loon: 15 | 16 | [Script] 17 | http-response ^https?:\/\/account\.wps\.cn\/api\/users requires-body=1,max-size=-1,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/Wps.js 18 | 19 | [MITM] 20 | hostname = account.wps.cn 21 | 22 | **************************/ 23 | 24 | var body = JSON.parse($response.body); 25 | var obj = { 26 | exp: 0, 27 | level: 3, 28 | privilege: [ 29 | { spid: "data_recover", times: 0, expire_time: 1846256142 }, 30 | { spid: "ocr", times: 0, expire_time: 1846256142 }, 31 | { spid: "pdf2doc", times: 0, expire_time: 1846256142 }, 32 | { spid: "pdf_merge", times: 0, expire_time: 1846256142 }, 33 | { spid: "pdf_sign", times: 0, expire_time: 1846256142 }, 34 | { spid: "pdf_split", times: 0, expire_time: 1846256142 } 35 | ], 36 | result: "ok", 37 | total_buy: 0, 38 | total_cost: -30, 39 | userid: body.userid, 40 | vip: { 41 | name: "超级会员", 42 | has_ad: 0, 43 | memberid: 40, 44 | expire_time: 1846256142, 45 | enabled: [ 46 | { memberid: 40, name: "超级会员", expire_time: 1846256142 }, 47 | { memberid: 20, name: "WPS会员", expire_time: 1846256142 }, 48 | { memberid: 12, name: "稻壳会员", expire_time: 1846256142 } 49 | ] 50 | }, 51 | wealth: 0, 52 | expire_time: 1846256142 53 | }; 54 | 55 | $done({ body: JSON.stringify(obj) }); -------------------------------------------------------------------------------- /Surge/JS/jibjab.js: -------------------------------------------------------------------------------- 1 | /* 2 | JibJab 解锁高级功能 3 | 4 | *************************** 5 | QuantumultX: 6 | 7 | [rewrite_local] 8 | https:\/\/origin-prod-phoenix\.jibjab\.com\/v1\/user url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/jibjab.js 9 | 10 | [mitm] 11 | hostname = origin-prod-phoenix.jibjab.com 12 | 13 | *************************** 14 | Surge4 or Loon: 15 | 16 | [Script] 17 | http-response https:\/\/origin-prod-phoenix\.jibjab\.com\/v1\/user requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/jibjab.js 18 | 19 | [MITM] 20 | hostname = origin-prod-phoenix.jibjab.com 21 | 22 | **************************/ 23 | 24 | let obj = JSON.parse($response.body); 25 | obj.data.attributes["is-paid"] = true; 26 | obj.data.attributes["email"] = "禁止牟利,TG频道@NobyDa"; 27 | $done({body: JSON.stringify(obj)}); 28 | -------------------------------------------------------------------------------- /Surge/JS/luqi.js: -------------------------------------------------------------------------------- 1 | /* 2 | 陆琪讲故事 解锁电台 3 | 4 | *************************** 5 | QuantumultX: 6 | 7 | [rewrite_local] 8 | ^https:\/\/www\.luqijianggushi\.com\/api\/v2\/user\/get url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/luqi.js 9 | 10 | [mitm] 11 | hostname = www.luqijianggushi.com 12 | 13 | *************************** 14 | Surge4 or Loon: 15 | 16 | [Script] 17 | http-response ^https:\/\/www\.luqijianggushi\.com\/api\/v2\/user\/get requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/luqi.js 18 | 19 | [MITM] 20 | hostname = www.luqijianggushi.com 21 | 22 | **************************/ 23 | 24 | let obj = JSON.parse($response.body); 25 | obj.data.is_vip = 1; 26 | obj.data.vip_endtime = 1630296877; 27 | $done({body: JSON.stringify(obj)}); 28 | -------------------------------------------------------------------------------- /Surge/JS/vivavideo.js: -------------------------------------------------------------------------------- 1 | /* 2 | 小影 解锁高级功能 3 | 4 | *************************** 5 | QuantumultX: 6 | 7 | [rewrite_local] 8 | ^https:\/\/xy-viva\.kakalili\.com\/api\/rest\/u\/vipVerifyReceipt url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/vivavideo.js 9 | 10 | [mitm] 11 | hostname = xy-viva.kakalili.com 12 | 13 | *************************** 14 | Surge4 or Loon: 15 | 16 | [Script] 17 | http-response ^https:\/\/xy-viva\.kakalili\.com\/api\/rest\/u\/vipVerifyReceipt requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/vivavideo.js 18 | 19 | [MITM] 20 | hostname = xy-viva.kakalili.com 21 | 22 | **************************/ 23 | 24 | var obj = JSON.parse($response.body); 25 | obj = { 26 | "autoRenewProductId": "premium_platinum_yearly", 27 | "iosDeviceProductVo": { 28 | "premiumVipWeekly": 3, 29 | "premiumGoldMonthly": 3, 30 | "premiumPlatinumMonthly": 3, 31 | "premiumGoldYearly": 3, 32 | "premiumPlatinumYearly": 2, 33 | "premiumPlatinumHalfYearly": 3, 34 | "premiumVipYearly": 3 35 | }, 36 | "isTrialPeriod": true, 37 | "endTime": 4081109070000, 38 | "platform": 2, 39 | "vipType": "premium_platinum_yearly", 40 | "duidDgest": "DIIe86X35", 41 | "autoRenewStatus": 1, 42 | "startTime": 1556241871000, 43 | "systemDate": 1556965441014 44 | }; 45 | 46 | $done({body: JSON.stringify(obj)}); -------------------------------------------------------------------------------- /Surge/Module/GetCookie.sgmodule: -------------------------------------------------------------------------------- 1 | #!name=Get cookie. By NobyDa 2 | #!desc=该模块适用于定时签到脚本的Cookie获取. 集成: 京东, 吾爱破解, 爱奇艺, 哔哩哔哩漫画, 百度贴吧, 快看漫画; 您可以在使用后手动将其禁用,以免产生不必要的MITM. 3 | #!system=ios 4 | 5 | [Script] 6 | 7 | 吾爱Cookie = type=http-request,pattern=https:\/\/www\.52pojie\.cn\/home\.php\?,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/52pojie-DailyBonus/52pojie.js 8 | 9 | 爱奇艺Cookie = type=http-request,pattern=^https:\/\/passport\.iqiyi\.com\/apis\/user\/info\.action,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/iQIYI-DailyBonus/iQIYI.js 10 | 11 | 哔哩漫画Cookie = type=http-request,pattern=^https:\/\/passport\.biligame\.com\/api\/login\/sso.+?version%22%3A%22(3|4|5),script-path=https://raw.githubusercontent.com/NobyDa/Script/master/Bilibili-DailyBonus/Manga.js 12 | 13 | 贴吧Cookie = type=http-request,pattern=https?:\/\/(c\.tieba\.baidu\.com|180\.97\.\d+\.\d+)\/c\/s\/login,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/BDTieBa-DailyBonus/TieBa.js 14 | 15 | 京东签到Cookie = type=http-request,requires-body=1,pattern=^https:\/\/(api\.m|me-api|ms\.jr)\.jd\.com\/(client\.action\?functionId=signBean|user_new\/info\/GetJDUserInfoUnion\?|gw\/generic\/hy\/h5\/m\/appSign\?),script-path=https://raw.githubusercontent.com/NobyDa/Script/master/JD-DailyBonus/JD_DailyBonus.js 16 | 17 | 快看漫画Cookie = type=http-request,pattern=https:\/\/api\.kkmh\.com\/v\d\/passport\/user,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/KuaiKan-DailyBonus/KKMH.js 18 | 19 | [MITM] 20 | hostname = %APPEND% passport.iqiyi.com, www.52pojie.cn, api.m.jd.com, ms.jr.jd.com, me-api.jd.com, passport.biligame.com, c.tieba.baidu.com, api.kkmh.com -------------------------------------------------------------------------------- /Surge/Module/HuiJuDongManAds.sgmodule: -------------------------------------------------------------------------------- 1 | #!name=荟聚动漫 2 | #!desc=去除大多数弹屏以及底栏广告, 由于有广告缓存, 因此可能需要卸载App重装. @NobyDa 3 | 4 | # Update at 2021.01.30 5 | 6 | [Rule] 7 | #检测 8 | DOMAIN,www.umeng.com,DIRECT 9 | DOMAIN,www.adview.cn,DIRECT 10 | DOMAIN,adview.cn,DIRECT 11 | #底栏 12 | DOMAIN,googleads.g.doubleclick.net,REJECT-TINYGIF 13 | DOMAIN,www.19831110.com,REJECT-TINYGIF 14 | #HTTP 15 | AND,((USER-AGENT,%E8%8D%9F%E8%81%9A%E5%8A%A8%E6%BC%AB*), (URL-REGEX,\/ad)),REJECT-TINYGIF 16 | 17 | [URL Rewrite] 18 | #弹屏, 搜索, 以及底栏白屏广告 19 | ^https?:\/\/os8\.pw\/(adConfigs|appConfiguration\/getAd) - reject 20 | ^http:\/\/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\/goad\/ad\/ - reject 21 | ^https?:\/\/api-access\.pangolin-sdk-toutiao\.com\/api\/ad\/ - reject 22 | ^https?:\/\/sf\d-ttcdn-tos\.pstatp\.com\/obj\/ad - reject 23 | ^https?:\/\/www\.51devapp\.com\/adconfigs - reject 24 | ^https?:\/\/.+?\.snssdk\.com\/ad\/ - reject 25 | 26 | [MITM] 27 | hostname = %APPEND% sf?-ttcdn-tos.pstatp.com, www.51devapp.com, *.snssdk.com, www.19831110.com, api-access.pangolin-sdk-toutiao.com, os8.pw -------------------------------------------------------------------------------- /Surge/Module/IPA_install.sgmodule: -------------------------------------------------------------------------------- 1 | #!name=iOS14 IPA应用安装 2 | #!desc=该模块可解决iOS14或IPadOS14无法在移动端安装IPA的问题. 注: 需要使用Shu+捷径或Jsbox辅助安装. 3 | 4 | [Script] 5 | IPA应用安装 = type=http-request,pattern=^https:\/\/nobyda/(install|download)(\/jsbox)?$,requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/IPA_install.js 6 | 7 | [MITM] 8 | hostname = %APPEND% nobyda -------------------------------------------------------------------------------- /Surge/Module/TestFlightDownload.sgmodule: -------------------------------------------------------------------------------- 1 | #!name=TestFlight区域限制解除 2 | #!desc=该模块适用于更新TestFlight App时, 提示"APP不可用"问题. 3 | #!system=ios 4 | 5 | [Script] 6 | 7 | TF下载修正 = type=http-request,pattern=^https?:\/\/testflight\.apple\.com\/v\d\/accounts\/.+?\/install$,requires-body=1,max-size=0,script-path=https://gist.githubusercontent.com/NobyDa/9be418b93afc5e9c8a8f4d28ae403cf2/raw/TF_Download.js 8 | 9 | [MITM] 10 | hostname = %APPEND% testflight.apple.com -------------------------------------------------------------------------------- /Surge/WeChat.list: -------------------------------------------------------------------------------- 1 | # This ruleset includes 90% of Wechat ios network connections(South China ipv4 only). If there are any missing, please PR. 2 | # In addition, this ruleset is written in a special way and should not be used except for Surge. 3 | 4 | DOMAIN-KEYWORD,101.226.211. 5 | DOMAIN-KEYWORD,101.226.222. 6 | DOMAIN-KEYWORD,101.226.226. 7 | DOMAIN-KEYWORD,101.32.104. 8 | DOMAIN-KEYWORD,101.32.118. 9 | DOMAIN-KEYWORD,101.32.133. 10 | DOMAIN-KEYWORD,101.33.110. 11 | DOMAIN-KEYWORD,101.89.15. 12 | DOMAIN-KEYWORD,101.89.38. 13 | DOMAIN-KEYWORD,101.91.37. 14 | DOMAIN-KEYWORD,101.91.69. 15 | DOMAIN-KEYWORD,101.91.71. 16 | DOMAIN-KEYWORD,106.225.231. 17 | DOMAIN-KEYWORD,109.244.169. 18 | DOMAIN-KEYWORD,110.52.193. 19 | DOMAIN-KEYWORD,110.53.246. 20 | DOMAIN-KEYWORD,111.30.164. 21 | DOMAIN-KEYWORD,111.45.68. 22 | DOMAIN-KEYWORD,111.45.69. 23 | DOMAIN-KEYWORD,111.45.70. 24 | DOMAIN-KEYWORD,112.53.25. 25 | DOMAIN-KEYWORD,112.53.36. 26 | DOMAIN-KEYWORD,112.60.0. 27 | DOMAIN-KEYWORD,112.60.13. 28 | DOMAIN-KEYWORD,112.60.14. 29 | DOMAIN-KEYWORD,112.60.8. 30 | DOMAIN-KEYWORD,112.65.193. 31 | DOMAIN-KEYWORD,112.90.43. 32 | DOMAIN-KEYWORD,113.105.154. 33 | DOMAIN-KEYWORD,113.105.165. 34 | DOMAIN-KEYWORD,113.105.166. 35 | DOMAIN-KEYWORD,113.96.154. 36 | DOMAIN-KEYWORD,113.96.156. 37 | DOMAIN-KEYWORD,113.96.16. 38 | DOMAIN-KEYWORD,113.96.18. 39 | DOMAIN-KEYWORD,113.96.202. 40 | DOMAIN-KEYWORD,113.96.208. 41 | DOMAIN-KEYWORD,113.96.209. 42 | DOMAIN-KEYWORD,113.96.210. 43 | DOMAIN-KEYWORD,113.96.232. 44 | DOMAIN-KEYWORD,113.96.233. 45 | DOMAIN-KEYWORD,113.96.237. 46 | DOMAIN-KEYWORD,113.96.83. 47 | DOMAIN-KEYWORD,113.96.98. 48 | DOMAIN-KEYWORD,115.231.229. 49 | DOMAIN-KEYWORD,115.238.197. 50 | DOMAIN-KEYWORD,116.128.133. 51 | DOMAIN-KEYWORD,116.128.163. 52 | DOMAIN-KEYWORD,116.253.60. 53 | DOMAIN-KEYWORD,116.253.61. 54 | DOMAIN-KEYWORD,117.184.242. 55 | DOMAIN-KEYWORD,117.187.243. 56 | DOMAIN-KEYWORD,117.41.224. 57 | DOMAIN-KEYWORD,119.147.190. 58 | DOMAIN-KEYWORD,119.147.227. 59 | DOMAIN-KEYWORD,119.147.83. 60 | DOMAIN-KEYWORD,119.188.155. 61 | DOMAIN-KEYWORD,119.39.81. 62 | DOMAIN-KEYWORD,120.221.179. 63 | DOMAIN-KEYWORD,120.232.27. 64 | DOMAIN-KEYWORD,120.232.33. 65 | DOMAIN-KEYWORD,120.232.65. 66 | DOMAIN-KEYWORD,120.232.68. 67 | DOMAIN-KEYWORD,120.237.199. 68 | DOMAIN-KEYWORD,120.241.186. 69 | DOMAIN-KEYWORD,120.241.189. 70 | DOMAIN-KEYWORD,120.241.190. 71 | DOMAIN-KEYWORD,120.241.21. 72 | DOMAIN-KEYWORD,120.241.25. 73 | DOMAIN-KEYWORD,120.241.92. 74 | DOMAIN-KEYWORD,121.12.115. 75 | DOMAIN-KEYWORD,121.14.142. 76 | DOMAIN-KEYWORD,121.14.98. 77 | DOMAIN-KEYWORD,121.51.130. 78 | DOMAIN-KEYWORD,122.225.36. 79 | DOMAIN-KEYWORD,122.246.25. 80 | DOMAIN-KEYWORD,123.150.208. 81 | DOMAIN-KEYWORD,123.150.76. 82 | DOMAIN-KEYWORD,123.151.190. 83 | DOMAIN-KEYWORD,123.161.61. 84 | DOMAIN-KEYWORD,123.184.36. 85 | DOMAIN-KEYWORD,124.232.162. 86 | DOMAIN-KEYWORD,129.226.3. 87 | DOMAIN-KEYWORD,129.226.107. 88 | DOMAIN-KEYWORD,14.17.41. 89 | DOMAIN-KEYWORD,14.17.73. 90 | DOMAIN-KEYWORD,14.18.175. 91 | DOMAIN-KEYWORD,14.18.178. 92 | DOMAIN-KEYWORD,14.18.180. 93 | DOMAIN-KEYWORD,14.18.200. 94 | DOMAIN-KEYWORD,14.18.245. 95 | DOMAIN-KEYWORD,14.215.138. 96 | DOMAIN-KEYWORD,14.215.158. 97 | DOMAIN-KEYWORD,14.215.166. 98 | DOMAIN-KEYWORD,14.215.167. 99 | DOMAIN-KEYWORD,14.215.85. 100 | DOMAIN-KEYWORD,14.22.0. 101 | DOMAIN-KEYWORD,14.22.33. 102 | DOMAIN-KEYWORD,14.22.4. 103 | DOMAIN-KEYWORD,14.22.5. 104 | DOMAIN-KEYWORD,14.29.100. 105 | DOMAIN-KEYWORD,14.29.101. 106 | DOMAIN-KEYWORD,150.109.90. 107 | DOMAIN-KEYWORD,157.148.33. 108 | DOMAIN-KEYWORD,157.148.42. 109 | DOMAIN-KEYWORD,157.148.45. 110 | DOMAIN-KEYWORD,157.148.51. 111 | DOMAIN-KEYWORD,157.148.55. 112 | DOMAIN-KEYWORD,157.255.135. 113 | DOMAIN-KEYWORD,157.255.173. 114 | DOMAIN-KEYWORD,157.255.174. 115 | DOMAIN-KEYWORD,157.255.192. 116 | DOMAIN-KEYWORD,157.255.243. 117 | DOMAIN-KEYWORD,157.255.244. 118 | DOMAIN-KEYWORD,157.255.245. 119 | DOMAIN-KEYWORD,163.177.81. 120 | DOMAIN-KEYWORD,163.177.89. 121 | DOMAIN-KEYWORD,163.177.90. 122 | DOMAIN-KEYWORD,175.6.13. 123 | DOMAIN-KEYWORD,180.111.199. 124 | DOMAIN-KEYWORD,180.163.25. 125 | DOMAIN-KEYWORD,180.96.0. 126 | DOMAIN-KEYWORD,180.96.2. 127 | DOMAIN-KEYWORD,180.97.8. 128 | DOMAIN-KEYWORD,183.131.56. 129 | DOMAIN-KEYWORD,183.131.57. 130 | DOMAIN-KEYWORD,183.192.169. 131 | DOMAIN-KEYWORD,183.194.238. 132 | DOMAIN-KEYWORD,183.232.175. 133 | DOMAIN-KEYWORD,183.232.246. 134 | DOMAIN-KEYWORD,183.232.94. 135 | DOMAIN-KEYWORD,183.232.95. 136 | DOMAIN-KEYWORD,183.232.96. 137 | DOMAIN-KEYWORD,183.240.115. 138 | DOMAIN-KEYWORD,183.240.118. 139 | DOMAIN-KEYWORD,183.240.48. 140 | DOMAIN-KEYWORD,183.240.56. 141 | DOMAIN-KEYWORD,183.240.80. 142 | DOMAIN-KEYWORD,183.240.81. 143 | DOMAIN-KEYWORD,183.3.226. 144 | DOMAIN-KEYWORD,183.3.233. 145 | DOMAIN-KEYWORD,183.3.234. 146 | DOMAIN-KEYWORD,183.3.235. 147 | DOMAIN-KEYWORD,183.47.97. 148 | DOMAIN-KEYWORD,183.47.101. 149 | DOMAIN-KEYWORD,183.47.115. 150 | DOMAIN-KEYWORD,183.47.117. 151 | DOMAIN-KEYWORD,183.60.131. 152 | DOMAIN-KEYWORD,183.60.155. 153 | DOMAIN-KEYWORD,183.61.13. 154 | DOMAIN-KEYWORD,203.205.232. 155 | DOMAIN-KEYWORD,203.205.235. 156 | DOMAIN-KEYWORD,203.205.253. 157 | DOMAIN-KEYWORD,203.205.254. 158 | DOMAIN-KEYWORD,203.209.245. 159 | DOMAIN-KEYWORD,211.95.137. 160 | DOMAIN-KEYWORD,211.95.138. 161 | DOMAIN-KEYWORD,218.68.88. 162 | DOMAIN-KEYWORD,218.68.90. 163 | DOMAIN-KEYWORD,219.135.59. 164 | DOMAIN-KEYWORD,220.194.91. 165 | DOMAIN-KEYWORD,220.194.93. 166 | DOMAIN-KEYWORD,220.249.243. 167 | DOMAIN-KEYWORD,221.181.99. 168 | DOMAIN-KEYWORD,223.166.152. 169 | DOMAIN-KEYWORD,27.19.222. 170 | DOMAIN-KEYWORD,36.152.4. 171 | DOMAIN-KEYWORD,36.155.202. 172 | DOMAIN-KEYWORD,36.158.242. 173 | DOMAIN-KEYWORD,36.250.230. 174 | DOMAIN-KEYWORD,42.187.131. 175 | DOMAIN-KEYWORD,42.202.141. 176 | DOMAIN-KEYWORD,58.144.193. 177 | DOMAIN-KEYWORD,58.144.248. 178 | DOMAIN-KEYWORD,58.250.136. 179 | DOMAIN-KEYWORD,58.251.100. 180 | DOMAIN-KEYWORD,58.251.111. 181 | DOMAIN-KEYWORD,58.251.117. 182 | DOMAIN-KEYWORD,58.251.80. 183 | DOMAIN-KEYWORD,58.251.81. 184 | DOMAIN-KEYWORD,58.251.82. 185 | DOMAIN-KEYWORD,58.49.138. 186 | DOMAIN-KEYWORD,59.36.89. 187 | DOMAIN-KEYWORD,59.36.97. 188 | DOMAIN-KEYWORD,59.37.96. 189 | DOMAIN-KEYWORD,59.37.97. 190 | DOMAIN-KEYWORD,60.13.97. 191 | DOMAIN-KEYWORD,61.151.165. 192 | DOMAIN-KEYWORD,61.151.167. 193 | DOMAIN-KEYWORD,61.151.168. 194 | DOMAIN-KEYWORD,61.151.183. 195 | DOMAIN-KEYWORD,61.151.206. 196 | DOMAIN-KEYWORD,61.151.207. 197 | DOMAIN-KEYWORD,61.190.114. 198 | DOMAIN-KEYWORD,61.191.60. 199 | DOMAIN-KEYWORD,61.241.31. 200 | DOMAIN-KEYWORD,61.241.44. 201 | DOMAIN-KEYWORD,61.241.47. 202 | DOMAIN-KEYWORD,61.241.49. 203 | 204 | # WeChat Pay SDK 205 | DOMAIN-KEYWORD,101.226.129. 206 | DOMAIN-KEYWORD,101.227.162. 207 | DOMAIN-KEYWORD,101.89.50. 208 | DOMAIN-KEYWORD,101.91.22. 209 | DOMAIN-KEYWORD,101.91.34. 210 | DOMAIN-KEYWORD,101.91.5. 211 | DOMAIN-KEYWORD,111.0.26. 212 | DOMAIN-KEYWORD,116.128.171. 213 | DOMAIN-KEYWORD,120.204.0. 214 | DOMAIN-KEYWORD,120.204.10. 215 | DOMAIN-KEYWORD,121.51.124. 216 | DOMAIN-KEYWORD,140.207.119. 217 | DOMAIN-KEYWORD,175.27.0. 218 | DOMAIN-KEYWORD,180.163.15. 219 | DOMAIN-KEYWORD,180.163.26. 220 | DOMAIN-KEYWORD,182.254.78. 221 | DOMAIN-KEYWORD,182.254.92. 222 | DOMAIN-KEYWORD,183.195.236. 223 | DOMAIN-KEYWORD,183.3.224. 224 | DOMAIN-KEYWORD,203.205.234. 225 | DOMAIN-KEYWORD,220.196.144. 226 | DOMAIN-KEYWORD,221.181.97. 227 | DOMAIN-KEYWORD,58.247.204. 228 | DOMAIN-KEYWORD,58.247.205. 229 | IP-CIDR6,2402:4e00:8010::/112,no-resolve 230 | IP-CIDR6,2402:4e00:8020:101::2:0/112,no-resolve 231 | IP-CIDR6,2402:4e00:1020:10fb:0:9466::/112,no-resolve 232 | IP-CIDR6,2402:4e00:1430:2264:0:9467::/96,no-resolve 233 | IP-CIDR6,2408:80f1:31:50::/112,no-resolve 234 | IP-CIDR6,2409:8c1e:8fd0:50::/112,no-resolve 235 | IP-CIDR6,240e:e1:a900:50::/112,no-resolve 236 | 237 | # China Unicom IPv6 (WeChat) 238 | IP-CIDR6,2408:80F1:21::/48,no-resolve 239 | IP-CIDR6,2408:80F1:31::/48,no-resolve 240 | IP-CIDR6,2408:8711:10:10::/112,no-resolve 241 | IP-CIDR6,2408:8752:0:10::/60,no-resolve 242 | IP-CIDR6,2408:8752:0:2:30::/112,no-resolve 243 | IP-CIDR6,2408:8752:0:30::/64,no-resolve 244 | IP-CIDR6,2408:8752:0:F::/64,no-resolve 245 | IP-CIDR6,2408:8756:2CF2:19::/112,no-resolve 246 | IP-CIDR6,2408:8756:2CFF:10::/60,no-resolve 247 | IP-CIDR6,2408:8756:3AF0:10::/112,no-resolve 248 | IP-CIDR6,2408:8756:3AF0:2013::/112,no-resolve 249 | IP-CIDR6,2408:8763:0:200::/60,no-resolve 250 | 251 | # China Mobile IPv6 (WeChat) 252 | IP-CIDR6,2409:8702:4860:10::/112,no-resolve 253 | IP-CIDR6,2409:8C1E:75B0:1010::/112,no-resolve 254 | IP-CIDR6,2409:8C1E:75B0:13::/112,no-resolve 255 | IP-CIDR6,2409:8C1E:8FD0::/56,no-resolve 256 | IP-CIDR6,2409:8C34:22A0:10::/60,no-resolve 257 | IP-CIDR6,2409:8C38:80:150::/72,no-resolve 258 | IP-CIDR6,2409:8C54:1003:1019::/112,no-resolve 259 | IP-CIDR6,2409:8C54:1003:10::/112,no-resolve 260 | IP-CIDR6,2409:8C54:1050:10::/112,no-resolve 261 | IP-CIDR6,2409:8C54:2000:400::/60,no-resolve 262 | IP-CIDR6,2409:8C54:2800:9110::/60,no-resolve 263 | IP-CIDR6,2409:8C54:5100::/56,no-resolve 264 | IP-CIDR6,2409:8C54:810:208:2D::/112,no-resolve 265 | 266 | # China Telecom IPv6 (WeChat) 267 | IP-CIDR6,240E:928:1400:10::/112,no-resolve 268 | IP-CIDR6,240E:93C:8:10::/60,no-resolve 269 | IP-CIDR6,240E:95C:2003:20::/60,no-resolve 270 | IP-CIDR6,240E:95C:3003:14::/60,no-resolve 271 | IP-CIDR6,240E:96C:6400:700::/60,no-resolve 272 | IP-CIDR6,240E:97C:18:601::/64,no-resolve 273 | IP-CIDR6,240E:97C:2F::/60,no-resolve 274 | IP-CIDR6,240E:97D:4:1E00::/60,no-resolve 275 | IP-CIDR6,240E:97F:3000:1102::/64,no-resolve 276 | IP-CIDR6,240E:CF:8800::/56,no-resolve 277 | IP-CIDR6,240E:E1:A800::/46,no-resolve 278 | IP-CIDR6,240E:E1:A900::/48,no-resolve 279 | IP-CIDR6,240E:E1:AA00::/48,no-resolve 280 | IP-CIDR6,240E:E9:6003::/48,no-resolve 281 | IP-CIDR6,240E:F7:4F00:1F10::/60,no-resolve 282 | IP-CIDR6,240E:F7:A070:100::/60,no-resolve 283 | IP-CIDR6,240E:F7:A070:403::/60,no-resolve 284 | IP-CIDR6,240E:FF:9018:100::/60,no-resolve 285 | IP-CIDR6,240E:FF:F100::/44,no-resolve 286 | 287 | DOMAIN,wup.imtt.qq.com 288 | DOMAIN,slife.xy-asia.com 289 | DOMAIN,dldir1.qq.com 290 | DOMAIN,wx.tenpay.com 291 | DOMAIN,btrace.qq.com 292 | DOMAIN,soup.v.qq.com 293 | DOMAIN,weixin110.qq.com 294 | DOMAIN,wxapp.tc.qq.com 295 | DOMAIN,vweixinf.tc.qq.com 296 | DOMAIN-SUFFIX,map.qq.com 297 | DOMAIN-SUFFIX,wx.gtimg.com 298 | DOMAIN-SUFFIX,qpic.cn 299 | DOMAIN-SUFFIX,qlogo.cn 300 | DOMAIN-SUFFIX,wx.qq.com 301 | DOMAIN-SUFFIX,wxs.qq.com 302 | DOMAIN-SUFFIX,weixin.qq.com 303 | DOMAIN-SUFFIX,wechat.com 304 | DOMAIN-SUFFIX,weixin.com 305 | DOMAIN-SUFFIX,vweixinthumb.tc.qq.com 306 | DOMAIN-SUFFIX,iot-tencent.com 307 | DOMAIN-SUFFIX,wechatos.net 308 | DOMAIN-SUFFIX,servicewechat.com 309 | 310 | # Device positioning 311 | DOMAIN-SUFFIX,cc.map.qq.com 312 | DOMAIN-SUFFIX,analytics.map.qq.com 313 | DOMAIN-SUFFIX,rttgps.map.qq.com 314 | DOMAIN-SUFFIX,nlp.map.qq.com 315 | DOMAIN-SUFFIX,lbs.gtimg.com 316 | DOMAIN-SUFFIX,indoorroad.map.qq.com 317 | DOMAIN-SUFFIX,yun-hl.3g.qq.com 318 | DOMAIN-SUFFIX,up-hl.3g.qq.com 319 | DOMAIN-SUFFIX,lbs.map.qq.com 320 | DOMAIN-SUFFIX,ue.indoorloc.map.qq.com 321 | DOMAIN-SUFFIX,apis.map.qq.com 322 | 323 | USER-AGENT,WeChat* 324 | USER-AGENT,MicroMessenger* -------------------------------------------------------------------------------- /Time-based-One-Time-Password/README.md: -------------------------------------------------------------------------------- 1 | ## Desc 2 | 3 | A time-based one-time password algorithm(TOTP), implemented entirely 100% in Javascript. 4 | 5 | This script complies with [RFC6238](https://datatracker.ietf.org/doc/html/rfc6238) specification and can be run in Surge, QuantumultX, Loon, Shadowrocket. 6 | 7 | 8 | 9 | ## Usage 10 | 11 | ```javascript 12 | const key = 'YOURCLIENTTOKEN'; //TOTP key 13 | const totp = TOTP(key); //Return a six-digit one-time password. 14 | 15 | console.log(totp); //Print log 16 | ``` 17 | 18 | 19 | 20 | ## Acknowledgements 21 | 22 | This script is adapted from https://jsfiddle.net/russau/rbyjk774 and uses Brian Turek's [jsSHA](https://github.com/caligatio/jsSHA/). 23 | 24 | -------------------------------------------------------------------------------- /Time-based-One-Time-Password/TOTP.min.js: -------------------------------------------------------------------------------- 1 | function TOTP(token){function t(e,a,d){var g=0,c=[],b=0,f,k,l,h,m,w,n,y,p=!1,q=[],t=[],v,u=!1;d=d||{};f=d.encoding||"UTF8";v=d.numRounds||1;l=z(a,f);if(v!==parseInt(v,10)||1>v)throw Error("numRounds must a integer >= 1");if("SHA-1"===e)m=512,w=A,n=H,h=160,y=function(a){return a.slice()};else throw Error("Chosen SHA variant is not supported");k=x(e);this.setHMACKey=function(a,b,c){var d;if(!0===p)throw Error("HMAC key already set");if(!0===u)throw Error("Cannot set HMAC key after calling update");f=(c||{}).encoding||"UTF8";b=z(b,f)(a);a=b.binLen;b=b.value;d=m>>>3;c=d/4-1;if(da/8){for(;b.length<=c;)b.push(0);b[c]&=4294967040}for(a=0;a<=c;a+=1)q[a]=b[a]^909522486,t[a]=b[a]^1549556828;k=w(q,k);g=m;p=!0};this.update=function(a){var d,e,f,h=0,n=m>>>5;d=l(a,c,b);a=d.binLen;e=d.value;d=a>>>5;for(f=0;f>>5);b=a%m;u=!0};this.getHash=function(a,d){var f,l,m,r;if(!0===p)throw Error("Cannot call getHash after setting HMAC key");m=B(d);switch(a){case"HEX":f=function(a){return C(a,h,m)};break;case"B64":f=function(a){return D(a,h,m)};break;case"BYTES":f=function(a){return E(a,h)};break;case"ARRAYBUFFER":try{l=new ArrayBuffer(0)}catch(I){throw Error("ARRAYBUFFER not supported by this environment");}f=function(a){return F(a,h)};break;default:throw Error("format must be HEX, B64, BYTES, or ARRAYBUFFER");}r=n(c.slice(),b,g,y(k),h);for(l=1;l>>3;if(0!==g%2)throw Error("String of HEX type must be in byte increments");for(c=0;c>>1)+l;for(f=k>>>2;a.length<=f;)a.push(0);a[f]|=b<<8*(3-k%4)}return{value:a,binLen:4*g+d}}function K(e,a,d){var g=[],c,b,f,k,g=a||[0];d=d||0;b=d>>>3;for(c=0;c>>2,g.length<=f&&g.push(0),g[f]|=a<<8*(3-k%4);return{value:g,binLen:8*e.length+d}}function L(e,a,d){var g=[],c=0,b,f,k,l,h,m,g=a||[0];d=d||0;a=d>>>3;if(-1===e.search(/^[a-zA-Z0-9=+\/]+$/))throw Error("Invalid character in base-64 string");f=e.indexOf("=");e=e.replace(/\=/g,"");if(-1!==f&&f=s.length){s=Array(l+1-s.length).join(p)+s}return s}return(function(s){var k=V(s);var e=Math.round(new Date().getTime()/1000.0);var r=T(X(Math.floor(e/30)),16,'0');var j=new t("SHA-1","HEX");j.setHMACKey(k,"HEX");j.update(r);var h=j.getHMAC("HEX");var o=parseInt(h.substring(h.length-1),16);var p=(parseInt(h.substr(o*2,8),16)&parseInt('7fffffff',16))+'';var z=p.substr(p.length-6,6);return z})(token)}; -------------------------------------------------------------------------------- /iQIYI-DailyBonus/iQIYI.js: -------------------------------------------------------------------------------- 1 | /* 2 | 爱奇艺会员签到脚本 3 | 4 | 更新时间: 2022.1.28 5 | 脚本兼容: QuantumultX, Surge4, Loon, JsBox, Node.js 6 | 电报频道: @NobyDa 7 | 问题反馈: @NobyDa_bot 8 | 9 | 获取Cookie说明: 10 | Safari浏览器打开 https://m.iqiyi.com/user.html 使用密码登录, 如通知成功获取cookie则可使用该脚本. 11 | 获取Cookie后, 请将Cookie脚本禁用并移除主机名,以免产生不必要的MITM. 12 | 脚本将在每天上午9:00执行, 您可以修改执行时间。 13 | 14 | 如果使用Node.js, 需自行安装'request'模块. 例: npm install request -g 15 | 16 | Node.js环境变量相关: 17 | Cookie:IQIYI_COOKIE 18 | Debug调试:IQIYI_DEBUG 19 | Bark通知推送Key:BARK_PUSH 20 | Bark服务端(默认官方):BARK_SERVER 21 | 22 | JsBox, Node.js用户获取Cookie说明: 23 | 方法一手机:开启抓包, 网页登录 https://m.iqiyi.com/user.html 返回抓包APP搜索URL关键字 apis/user/info.action 复制请求头中的Cookie字段填入以下脚本变量或环境变量中即可 24 | 25 | 方法二PC:网页登录 https://www.iqiyi.com 按F12控制台执行 console.log(document.cookie) 复制打印的Cookie填入以下脚本变量或环境变量中即可 26 | */ 27 | 28 | var cookie = ''; //单引号内填入手动获取的Cookie 29 | 30 | var barkKey = ''; //Bark APP 通知推送Key 31 | 32 | var barkServer = ''; //Bark APP 通知服务端地址(默认官方) 33 | 34 | /********************* 35 | QuantumultX 远程脚本配置: 36 | ********************** 37 | [task_local] 38 | # 爱奇艺会员签到 39 | 0 9 * * * https://raw.githubusercontent.com/NobyDa/Script/master/iQIYI-DailyBonus/iQIYI.js 40 | 41 | [rewrite_local] 42 | # 获取Cookie 43 | ^https:\/\/passport\.iqiyi\.com\/apis\/user\/info\.action url script-request-header https://raw.githubusercontent.com/NobyDa/Script/master/iQIYI-DailyBonus/iQIYI.js 44 | 45 | [mitm] 46 | hostname= passport.iqiyi.com 47 | 48 | ********************** 49 | Surge 4.2.0+ 脚本配置: 50 | ********************** 51 | [Script] 52 | 爱奇艺签到 = type=cron,cronexp=0 9 * * *,timeout=120,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/iQIYI-DailyBonus/iQIYI.js 53 | 54 | 爱奇艺获取Cookie = type=http-request,pattern=^https:\/\/passport\.iqiyi\.com\/apis\/user\/info\.action,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/iQIYI-DailyBonus/iQIYI.js 55 | 56 | [MITM] 57 | hostname= passport.iqiyi.com 58 | 59 | ************************ 60 | Loon 2.1.0+ 脚本配置: 61 | ************************ 62 | 63 | [Script] 64 | # 爱奇艺签到 65 | cron "0 9 * * *" script-path=https://raw.githubusercontent.com/NobyDa/Script/master/iQIYI-DailyBonus/iQIYI.js 66 | 67 | # 获取Cookie 68 | http-request ^https:\/\/passport\.iqiyi\.com\/apis\/user\/info\.action script-path=https://raw.githubusercontent.com/NobyDa/Script/master/iQIYI-DailyBonus/iQIYI.js 69 | 70 | [Mitm] 71 | hostname= passport.iqiyi.com 72 | 73 | */ 74 | 75 | var LogDetails = false; // 响应日志 76 | 77 | var pushMsg = []; 78 | 79 | var P00001 = ''; 80 | 81 | var P00003 = ''; 82 | 83 | var dfp = ''; 84 | 85 | var $nobyda = nobyda(); 86 | 87 | (async () => { 88 | cookie = cookie || $nobyda.read("CookieQY") 89 | LogDetails = $nobyda.read("iQIYI_LogDetails") === "true" ? true : LogDetails 90 | if (typeof process !== 'undefined' && typeof process.env !== 'undefined') { 91 | cookie = cookie || process.env.IQIYI_COOKIE; 92 | LogDetails = LogDetails || process.env.IQIYI_DEBUG; 93 | barkKey = barkKey || process.env.BARK_PUSH; 94 | barkServer = barkServer || process.env.BARK_SERVER; 95 | } 96 | if ($nobyda.isRequest) { 97 | GetCookie() 98 | } else if (cookie) { 99 | if (cookie.includes("P00001") && cookie.includes("P00003") && cookie.includes("__dfp")) { 100 | P00001 = cookie.match(/P00001=(.*?);/)[1]; 101 | P00003 = cookie.match(/P00003=(.*?);/)[1]; 102 | dfp = cookie.match(/__dfp=(.*?)@/)[1]; 103 | await login(); 104 | await Checkin(); 105 | await WebCheckin(); 106 | for (let i = 0; i < 3; i++){ 107 | const run = await Lottery(i); 108 | if (run) { 109 | await new Promise(r => setTimeout(r, 1000)); 110 | } else { 111 | break 112 | } 113 | } 114 | const tasks = await getTaskList(); 115 | for (let i = 0; i < tasks.length; i++){ 116 | if (![1, 4].includes(tasks[i].status)) { //0:待领取 1:已完成 2:未开始 4:进行中 117 | await joinTask(tasks[i]); 118 | await notifyTask(tasks[i]); 119 | await new Promise(r => setTimeout(r, 1000)); 120 | await getTaskRewards(tasks[i]); 121 | console.log(`--------------------`) 122 | } 123 | } 124 | const expires = $nobyda.expire ? $nobyda.expire.replace(/\u5230\u671f/, "") : "获取失败 ⚠️" 125 | if (!$nobyda.isNode) $nobyda.notify("爱奇艺", "到期时间: " + expires, pushMsg.join('\n')); 126 | if (barkKey) await BarkNotify($nobyda, barkKey, '爱奇艺', `到期时间: ${expires}\n${pushMsg.join('\n')}`, barkServer); 127 | await $nobyda.time(); 128 | } else { 129 | console.log(`Cookie缺少关键值,需重新获取`) 130 | } 131 | } else { 132 | $nobyda.notify("爱奇艺会员", "", "签到终止, 未获取Cookie"); 133 | } 134 | })().finally(() => { 135 | $nobyda.done(); 136 | }) 137 | 138 | function login() { 139 | return new Promise(resolve => { 140 | var URL = { 141 | url: 'https://cards.iqiyi.com/views_category/3.0/vip_home?secure_p=iPhone&scrn_scale=0&dev_os=0&ouid=0&layout_v=6&psp_cki=' + P00001 + '&page_st=suggest&app_k=8e48946f144759d86a50075555fd5862&dev_ua=iPhone8%2C2&net_sts=1&cupid_uid=0&xas=1&init_type=6&app_v=11.4.5&idfa=0&app_t=0&platform_id=0&layout_name=0&req_sn=0&api_v=0&psp_status=0&psp_uid=451953037415627&qyid=0&secure_v=0&req_times=0', 142 | headers: { 143 | sign: '7fd8aadd90f4cfc99a858a4b087bcc3a', 144 | t: '479112291' 145 | } 146 | } 147 | $nobyda.get(URL, function(error, response, data) { 148 | const Details = LogDetails ? data ? `response:\n${data}` : '' : '' 149 | if (!error && data.match(/\"text\":\"\d.+?\u5230\u671f\"/)) { 150 | $nobyda.expire = data.match(/\"text\":\"(\d.+?\u5230\u671f)\"/)[1] 151 | console.log(`爱奇艺-查询成功: ${$nobyda.expire} ${Details}`) 152 | } else { 153 | console.log(`爱奇艺-查询失败${error || ': 无到期数据 ⚠️'} ${Details}`) 154 | } 155 | resolve() 156 | }) 157 | }) 158 | } 159 | 160 | function Checkin() { 161 | const timestamp = new Date().getTime(); 162 | const stringRandom = (length) => { 163 | var rdm62, ret = ''; 164 | while (length--) { 165 | rdm62 = 0 | Math.random() * 62; 166 | ret += String.fromCharCode(rdm62 + (rdm62 < 10 ? 48 : rdm62 < 36 ? 55 : 61)) 167 | } 168 | return ret; 169 | }; 170 | return new Promise(resolve => { 171 | const sign_date = { 172 | agentType: "1", 173 | agentversion: "1.0", 174 | appKey: "basic_pcw", 175 | authCookie: P00001, 176 | qyid: md5(stringRandom(16)), 177 | task_code: "natural_month_sign", 178 | timestamp: timestamp, 179 | typeCode: "point", 180 | userId: P00003, 181 | }; 182 | const post_date = { 183 | "natural_month_sign": { 184 | "agentType": "1", 185 | "agentversion": "1", 186 | "authCookie": P00001, 187 | "qyid": md5(stringRandom(16)), 188 | "taskCode": "iQIYI_mofhr", 189 | "verticalCode": "iQIYI" 190 | } 191 | }; 192 | const sign = k("UKobMjDMsDoScuWOfp6F", sign_date, { 193 | split: "|", 194 | sort: !0, 195 | splitSecretKey: !0 196 | }); 197 | var URL = { 198 | url: 'https://community.iqiyi.com/openApi/task/execute?' + w(sign_date) + "&sign=" + sign, 199 | headers: { 200 | 'Content-Type':'application/json' 201 | }, 202 | body: JSON.stringify(post_date) 203 | } 204 | $nobyda.post(URL, function(error, response, data) { 205 | let CheckinMsg; 206 | const Details = LogDetails ? `msg:\n${data||error}` : ''; 207 | try { 208 | if (error) throw new Error(`接口请求出错 ‼️`); 209 | const obj = JSON.parse(data) 210 | if (obj.code === "A00000") { 211 | if (obj.data.code === "A0000") { 212 | var quantity = obj.data.data.rewards[0].rewardCount; 213 | var continued = obj.data.data.signDays; 214 | CheckinMsg = `应用签到: 获得积分${quantity}, 累计签到${continued}天 🎉`; 215 | } else { 216 | CheckinMsg = `应用签到: ${obj.data.msg} ⚠️`; 217 | } 218 | } else { 219 | CheckinMsg = `应用签到: Cookie无效 ⚠️`; 220 | } 221 | } catch (e) { 222 | CheckinMsg = `应用签到: ${e.message||e}`; 223 | } 224 | pushMsg.push(CheckinMsg); 225 | console.log(`爱奇艺-${CheckinMsg} ${Details}`); 226 | resolve() 227 | }) 228 | }) 229 | } 230 | 231 | function WebCheckin() { 232 | return new Promise(resolve => { 233 | const web_sign_date = { 234 | agenttype: "1", 235 | agentversion: "0", 236 | appKey: "basic_pca", 237 | appver: "0", 238 | authCookie: P00001, 239 | channelCode: "sign_pcw", 240 | dfp: dfp, 241 | scoreType: "1", 242 | srcplatform: "1", 243 | typeCode: "point", 244 | userId: P00003, 245 | // user_agent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36", 246 | verticalCode: "iQIYI" 247 | }; 248 | 249 | const sign = k("DO58SzN6ip9nbJ4QkM8H", web_sign_date, { 250 | split: "|", 251 | sort: !0, 252 | splitSecretKey: !0 253 | }); 254 | var URL = { 255 | url: 'https://community.iqiyi.com/openApi/score/add?' + w(web_sign_date) + "&sign=" + sign 256 | } 257 | $nobyda.get(URL, function(error, response, data) { 258 | let WebCheckinMsg = ''; 259 | const Details = LogDetails ? `msg:\n${data||error}` : '' 260 | try { 261 | if (error) throw new Error(`接口请求出错 ‼️`); 262 | const obj = JSON.parse(data) 263 | if (obj.code === "A00000") { 264 | if (obj.data[0].code === "A0000") { 265 | var quantity = obj.data[0].score; 266 | var continued = obj.data[0].continuousValue; 267 | WebCheckinMsg = "网页签到: 获得积分" + quantity + ", 累计签到" + continued + "天 🎉" 268 | } else { 269 | WebCheckinMsg = "网页签到: " + obj.data[0].message + " ⚠️" 270 | } 271 | } else { 272 | WebCheckinMsg = `网页签到: ${obj.message||'未知错误'} ⚠️` 273 | } 274 | } catch (e) { 275 | WebCheckinMsg = `网页签到: ${e.message || e}`; 276 | } 277 | pushMsg.push(WebCheckinMsg); 278 | console.log(`爱奇艺-${WebCheckinMsg} ${Details}`); 279 | resolve() 280 | }) 281 | }) 282 | } 283 | 284 | function Lottery(s) { 285 | return new Promise(resolve => { 286 | const URL = { 287 | url: 'https://iface2.iqiyi.com/aggregate/3.0/lottery_activity?app_k=0&app_v=0&platform_id=0&dev_os=0&dev_ua=0&net_sts=0&qyid=0&psp_uid=0&psp_cki=' + P00001 + '&psp_status=0&secure_p=0&secure_v=0&req_sn=0' 288 | } 289 | $nobyda.get(URL, async function(error, response, data) { 290 | const Details = LogDetails ? `msg:\n${data||error}` : '' 291 | let LotteryMsg; 292 | try { 293 | if (error) throw new Error("接口请求出错 ‼️"); 294 | const obj = JSON.parse(data); 295 | $nobyda.last = data.match(/(机会|已经)用完/) ? true : false 296 | if (obj.awardName && obj.code == 0) { 297 | LotteryMsg = `应用抽奖: ${!$nobyda.last ? `${obj.awardName.replace(/《.+》/, "未中奖")} 🎉` : `您的抽奖次数已经用完 ⚠️`}` 298 | } else if (data.match(/\"errorReason\"/)) { 299 | const msg = data.match(/msg=.+?\)/) ? data.match(/msg=(.+?)\)/)[1].replace(/用户(未登录|不存在)/, "Cookie无效") : "" 300 | LotteryMsg = `应用抽奖: ${msg || `未知错误`} ⚠️` 301 | } else { 302 | LotteryMsg = `应用抽奖: ${data}` 303 | } 304 | } catch (e) { 305 | LotteryMsg = `应用抽奖: ${e.message || e}`; 306 | } 307 | console.log(`爱奇艺-${LotteryMsg} (${s+1}) ${Details}`) 308 | pushMsg.push(LotteryMsg) 309 | if (!$nobyda.last) { 310 | resolve(1) 311 | } else { 312 | resolve() 313 | } 314 | }) 315 | }) 316 | } 317 | 318 | function getTaskList(task) { 319 | return new Promise(resolve => { 320 | $nobyda.get(`https://tc.vip.iqiyi.com/taskCenter/task/queryUserTask?P00001=${P00001}`, function(error, response, data) { 321 | let taskListMsg, taskList = []; 322 | const Details = LogDetails ? `msg:\n${data||error}` : ''; 323 | try { 324 | if (error) throw new Error(`请求失败`); 325 | const obj = JSON.parse(data); 326 | if (obj.code == 'A00000' && obj.data && obj.data.tasks) { 327 | ['actively', 'daily'].map((group) => { 328 | (obj.data.tasks[group] || []).map((item) => { 329 | taskList.push({ 330 | name: item.taskTitle, 331 | taskCode: item.taskCode, 332 | status: item.status 333 | }) 334 | }) 335 | }) 336 | taskListMsg = `获取成功!`; 337 | } else { 338 | taskListMsg = `获取失败!`; 339 | } 340 | } catch (e) { 341 | taskListMsg = `${e.message||e} ‼️`; 342 | } 343 | console.log(`爱奇艺-任务列表: ${taskListMsg} ${Details}`) 344 | resolve(taskList) 345 | }) 346 | }) 347 | } 348 | 349 | function joinTask(task) { 350 | return new Promise(resolve => { 351 | $nobyda.get('https://tc.vip.iqiyi.com/taskCenter/task/joinTask?taskCode=' + task.taskCode + '&lang=zh_CN&platform=0000000000000000&P00001=' + P00001, function (error, response, data) { 352 | let joinTaskMsg, Details = LogDetails ? `msg:\n${data||error}` : ''; 353 | try { 354 | if (error) throw new Error(`请求失败`); 355 | const obj = JSON.parse(data); 356 | joinTaskMsg = obj.code || '领取失败'; 357 | } catch (e) { 358 | joinTaskMsg = `错误 ${e.message||e}`; 359 | } 360 | console.log(`爱奇艺-领取任务: ${task.name} => ${joinTaskMsg} ${Details}`) 361 | resolve() 362 | }) 363 | }) 364 | } 365 | 366 | function notifyTask(task) { 367 | return new Promise(resolve => { 368 | $nobyda.get('https://tc.vip.iqiyi.com/taskCenter/task/notify?taskCode=' + task.taskCode + '&lang=zh_CN&platform=0000000000000000&P00001=' + P00001, function (error, response, data) { 369 | let notifyTaskMsg, Details = LogDetails ? `msg:\n${data||error}` : ''; 370 | try { 371 | if (error) throw new Error(`请求失败`); 372 | const obj = JSON.parse(data); 373 | notifyTaskMsg = obj.code || '失败'; 374 | } catch (e) { 375 | notifyTaskMsg = e.message || e; 376 | } 377 | console.log(`爱奇艺-开始任务: ${task.name} => ${notifyTaskMsg} ${Details}`) 378 | resolve() 379 | }) 380 | }) 381 | } 382 | 383 | function getTaskRewards(task) { 384 | return new Promise(resolve => { 385 | $nobyda.get('https://tc.vip.iqiyi.com/taskCenter/task/getTaskRewards?taskCode=' + task.taskCode + '&lang=zh_CN&platform=0000000000000000&P00001=' + P00001, function (error, response, data) { 386 | let RewardsMsg; 387 | const Details = LogDetails ? `msg:\n${data||error}` : '' 388 | try { 389 | if (error) throw new Error(`接口请求出错 ‼️`); 390 | const obj = JSON.parse(data) 391 | if (obj.msg === "成功" && obj.code === "A00000" && obj.dataNew[0] !== undefined) { 392 | RewardsMsg = `任务奖励: ${task.name} => ${obj.dataNew[0].name + obj.dataNew[0].value} 🎉` 393 | } else { 394 | RewardsMsg = `任务奖励: ${task.name} => ${obj.msg!==`成功`&&obj.msg||`未完成`} ⚠️` 395 | } 396 | } catch (e) { 397 | RewardsMsg = `任务奖励: ${e.message||e}`; 398 | } 399 | pushMsg.push(RewardsMsg) 400 | console.log(`爱奇艺-${RewardsMsg} ${Details}`) 401 | resolve() 402 | }) 403 | }) 404 | } 405 | 406 | function GetCookie() { 407 | if (!$request.url.includes("/apis/user/info.action")) { 408 | $nobyda.notify(`写入爱奇艺Cookie失败`, "", "请更新脚本配置(URL正则/MITM)"); 409 | return 410 | } 411 | var CKA = $request.headers['Cookie']; 412 | var iQIYI = CKA && CKA.includes("P00001=") && CKA.includes("P00003=") && CKA; 413 | var RA = $nobyda.read("CookieQY") 414 | if (CKA && iQIYI) { 415 | if (RA != iQIYI) { 416 | var OldTime = $nobyda.read("CookieQYTime") 417 | if (!$nobyda.write(iQIYI, "CookieQY")) { 418 | $nobyda.notify(`${RA?`更新`:`首次写入`}爱奇艺签到Cookie失败‼️`, "", "") 419 | } else { 420 | if (!OldTime || OldTime && (Date.now() - OldTime) / 1000 >= 21600) { 421 | $nobyda.write(JSON.stringify(Date.now()), "CookieQYTime") 422 | $nobyda.notify(`${RA?`更新`:`首次写入`}爱奇艺签到Cookie成功 🎉`, "", "") 423 | } else { 424 | console.log(`\n更新爱奇艺Cookie成功! 🎉\n检测到频繁通知, 已转为输出日志`) 425 | } 426 | } 427 | } else { 428 | console.log("\n爱奇艺-与本机储存Cookie相同, 跳过写入 ⚠️") 429 | } 430 | } else { 431 | $nobyda.notify(`爱奇艺`, "", "写入Cookie失败,关键值缺失 ⚠️") 432 | } 433 | } 434 | 435 | async function BarkNotify(c,k,t,b,p){for(let i=0;i<3;i++){console.log(`🔷Bark notify >> Start push (${i+1})`);const s=await new Promise((n)=>{c.post({url:p||'https://api.day.app/push',headers:{'Content-Type':'application/json'},body:JSON.stringify({title:t,body:b,device_key:k,ext_params:{group:t}})},(e,r,d)=>r&&r.status==200?n(1):n(d||e))});if(s===1){console.log('✅Push success!');break}else{console.log(`❌Push failed! >> ${s.message||s}`)}}} 436 | 437 | function nobyda() { 438 | const times = 0 439 | const start = Date.now() 440 | const isRequest = typeof $request != "undefined" 441 | const isSurge = typeof $httpClient != "undefined" 442 | const isQuanX = typeof $task != "undefined" 443 | const isLoon = typeof $loon != "undefined" 444 | const isJSBox = typeof $app != "undefined" && typeof $http != "undefined" 445 | const isNode = typeof require == "function" && !isJSBox; 446 | const node = (() => { 447 | if (isNode) { 448 | const request = require('request'); 449 | return ({ 450 | request 451 | }) 452 | } else { 453 | return (null) 454 | } 455 | })() 456 | const notify = (title, subtitle, message) => { 457 | if (isQuanX) $notify(title, subtitle, message) 458 | if (isSurge) $notification.post(title, subtitle, message) 459 | if (isNode) log('\n' + title + '\n' + subtitle + '\n' + message) 460 | if (isJSBox) $push.schedule({ 461 | title: title, 462 | body: subtitle ? subtitle + "\n" + message : message 463 | }) 464 | } 465 | const write = (value, key) => { 466 | if (isQuanX) return $prefs.setValueForKey(value, key) 467 | if (isSurge) return $persistentStore.write(value, key) 468 | } 469 | const read = (key) => { 470 | if (isQuanX) return $prefs.valueForKey(key) 471 | if (isSurge) return $persistentStore.read(key) 472 | } 473 | const adapterStatus = (response) => { 474 | if (response) { 475 | if (response.status) { 476 | response["statusCode"] = response.status 477 | } else if (response.statusCode) { 478 | response["status"] = response.statusCode 479 | } 480 | } 481 | return response 482 | } 483 | const get = (options, callback) => { 484 | if (isQuanX) { 485 | if (typeof options == "string") options = { 486 | url: options 487 | } 488 | options["method"] = "GET" 489 | $task.fetch(options).then(response => { 490 | callback(null, adapterStatus(response), response.body) 491 | }, reason => callback(reason.error, null, null)) 492 | } 493 | if (isSurge) $httpClient.get(options, (error, response, body) => { 494 | callback(error, adapterStatus(response), body) 495 | }) 496 | if (isNode) { 497 | node.request(options, (error, response, body) => { 498 | callback(error, adapterStatus(response), body) 499 | }) 500 | } 501 | if (isJSBox) { 502 | if (typeof options == "string") options = { 503 | url: options 504 | } 505 | options["header"] = options["headers"] 506 | options["handler"] = function(resp) { 507 | let error = resp.error; 508 | if (error) error = JSON.stringify(resp.error) 509 | let body = resp.data; 510 | if (typeof body == "object") body = JSON.stringify(resp.data); 511 | callback(error, adapterStatus(resp.response), body) 512 | }; 513 | $http.get(options); 514 | } 515 | } 516 | const post = (options, callback) => { 517 | if (isQuanX) { 518 | if (typeof options == "string") options = { 519 | url: options 520 | } 521 | options["method"] = "POST" 522 | $task.fetch(options).then(response => { 523 | callback(null, adapterStatus(response), response.body) 524 | }, reason => callback(reason.error, null, null)) 525 | } 526 | if (isSurge) { 527 | options.headers['X-Surge-Skip-Scripting'] = false 528 | $httpClient.post(options, (error, response, body) => { 529 | callback(error, adapterStatus(response), body) 530 | }) 531 | } 532 | if (isNode) { 533 | node.request.post(options, (error, response, body) => { 534 | callback(error, adapterStatus(response), body) 535 | }) 536 | } 537 | if (isJSBox) { 538 | if (typeof options == "string") options = { 539 | url: options 540 | } 541 | options["header"] = options["headers"] 542 | options["handler"] = function(resp) { 543 | let error = resp.error; 544 | if (error) error = JSON.stringify(resp.error) 545 | let body = resp.data; 546 | if (typeof body == "object") body = JSON.stringify(resp.data) 547 | callback(error, adapterStatus(resp.response), body) 548 | } 549 | $http.post(options); 550 | } 551 | } 552 | 553 | const log = (message) => console.log(message) 554 | const time = () => { 555 | const end = ((Date.now() - start) / 1000).toFixed(2) 556 | return console.log('\n签到用时: ' + end + ' 秒') 557 | } 558 | const done = (value = {}) => { 559 | if (isQuanX) return $done(value) 560 | if (isSurge) isRequest ? $done(value) : $done() 561 | } 562 | return { 563 | isRequest, 564 | isNode, 565 | notify, 566 | write, 567 | read, 568 | get, 569 | post, 570 | log, 571 | time, 572 | times, 573 | done 574 | } 575 | }; 576 | 577 | function k(e, t) { 578 | var a = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {} 579 | , n = a.split 580 | , c = void 0 === n ? "|" : n 581 | , r = a.sort 582 | , s = void 0 === r || r 583 | , o = a.splitSecretKey 584 | , i = void 0 !== o && o 585 | , l = s ? Object.keys(t).sort() : Object.keys(t) 586 | , u = l.map((function (e) { 587 | return "".concat(e, "=").concat(t[e]) 588 | } 589 | )).join(c) + (i ? c : "") + e; 590 | return md5(u) 591 | } 592 | 593 | // Modified from https://github.com/blueimp/JavaScript-MD5 594 | function md5(string){function RotateLeft(lValue,iShiftBits){return(lValue<>>(32-iShiftBits))}function AddUnsigned(lX,lY){var lX4,lY4,lX8,lY8,lResult;lX8=(lX&0x80000000);lY8=(lY&0x80000000);lX4=(lX&0x40000000);lY4=(lY&0x40000000);lResult=(lX&0x3FFFFFFF)+(lY&0x3FFFFFFF);if(lX4&lY4){return(lResult^0x80000000^lX8^lY8)}if(lX4|lY4){if(lResult&0x40000000){return(lResult^0xC0000000^lX8^lY8)}else{return(lResult^0x40000000^lX8^lY8)}}else{return(lResult^lX8^lY8)}}function F(x,y,z){return(x&y)|((~x)&z)}function G(x,y,z){return(x&z)|(y&(~z))}function H(x,y,z){return(x^y^z)}function I(x,y,z){return(y^(x|(~z)))}function FF(a,b,c,d,x,s,ac){a=AddUnsigned(a,AddUnsigned(AddUnsigned(F(b,c,d),x),ac));return AddUnsigned(RotateLeft(a,s),b)};function GG(a,b,c,d,x,s,ac){a=AddUnsigned(a,AddUnsigned(AddUnsigned(G(b,c,d),x),ac));return AddUnsigned(RotateLeft(a,s),b)};function HH(a,b,c,d,x,s,ac){a=AddUnsigned(a,AddUnsigned(AddUnsigned(H(b,c,d),x),ac));return AddUnsigned(RotateLeft(a,s),b)};function II(a,b,c,d,x,s,ac){a=AddUnsigned(a,AddUnsigned(AddUnsigned(I(b,c,d),x),ac));return AddUnsigned(RotateLeft(a,s),b)};function ConvertToWordArray(string){var lWordCount;var lMessageLength=string.length;var lNumberOfWords_temp1=lMessageLength+8;var lNumberOfWords_temp2=(lNumberOfWords_temp1-(lNumberOfWords_temp1%64))/64;var lNumberOfWords=(lNumberOfWords_temp2+1)*16;var lWordArray=Array(lNumberOfWords-1);var lBytePosition=0;var lByteCount=0;while(lByteCount>>29;return lWordArray};function WordToHex(lValue){var WordToHexValue="",WordToHexValue_temp="",lByte,lCount;for(lCount=0;lCount<=3;lCount++){lByte=(lValue>>>(lCount*8))&255;WordToHexValue_temp="0"+lByte.toString(16);WordToHexValue=WordToHexValue+WordToHexValue_temp.substr(WordToHexValue_temp.length-2,2)}return WordToHexValue};function Utf8Encode(string){string=string.replace(/\r\n/g,"\n");var utftext="";for(var n=0;n127)&&(c<2048)){utftext+=String.fromCharCode((c>>6)|192);utftext+=String.fromCharCode((c&63)|128)}else{utftext+=String.fromCharCode((c>>12)|224);utftext+=String.fromCharCode(((c>>6)&63)|128);utftext+=String.fromCharCode((c&63)|128)}}return utftext};var x=Array();var k,AA,BB,CC,DD,a,b,c,d;var S11=7,S12=12,S13=17,S14=22;var S21=5,S22=9,S23=14,S24=20;var S31=4,S32=11,S33=16,S34=23;var S41=6,S42=10,S43=15,S44=21;string=Utf8Encode(string);x=ConvertToWordArray(string);a=0x67452301;b=0xEFCDAB89;c=0x98BADCFE;d=0x10325476;for(k=0;k 0 && void 0 !== arguments[0] ? arguments[0] : {} 598 | , t = []; 599 | return Object.keys(e).forEach((function (a) { 600 | t.push("".concat(a, "=").concat(e[a])) 601 | } 602 | )), 603 | t.join("&") 604 | } 605 | --------------------------------------------------------------------------------