From a16e9ab3bf31b8438d555a7811f451b1442295f8 Mon Sep 17 00:00:00 2001 From: sve1r Date: Mon, 11 Jul 2022 16:08:25 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=A9=20=E4=BC=98=E5=8C=96=E8=84=9A?= =?UTF-8?q?=E6=9C=AC=E5=AD=98=E6=94=BE=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Scripts/AdBlock/Wechat/Wechat.js | 20 +- Scripts/AdBlock/Weibo/weibo_ad.js | 161 ++++++++++------- Scripts/AdBlock/Weibo/weibo_launch.js | 201 ++------------------- Scripts/Unlock/BdCloud.js | 49 +++++ Scripts/Unlock/CamSanner.js | 22 +++ Scripts/Unlock/Kuwo.js | 40 ++++ Scripts/{VIP/MIX => Unlock}/MIX.js | 0 Scripts/{VIP/PicsArt => Unlock}/PicsArt.js | 0 Scripts/Unlock/Polarr.js | 31 ++++ Scripts/Unlock/VSCO.js | 43 +++++ Scripts/Unlock/WPS.js | 46 +++++ Scripts/Unlock/Wnyd.js | 20 ++ Scripts/Unlock/Zymh.js | 20 ++ Scripts/VIP/VSCO/VSCO.js | 37 ---- Scripts/VIP/VSCO/VSCO_Vip | 20 -- 15 files changed, 395 insertions(+), 315 deletions(-) create mode 100644 Scripts/Unlock/BdCloud.js create mode 100644 Scripts/Unlock/CamSanner.js create mode 100644 Scripts/Unlock/Kuwo.js rename Scripts/{VIP/MIX => Unlock}/MIX.js (100%) rename Scripts/{VIP/PicsArt => Unlock}/PicsArt.js (100%) create mode 100644 Scripts/Unlock/Polarr.js create mode 100644 Scripts/Unlock/VSCO.js create mode 100644 Scripts/Unlock/WPS.js create mode 100644 Scripts/Unlock/Wnyd.js create mode 100644 Scripts/Unlock/Zymh.js delete mode 100644 Scripts/VIP/VSCO/VSCO.js delete mode 100644 Scripts/VIP/VSCO/VSCO_Vip diff --git a/Scripts/AdBlock/Wechat/Wechat.js b/Scripts/AdBlock/Wechat/Wechat.js index 3c765cc..600142a 100644 --- a/Scripts/AdBlock/Wechat/Wechat.js +++ b/Scripts/AdBlock/Wechat/Wechat.js @@ -1,12 +1,16 @@ /* -Remove the WeChat public account bottom ad -by Choler -QX: -^https?:\/\/mp\.weixin\.qq\.com\/mp\/getappmsgad url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/File/Wechat.js -Surge4: -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 -Surge & QX MITM = mp.weixin.qq.com, -*/ +微信 去除公众号文章底部广告 + +*************************** +QuantumultX: + +[rewrite_local] +^https?:\/\/mp\.weixin\.qq\.com\/mp\/getappmsgad url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Wechat/Wechat.js + +[mitm] +hostname = mp.weixin.qq.com + +**************************/ var obj = JSON.parse($response.body); obj.advertisement_num = 0; diff --git a/Scripts/AdBlock/Weibo/weibo_ad.js b/Scripts/AdBlock/Weibo/weibo_ad.js index 8a2bba1..4f688c2 100644 --- a/Scripts/AdBlock/Weibo/weibo_ad.js +++ b/Scripts/AdBlock/Weibo/weibo_ad.js @@ -1,11 +1,5 @@ /* -Weibo remove ads - -[rewrite_local] -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)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) url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/File/wb_ad.js -^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/File/wb_launch.js -[mitm] -hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com +README:https://github.com/yichahucha/surge/tree/master */ const path1 = "/groups/timeline"; @@ -26,16 +20,22 @@ const path15 = "/statuses/video_timeline"; const path16 = "/page"; const path17 = "/statuses/friends_timeline"; const path18 = "/!/photos/pic_recommend_status"; +const path19 = "/statuses/video_mixtimeline"; +const path20 = "/video/tiny_stream_video_list"; +const path21 = "/photo/info"; +const path22 = "/live/media_homelist"; +const path23 = "/remind/unread_count"; const url = $request.url; -var body = $response.body; +let body = $response.body; if ( - url.indexOf(path1) != -1 || - url.indexOf(path2) != -1 || - url.indexOf(path10) != -1 || - url.indexOf(path15) != -1 || - url.indexOf(path17) != -1 + url.indexOf(path1) !== -1 || + url.indexOf(path2) !== -1 || + url.indexOf(path10) !== -1 || + url.indexOf(path15) !== -1 || + url.indexOf(path17) !== -1 || + url.indexOf(path20) !== -1 ) { let obj = JSON.parse(body); if (obj.statuses) obj.statuses = filter_timeline_statuses(obj.statuses); @@ -44,15 +44,11 @@ if ( if (obj.num) obj.num = obj.original_num; if (obj.trends) obj.trends = []; body = JSON.stringify(obj); -} - -if (url.indexOf(path3) != -1) { +} else if (url.indexOf(path3) !== -1) { let obj = JSON.parse(body); if (obj.trend) delete obj.trend; body = JSON.stringify(obj); -} - -if (url.indexOf(path4) != -1) { +} else if (url.indexOf(path4) !== -1) { let obj = JSON.parse(body); obj.recommend_max_id = 0; if (obj.status) { @@ -65,16 +61,11 @@ if (url.indexOf(path4) != -1) { obj.datas = []; } body = JSON.stringify(obj); -} - -if (url.indexOf(path5) != -1 || - url.indexOf(path18) != -1) { +} else if (url.indexOf(path5) !== -1 || url.indexOf(path18) !== -1) { let obj = JSON.parse(body); obj.data = {}; body = JSON.stringify(obj); -} - -if (url.indexOf(path6) != -1) { +} else if (url.indexOf(path6) !== -1) { let obj = JSON.parse(body); let segments = obj.segments; if (segments && segments.length > 0) { @@ -82,42 +73,46 @@ if (url.indexOf(path6) != -1) { while (i--) { const element = segments[i]; let is_ad = element.is_ad; - if (is_ad && is_ad == true) segments.splice(i, 1); + if (is_ad && is_ad === true) segments.splice(i, 1); } } body = JSON.stringify(obj); -} - -if (url.indexOf(path7) != -1) { +} else if (url.indexOf(path7) !== -1) { let obj = JSON.parse(body); obj.datas = []; body = JSON.stringify(obj); -} - -if (url.indexOf(path8) != -1) { +} else if (url.indexOf(path8) !== -1) { let obj = JSON.parse(body); obj.story_list = []; body = JSON.stringify(obj); -} - -if (url.indexOf(path11) != -1) { +} else if (url.indexOf(path11) !== -1 || url.indexOf(path22) !== -1) { let obj = JSON.parse(body); obj.data = []; body = JSON.stringify(obj); -} - -if ( - url.indexOf(path9) != -1 || - url.indexOf(path12) != -1 || - url.indexOf(path13) != -1 || - url.indexOf(path14) != -1 || - url.indexOf(path16) != -1 +} else if ( + url.indexOf(path9) !== -1 || + url.indexOf(path12) !== -1 || + url.indexOf(path13) !== -1 || + url.indexOf(path14) !== -1 || + url.indexOf(path16) !== -1 ) { let obj = JSON.parse(body); if (obj.cards) obj.cards = filter_timeline_cards(obj.cards); body = JSON.stringify(obj); +} else if (url.indexOf(path19) !== -1) { + let obj = JSON.parse(body); + delete obj.expandable_view; + if (obj.hasOwnProperty("expandable_views")) delete obj.expandable_views; + body = JSON.stringify(obj); +} else if (url.indexOf(path21) !== -1) { + if (body.indexOf("ad_params") !== -1) { + body = JSON.stringify({}); + } +} else if (url.indexOf(path23) !== -1) { + let obj = JSON.parse(body); + obj.video = {}; + body = JSON.stringify(obj); } - $done({ body }); function filter_timeline_statuses(statuses) { @@ -125,8 +120,13 @@ function filter_timeline_statuses(statuses) { let i = statuses.length; while (i--) { let element = statuses[i]; - if (is_timeline_likerecommend(element.title)) statuses.splice(i, 1); - if (is_timeline_ad(element)) statuses.splice(i, 1); + if ( + is_timeline_likerecommend(element.title) || + is_timeline_ad(element) || + is_stream_video_ad(element) + ) { + statuses.splice(i, 1); + } } } return statuses; @@ -137,8 +137,8 @@ function filter_comments(datas) { let i = datas.length; while (i--) { const element = datas[i]; - let type = element.type; - if (type == 5 || type == 1 || type == 6) datas.splice(i, 1); + const type = element.type; + if (type === 5 || type === 1 || type === 6) datas.splice(i, 1); } } return datas; @@ -151,24 +151,36 @@ function filter_timeline_cards(cards) { let item = cards[j]; let card_group = item.card_group; if (card_group && card_group.length > 0) { - let i = card_group.length; - while (i--) { - let card_group_item = card_group[i]; - let card_type = card_group_item.card_type; - if (card_type && card_type == 9) { - if (is_timeline_ad(card_group_item.mblog)) card_group.splice(i, 1); - } else if (card_type && card_type == 118) { - card_group.splice(i, 1); - } else if (card_type && card_type == 42) { - if (card_group_item.desc == '\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba') { - cards.splice(j, 1); - break; + if (item.itemid && item.itemid === "hotword") { + filter_top_search(card_group); + } else { + let i = card_group.length; + while (i--) { + let card_group_item = card_group[i]; + let card_type = card_group_item.card_type; + if (card_type) { + if (card_type === 9) { + if (is_timeline_ad(card_group_item.mblog)) + card_group.splice(i, 1); + } else if (card_type === 118 || card_type === 89) { + card_group.splice(i, 1); + } else if (card_type === 42) { + if ( + card_group_item.desc === + "\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba" + ) { + cards.splice(j, 1); + break; + } + } else if (card_type === 17) { + filter_top_search(card_group_item.group); + } } } } } else { let card_type = item.card_type; - if (card_type && card_type == 9) { + if (card_type && card_type === 9) { if (is_timeline_ad(item.mblog)) cards.splice(j, 1); } } @@ -177,15 +189,30 @@ function filter_timeline_cards(cards) { return cards; } +function filter_top_search(group) { + if (group && group.length > 0) { + let k = group.length; + while (k--) { + let group_item = group[k]; + if (group_item.hasOwnProperty("promotion")) { + group.splice(k, 1); + } + } + } +} + function is_timeline_ad(mblog) { if (!mblog) return false; - let promotiontype = mblog.promotion && mblog.promotion.type && mblog.promotion.type == "ad"; - let mblogtype = mblog.mblogtype && mblog.mblogtype == 1; - return (promotiontype || mblogtype) ? true : false; + let promotiontype = + mblog.promotion && mblog.promotion.type && mblog.promotion.type === "ad"; + let mblogtype = mblog.mblogtype && mblog.mblogtype === 1; + return !!(promotiontype || mblogtype); } function is_timeline_likerecommend(title) { - return title && title.type && title.type == "likerecommend" ? true : false; + return !!(title && title.type && title.type === "likerecommend"); } -// by yichahucha \ No newline at end of file +function is_stream_video_ad(item) { + return item.ad_state && item.ad_state === 1; +} \ No newline at end of file diff --git a/Scripts/AdBlock/Weibo/weibo_launch.js b/Scripts/AdBlock/Weibo/weibo_launch.js index 8a2bba1..471838c 100644 --- a/Scripts/AdBlock/Weibo/weibo_launch.js +++ b/Scripts/AdBlock/Weibo/weibo_launch.js @@ -1,191 +1,26 @@ /* -Weibo remove ads - -[rewrite_local] -^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)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) url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/File/wb_ad.js -^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/File/wb_launch.js -[mitm] -hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com +README:https://github.com/yichahucha/surge/tree/master */ -const path1 = "/groups/timeline"; -const path2 = "/statuses/unread"; -const path3 = "/statuses/extend"; -const path4 = "/comments/build_comments"; -const path5 = "/photo/recommend_list"; -const path6 = "/stories/video_stream"; -const path7 = "/statuses/positives/get"; -const path8 = "/stories/home_list"; -const path9 = "/profile/statuses"; -const path10 = "/statuses/friends/timeline"; -const path11 = "/service/picfeed"; -const path12 = "/fangle/timeline"; -const path13 = "/searchall"; -const path14 = "/cardlist"; -const path15 = "/statuses/video_timeline"; -const path16 = "/page"; -const path17 = "/statuses/friends_timeline"; -const path18 = "/!/photos/pic_recommend_status"; +const path1 = "/interface/sdk/sdkad.php"; +const path2 = "/wbapplua/wbpullad.lua"; const url = $request.url; -var body = $response.body; - -if ( - url.indexOf(path1) != -1 || - url.indexOf(path2) != -1 || - url.indexOf(path10) != -1 || - url.indexOf(path15) != -1 || - url.indexOf(path17) != -1 -) { - let obj = JSON.parse(body); - if (obj.statuses) obj.statuses = filter_timeline_statuses(obj.statuses); - if (obj.advertises) obj.advertises = []; - if (obj.ad) obj.ad = []; - if (obj.num) obj.num = obj.original_num; - if (obj.trends) obj.trends = []; +let body = $response.body; +let obj; +if (url.indexOf(path1) !== -1) { + let re = /\{.*}/; + body = body.match(re); + obj = JSON.parse(body); + if (obj.background_delay_display_time) obj.background_delay_display_time = 60*60*24*365; + if (obj.show_push_splash_ad) obj.show_push_splash_ad = false; + if (obj.ads) obj.ads = []; + body = JSON.stringify(obj) + 'OK'; +} +if (url.indexOf(path2) !== -1) { + obj = JSON.parse(body); + if (obj.cached_ad && obj.cached_ad.ads) obj.cached_ad.ads = []; body = JSON.stringify(obj); } -if (url.indexOf(path3) != -1) { - let obj = JSON.parse(body); - if (obj.trend) delete obj.trend; - body = JSON.stringify(obj); -} - -if (url.indexOf(path4) != -1) { - let obj = JSON.parse(body); - obj.recommend_max_id = 0; - if (obj.status) { - if (obj.top_hot_structs) { - obj.max_id = obj.top_hot_structs.call_back_struct.max_id; - delete obj.top_hot_structs; - } - if (obj.datas) obj.datas = filter_comments(obj.datas); - } else { - obj.datas = []; - } - body = JSON.stringify(obj); -} - -if (url.indexOf(path5) != -1 || - url.indexOf(path18) != -1) { - let obj = JSON.parse(body); - obj.data = {}; - body = JSON.stringify(obj); -} - -if (url.indexOf(path6) != -1) { - let obj = JSON.parse(body); - let segments = obj.segments; - if (segments && segments.length > 0) { - let i = segments.length; - while (i--) { - const element = segments[i]; - let is_ad = element.is_ad; - if (is_ad && is_ad == true) segments.splice(i, 1); - } - } - body = JSON.stringify(obj); -} - -if (url.indexOf(path7) != -1) { - let obj = JSON.parse(body); - obj.datas = []; - body = JSON.stringify(obj); -} - -if (url.indexOf(path8) != -1) { - let obj = JSON.parse(body); - obj.story_list = []; - body = JSON.stringify(obj); -} - -if (url.indexOf(path11) != -1) { - let obj = JSON.parse(body); - obj.data = []; - body = JSON.stringify(obj); -} - -if ( - url.indexOf(path9) != -1 || - url.indexOf(path12) != -1 || - url.indexOf(path13) != -1 || - url.indexOf(path14) != -1 || - url.indexOf(path16) != -1 -) { - let obj = JSON.parse(body); - if (obj.cards) obj.cards = filter_timeline_cards(obj.cards); - body = JSON.stringify(obj); -} - -$done({ body }); - -function filter_timeline_statuses(statuses) { - if (statuses && statuses.length > 0) { - let i = statuses.length; - while (i--) { - let element = statuses[i]; - if (is_timeline_likerecommend(element.title)) statuses.splice(i, 1); - if (is_timeline_ad(element)) statuses.splice(i, 1); - } - } - return statuses; -} - -function filter_comments(datas) { - if (datas && datas.length > 0) { - let i = datas.length; - while (i--) { - const element = datas[i]; - let type = element.type; - if (type == 5 || type == 1 || type == 6) datas.splice(i, 1); - } - } - return datas; -} - -function filter_timeline_cards(cards) { - if (cards && cards.length > 0) { - let j = cards.length; - while (j--) { - let item = cards[j]; - let card_group = item.card_group; - if (card_group && card_group.length > 0) { - let i = card_group.length; - while (i--) { - let card_group_item = card_group[i]; - let card_type = card_group_item.card_type; - if (card_type && card_type == 9) { - if (is_timeline_ad(card_group_item.mblog)) card_group.splice(i, 1); - } else if (card_type && card_type == 118) { - card_group.splice(i, 1); - } else if (card_type && card_type == 42) { - if (card_group_item.desc == '\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba') { - cards.splice(j, 1); - break; - } - } - } - } else { - let card_type = item.card_type; - if (card_type && card_type == 9) { - if (is_timeline_ad(item.mblog)) cards.splice(j, 1); - } - } - } - } - return cards; -} - -function is_timeline_ad(mblog) { - if (!mblog) return false; - let promotiontype = mblog.promotion && mblog.promotion.type && mblog.promotion.type == "ad"; - let mblogtype = mblog.mblogtype && mblog.mblogtype == 1; - return (promotiontype || mblogtype) ? true : false; -} - -function is_timeline_likerecommend(title) { - return title && title.type && title.type == "likerecommend" ? true : false; -} - -// by yichahucha \ No newline at end of file +$done({body}); \ No newline at end of file diff --git a/Scripts/Unlock/BdCloud.js b/Scripts/Unlock/BdCloud.js new file mode 100644 index 0000000..72943e3 --- /dev/null +++ b/Scripts/Unlock/BdCloud.js @@ -0,0 +1,49 @@ +/* +百度网盘 解锁在线视频倍率/清晰度 + +*************************** +QuantumultX: + +[rewrite_local] +https:\/\/pan\.baidu\.com\/rest\/\d\.\d\/membership\/user url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/BaiduCloud.js + +[mitm] +hostname = pan.baidu.com +**************************/ + +if ($response.body) { + $done({ + body: JSON.stringify({ + "product_infos": [{ + "product_id": "5310897792128633390", + "start_time": 1417260485, + "end_time": 2147483648, + "buy_time": "1417260485", + "cluster": "offlinedl", + "detail_cluster": "offlinedl", + "product_name": "gz_telecom_exp" + }, { + "product_name": "svip2_nd", + "product_description": "超级会员", + "function_num": 0, + "start_time": 1553702399, + "buy_description": "", + "buy_time": 0, + "product_id": "1", + "auto_upgrade_to_svip": 0, + "end_time": 1672502399, + "cluster": "vip", + "detail_cluster": "svip", + "status": 0 + }], + "currenttime": 1573473597, + "reminder": { + "reminderWithContent": [], + "advertiseContent": [] + }, + "request_id": 7501873289383874371 + }) + }); +} else { + $done({}); +} \ No newline at end of file diff --git a/Scripts/Unlock/CamSanner.js b/Scripts/Unlock/CamSanner.js new file mode 100644 index 0000000..224ecb1 --- /dev/null +++ b/Scripts/Unlock/CamSanner.js @@ -0,0 +1,22 @@ +/* +CamScanner 解锁部分高级特权 + +*************************** +Quantumult X: + +[rewrite_local] +^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 + +[mitm] +hostname = ap*.intsig.net + +**************************/ +let obj = { + "data": + { + "psnl_vip_property": { + "expiry": "1687017600" + } + } +}; +$done({body: JSON.stringify(obj)}); \ No newline at end of file diff --git a/Scripts/Unlock/Kuwo.js b/Scripts/Unlock/Kuwo.js new file mode 100644 index 0000000..564213f --- /dev/null +++ b/Scripts/Unlock/Kuwo.js @@ -0,0 +1,40 @@ +/* +酷我音乐 解锁会员试听及部分功能 + +*************************** +QuantumultX: + +[rewrite_local] +^https?:\/\/vip1\.kuwo\.cn\/(vip\/v2\/user\/vip|vip\/spi/mservice) url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/VIP/Kuwo/vip.js + +[mitm] +hostname = vip1.kuwo.cn + +**************************/ + +let body = $response.body; +const url = $request.url; +let obj = JSON.parse(body); + +const vip = '/vip/v2/user/vip'; +const time = '/vip/spi/mservice'; + +if (url.indexOf(vip) !== -1) { + obj.data["isNewUser"] = "2"; + obj.data["vipLuxuryExpire"] = "1835312949000"; + obj.data["time"] = "1961170340993"; + obj.data["isYearUser"] = "2"; + obj.data["vipmExpire"] = "1835312949000"; + obj.data["vipOverSeasExpire"] = "1835312949000"; + obj.data["vipExpire"] = "1835312949000"; + obj.data["vip3Expire"] = "1835312949000"; + body = JSON.stringify(obj); +} + +if (url.indexOf(time) !== -1) { + obj["isVIPMAutoPay"] = 2; + obj["isVIPLuxAutoPay"] = 2; + body = JSON.stringify(obj); +} + +$done({body}); \ No newline at end of file diff --git a/Scripts/VIP/MIX/MIX.js b/Scripts/Unlock/MIX.js similarity index 100% rename from Scripts/VIP/MIX/MIX.js rename to Scripts/Unlock/MIX.js diff --git a/Scripts/VIP/PicsArt/PicsArt.js b/Scripts/Unlock/PicsArt.js similarity index 100% rename from Scripts/VIP/PicsArt/PicsArt.js rename to Scripts/Unlock/PicsArt.js diff --git a/Scripts/Unlock/Polarr.js b/Scripts/Unlock/Polarr.js new file mode 100644 index 0000000..4233c21 --- /dev/null +++ b/Scripts/Unlock/Polarr.js @@ -0,0 +1,31 @@ +/* +Polarr泼辣修图 解锁特权 (需恢复购买) + +*************************** +QuantumultX: + +[rewrite_local] +^https:\/\/api\.polaxiong\.com\/v1\/payments\/appleiap\/receipts\/confirmation url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/Polarr.js + +[mitm] +hostname = api.polaxiong.com + +**************************/ + +const sta = typeof $task !== "undefined" ? "HTTP/1.1 200 OK" : 200; +const res = $response; +const req = $request; + +if (res.body && req.method === "PUT") { + $done({ + body: JSON.stringify({ + "app": "PPE", + "isUnlimited": true, + "membershipExpiryDate": "2028-06-06T08:00:00.000Z" + }), + status: sta, + headers: res.headers + }); +} else { + $done({}); +} \ No newline at end of file diff --git a/Scripts/Unlock/VSCO.js b/Scripts/Unlock/VSCO.js new file mode 100644 index 0000000..8af29fb --- /dev/null +++ b/Scripts/Unlock/VSCO.js @@ -0,0 +1,43 @@ +/******************************** + Membership unlock for VSCO & 1Blocker + Please note that you may need to reinstall app for script to work. + + QuantumultX rewrite link: + https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/VIP/VSCO/Unlock.js + + Please note that the above rewrite link requires open KOP-XIAO's resource parser + + ********************************/ + +const resp = {}; +const obj = JSON.parse(typeof $response != "undefined" && $response.body || null); +const ua = $request.headers['User-Agent'] || $request.headers['user-agent']; +const list = { + 'VSCO': { name: 'membership', id: 'com.circles.fin.premium.yearly' }, + '1Blocker': { name: 'premium', id: 'blocker.ios.subscription.yearly' } +}; +const data = { + "expires_date": "2030-02-18T07:52:54Z", + "original_purchase_date": "2020-02-11T07:52:55Z", + "purchase_date": "2020-02-11T07:52:54Z" +}; + +if (typeof $response == "undefined") { + delete $request.headers["x-revenuecat-etag"]; // prevent 304 issues + delete $request.headers["X-RevenueCat-ETag"]; + resp.headers = $request.headers; +} else if (obj && obj.subscriber) { + obj.subscriber.subscriptions = obj.subscriber.subscriptions || {}; + obj.subscriber.entitlement = obj.subscriber.entitlement || {}; + for (const i in list) { + if (new RegExp(`^${i}`, `i`).test(ua)) { + obj.subscriber.subscriptions[list[i].id] = data; + obj.subscriber.entitlements[list[i].name] = JSON.parse(JSON.stringify(data)); + obj.subscriber.entitlements[list[i].name].product_identifier = list[i].id; + break; + } + } + resp.body = JSON.stringify(obj); +} + +$done(resp); \ No newline at end of file diff --git a/Scripts/Unlock/WPS.js b/Scripts/Unlock/WPS.js new file mode 100644 index 0000000..6c4738c --- /dev/null +++ b/Scripts/Unlock/WPS.js @@ -0,0 +1,46 @@ +/* +WPS Office 解锁部分功能 + +*************************** +QuantumultX: + +[rewrite_local] +^https?:\/\/[a-z-]*account\.wps\.c(n|om)(:\d+|)\/api\/users url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/Wps.js + +[mitm] +hostname = *account.wps.cn, *account.wps.com + +**************************/ + +var body = JSON.parse($response.body); +var obj = { + exp: 0, + level: 3, + privilege: [ + { spid: "data_recover", times: 0, expire_time: 1846256142 }, + { spid: "ocr", times: 0, expire_time: 1846256142 }, + { spid: "pdf2doc", times: 0, expire_time: 1846256142 }, + { spid: "pdf_merge", times: 0, expire_time: 1846256142 }, + { spid: "pdf_sign", times: 0, expire_time: 1846256142 }, + { spid: "pdf_split", times: 0, expire_time: 1846256142 } + ], + result: "ok", + total_buy: 0, + total_cost: -30, + userid: body.userid, + vip: { + name: "超级会员", + has_ad: 0, + memberid: 40, + expire_time: 1846256142, + enabled: [ + { memberid: 40, name: "超级会员", expire_time: 1846256142 }, + { memberid: 20, name: "WPS会员", expire_time: 1846256142 }, + { memberid: 12, name: "稻壳会员", expire_time: 1846256142 } + ] + }, + wealth: 0, + expire_time: 1846256142 +}; + +$done({ body: JSON.stringify(obj) }); \ No newline at end of file diff --git a/Scripts/Unlock/Wnyd.js b/Scripts/Unlock/Wnyd.js new file mode 100644 index 0000000..e7338ed --- /dev/null +++ b/Scripts/Unlock/Wnyd.js @@ -0,0 +1,20 @@ +/* +网易蜗牛读书 解锁特权 +原作者: yxiaocai & JO2EY + +*************************** +QuantumultX: + +[rewrite_local] +^https?:\/\/p\.du\.163\.com\/gain\/readtime\/info\.json url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/VIP/Wnyd/vip.js + +[mitm] +hostname = p.du.163.com + +**************************/ +var body = $response.body; +var obj = JSON.parse(body); + +obj.tradeEndTime = 1679685290000; +body = JSON.stringify(obj); +$done({body}); \ No newline at end of file diff --git a/Scripts/Unlock/Zymh.js b/Scripts/Unlock/Zymh.js new file mode 100644 index 0000000..49b05bb --- /dev/null +++ b/Scripts/Unlock/Zymh.js @@ -0,0 +1,20 @@ +/* +解锁知音漫客付费章节 (需登录) + +*************************** +QuantumultX: + +[rewrite_local] +^https:\/\/apigate\.zymk\.cn\/(zymk-getuserinfo-api\/v1\/getuserinfo|zymk-userpurchased-api\/v1\/userpurchased\/paychapters)\/ url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/VIP/Zymh/unlock.js + +[mitm] +hostname = apigate.zymk.cn + +**************************/ + +var obj = JSON.parse($response.body); +obj.status = 0; +obj.data.isvip = 1; +obj.data.coins = 6666; +obj.data.Cgold = 6666; +$done({body: JSON.stringify(obj)}); \ No newline at end of file diff --git a/Scripts/VIP/VSCO/VSCO.js b/Scripts/VIP/VSCO/VSCO.js deleted file mode 100644 index 8f5365a..0000000 --- a/Scripts/VIP/VSCO/VSCO.js +++ /dev/null @@ -1,37 +0,0 @@ -/* -VSCO_Vip unlock vip - -QX: -^https?:\/\/vsco\.co\/api\/subscriptions\/2.1\/user-subscriptions\/ url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/File/vsco.js - -Surge4: -http-response ^https?:\/\/vsco\.co\/api\/subscriptions\/2.1\/user-subscriptions\/ requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/File/vsco.js - -Surge & QX MITM = vsco.co - -此脚本来自 NoByda -*/ - -var body = $response.body; -var url = $request.url; - -const path1 = '/api/subscriptions/2.1/user-subscriptions/'; - -let obj = JSON.parse(body); - -if (url.indexOf(path1) != -1) { - obj.user_subscription["expires_on_sec"] = 1655536094; - obj.user_subscription["expired"] = false; - obj.user_subscription["payment_type"] = 2; - obj.user_subscription["is_trial_period"] = true; - obj.user_subscription["starts_on_sec"] = 1560831070; - obj.user_subscription["is_active"] = true; - obj.user_subscription["auto_renew"] = true; - obj.user_subscription["last_verified_sec"] = 1560831070; - obj.user_subscription["subscription_code"] = "VSCOANNUAL"; - obj.user_subscription["user_id"] = 54624336; - obj.user_subscription["source"] = 1; - body = JSON.stringify(obj); - } - -$done({body}); diff --git a/Scripts/VIP/VSCO/VSCO_Vip b/Scripts/VIP/VSCO/VSCO_Vip deleted file mode 100644 index 7c50a41..0000000 --- a/Scripts/VIP/VSCO/VSCO_Vip +++ /dev/null @@ -1,20 +0,0 @@ -{ - "user_subscription": { - "expires_on_sec": 1655536094, - "is_intro_period": false, - "expired": false, - "payment_type": 2, - "user_id": 54624336, - "source": 1, - "is_trial_period": true, - "starts_on_sec": 1560831070, - "intro_offer_consumed": true, - "is_active": true, - "canceled_at_sec": null, - "auto_renew": true, - "is_in_grace_period": false, - "last_verified_sec": 1560831070, - "invalid_reason": null, - "subscription_code": "VSCOANNUAL" - } -}