├── kuaidi.js ├── module ├── patch_script.sgmodule ├── tiiiiokjp.sgmodule └── unlock_emby.js ├── readme.md └── tieba.js /kuaidi.js: -------------------------------------------------------------------------------- 1 | const posts = [ 2 | { 3 | "note": "快递备注", 4 | "no": "快递单号" 5 | }, 6 | ] 7 | 8 | const coms = { 9 | "zhongtong": "中通快递", 10 | "sf": "顺丰快递", 11 | "shentong": "申通快递", 12 | "yto": "圆通快递", 13 | "yunda": "韵达快递", 14 | "youzhengguonei": "邮政快递包裹" 15 | } 16 | 17 | const autoapi = "https://www.kuaidi100.com/autonumber/autoComNum?resultv2=1&text=" 18 | const queryapi = "http://www.135cha.com/model/ajax.php?" 19 | 20 | posts.forEach(element => { 21 | querypost(element.no, element.note) 22 | }); 23 | 24 | async function querypost(postid, note) { 25 | if (postid) { 26 | $httpClient.post(autoapi + postid, function (error, response, data) { 27 | if (error) { 28 | $notification.post("公司ID查询失败!", "请检查", "") 29 | $done() 30 | } else { 31 | let resp = JSON.parse(data) 32 | let com_id = resp.auto[0].comCode 33 | $httpClient.get(queryapi + "type=" + com_id + "&no=" + postid, function (error, response, data) { 34 | if (error) { 35 | $notification.post("单号查询失败!", "请检查", "") 36 | } else { 37 | let res = JSON.parse(data) 38 | let time = res.data[0].time 39 | let com = coms[res.com] ? coms[res.com] : res.com 40 | let context = res.data[0].context 41 | let isStore = $persistentStore.read(postid) 42 | if (isStore) { 43 | if (isStore !== time) { 44 | let save = $persistentStore.write(time, postid) 45 | if (!save) { 46 | $notification.post("写入缓存失败!", postid) 47 | $done() 48 | } 49 | $notification.post("📦 快递追踪 <" + note + "> " + com, "更新时间:" + time, context) 50 | $done() 51 | } 52 | } else { 53 | let save = $persistentStore.write(time, postid) 54 | if (!save) { 55 | $notification.post("写入缓存失败!", postid) 56 | $done() 57 | } 58 | $notification.post("📦 快递追踪 <" + note + "> " + com, "更新时间:" + time, context) 59 | $done() 60 | } 61 | } 62 | }) 63 | } 64 | }) 65 | } else { 66 | $notification.post("单号不存在!", "请检查", "") 67 | $done() 68 | } 69 | } -------------------------------------------------------------------------------- /module/patch_script.sgmodule: -------------------------------------------------------------------------------- 1 | #!name=Patch Scripts 2 | #!desc=去广告 等功能 2023年3月19日 3 | 4 | [Script] 5 | 6 | > 微博去开屏广告 7 | 微博开屏去广告 = requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_launch.js,type=http-response,pattern=^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) 8 | 微博内去广告 = requires-body=1,script-path=https://raw.githubusercontent.com/yichahucha/surge/master/wb_ad.js,type=http-response,pattern=^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|video/tiny_stream_video_list) 9 | 10 | > 知乎去feed广告 11 | 知乎feed去广告 = requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/onewayticket255/Surge-Script/master/surge%20zhihu%20feed.js,type=http-response,pattern=https://api.zhihu.com/moments/recommend 12 | 知乎recommend去广告 = requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/onewayticket255/Surge-Script/master/surge%20zhihu%20recommend.js,type=http-response,pattern=https://api.zhihu.com/topstory/recommend 13 | 14 | > 网易蜗牛读书VIP (By yxiaocai and JO2EY) 15 | 网易蜗牛读书VIP = requires-body=1,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/File/wnyd.js,type=http-response,pattern=^https?:\/\/p\.du\.163\.com\/gain\/readtime\/info\.json 16 | 17 | > VSCO滤镜VIP 18 | vsco解锁VIP = requires-body=1,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/File/vsco.js,type=http-response,pattern=^https?:\/\/vsco\.co\/api\/subscriptions\/2.1\/user-subscriptions\/ 19 | 20 | > WPS (By eHpo) 21 | Wps解锁VIP = requires-body=1,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/Wps.js,type=http-response,pattern=^https://account.wps.*/api/users/ 22 | 23 | > 扫描全能王 pro 24 | 扫描全能王解锁Pro = requires-body=1,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/CamScanner.js,type=http-response,pattern=^https:\/\/(api|api-cs)\.intsig\.net\/purchase\/cs\/query_property\? 25 | 26 | > VUE pro 27 | VUE解锁Pro = requires-body=1,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/VUE.js,type=http-response,pattern=^https:\/\/api\.vuevideo\.net\/api\/v1\/(users\/.+\/profile|subtitle\/prepare) 28 | 29 | > PicsArt美易 pro 30 | PicsArt美易解锁Pro = requires-body=1,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/PicsArt.js,type=http-response,pattern=^https:\/\/api\.(picsart|meiease)\.c(n|om)\/users\/show\/me\.json 31 | 32 | > 轻颜相机 & ulike & 蒸汽波相机(vaporcam)三合一 解锁VIP(By @s y & Alex0510) 33 | 轻颜相机解锁VIP = requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/nzw9314/QuantumultX/master/Script/qyxj.js,type=http-response,pattern=^https:\/\/commerce-.*api\.faceu\.mobi\/commerce\/v1\/subscription\/user_info 34 | 35 | > 美颜相机一次性解锁内购(by黑黑酱) 36 | 美颜相机解锁内购 = requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/nzw9314/QuantumultX/master/Script/myxj.js,type=http-response,pattern=^https:\/\/api\.meiyan\.com\/iap\/verify\.json 37 | 38 | > draft 39 | draft解锁 = requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/langkhach270389/Scripting/master/draft.js,script-update-interval=0,type=http-response,pattern=^https:\/\/backend\.getdrafts\.com\/api\/.*\/verification 40 | 41 | > Termius 42 | http-response https:\/\/api\.termius\.com\/api\/v3\/bulk\/account\/ script-path=https://raw.githubusercontent.com/langkhach270389/Scripting/master/Terminus.js 43 | 44 | > Emby 45 | unlock_emby = type=http-response,script-path=https://raw.githubusercontent.com/isSuperman/Eurge/master/module/unlock_emby.js,pattern=^http(s?):\/\/(www\.|)mb3admin\.com\/.*$,max-size=131072,requires-body=true,timeout=10,debug=false,enable=true 46 | 47 | [MITM] 48 | hostname = %APPEND% -*.googlevideo.com, mb3admin.com, api.termius.com, api.meiyan.com, commerce-.*api.faceu.mobi, commerce-api.faceu.mobi, api.rr.tv, api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, p.du.163.com, vsco.co, account.wps.*, ap*.intsig.net, api.vuevideo.net, api.picsart.c*, api.meiease.c*, api.meiease.c*, api-intl.mr.meitu.com, ap*.intsig.net, backend.getdrafts.com, nomo.dafork.com 49 | -------------------------------------------------------------------------------- /module/tiiiiokjp.sgmodule: -------------------------------------------------------------------------------- 1 | #!name=Tiiiiokjp 2 | #!desc=修复部分问题 3 | 4 | [URL Rewrite] 5 | 6 | (?<=_region=)CN(?=&) JP 307 7 | (?<=&mcc_mnc=)4 2 307 8 | ^(https?:\/\/(tnc|dm)[\w-]+\.\w+\.com\/.+)(\?)(.+) $1$3 302 9 | (^https?:\/\/*\.\w{4}okv.com\/.+&.+)(\d{2}\.3\.\d)(.+) $118.0$3 302 10 | 11 | [MITM] 12 | hostname = %APPEND% *.tiktokv.com, *.byteoversea.com, *.tik-tokapi.com 13 | -------------------------------------------------------------------------------- /module/unlock_emby.js: -------------------------------------------------------------------------------- 1 | let body = $response.body; 2 | if($request.url.includes("/admin/service/appstore/register")) 3 | { 4 | body = 5 | ` 6 | {"featId": "","registered": true,"expDate": "2099-01-01","key": ""} 7 | ` 8 | } else if($request.url.includes("/emby/Plugins/SecurityInfo")) 9 | { 10 | body = 11 | ` 12 | {SupporterKey: "", IsMBSupporter: true} 13 | ` 14 | } else if($request.url.includes("/admin/service/registration/validateDevice")) 15 | { 16 | body = 17 | ` 18 | {"cacheExpirationDays": 365,"message": "Device Valid","resultCode": "GOOD"} 19 | ` 20 | } else if($request.url.includes("/admin/service/registration/validate")) 21 | { 22 | body = 23 | ` 24 | {"featId":"","registered":true,"expDate":"2099-01-01","key":""} 25 | ` 26 | }else if($request.url.includes("/admin/service/registration/getStatus")) 27 | { 28 | body = 29 | ` 30 | {"deviceStatus":"0","planType":"Lifetime","subscriptions":{}} 31 | ` 32 | } 33 | 34 | $done({ 35 | status : 200, 36 | body : body 37 | }); 38 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # Surge JavaScript 脚本说明 2 | ## 【贴吧签到】[代码](https://raw.githubusercontent.com/IsSuperman/Surge-js/master/tieba.js) 3 | 1. 将脚本内容复制到本地。 4 | 2. 下载【百度贴吧】iOS手机版。 5 | 3. 使用Surge或Thor等抓包工具对【一键签到】抓包,得到Header和Body的内容,将内容填到脚本对应的地方。 6 | ``` 7 | header:{ 8 | "Accept-Encoding": "gzip", 9 | ... 10 | }, 11 | body:"" 12 | ``` 13 | 注:header参数为对象,body的参数为字符串。 14 | 15 | 4. 设置Cron参数,建议凌晨一点以后(否则会失败),如 0 8 * * * (每天上午8点整自动签到) 16 | 17 | ## 【快递追踪】[代码](https://raw.githubusercontent.com/IsSuperman/Surge-js/master/kuaidi.js) 18 | 1. 快递备注可自己设置。 19 | 2. 快递单号务必填到双引号内。 20 | 3. 支持同时追踪多个快递。 21 | ``` 22 | const posts = [ 23 | { 24 | "note": "快递1", 25 | "no": "快递单号1" 26 | },{ 27 | "note": "快递2", 28 | "no": "快递单号2" 29 | }, 30 | ] 31 | ``` 32 | 4. 设置Cron参数,如 0 6-20 * * * (每天6点到20点整点检查一次)。 -------------------------------------------------------------------------------- /tieba.js: -------------------------------------------------------------------------------- 1 | var d = new Date() 2 | var m = d.getMonth() + 1 3 | var day = d.getDate() 4 | 5 | const signUrl = { 6 | url: "http://c.tieba.baidu.com/c/c/forum/msign", 7 | header: {}, 8 | body: {} 9 | } 10 | 11 | $httpClient.post(signUrl, function (error, response, data) { 12 | if (error) { 13 | $notification.post("百度贴吧 自动签到", "接口错误!", error) 14 | $done() 15 | } 16 | let resp = JSON.parse(data) 17 | let state = resp.error["errno"] 18 | if (state === "0") { 19 | let sign_days = resp.info[0]["sign_day_count"] 20 | $notification.post("🌟 " + m + "月" + day + "日【自动签到】报告", "", "🔺 百度贴吧 成功!已连续签到" + sign_days + "天") 21 | $done() 22 | } else if (state === "340011" && resp.sign_notice === "") { 23 | $notification.post("🌟 " + m + "月" + day + "日【自动签到】报告", "", "🔺 百度贴吧 今天已签过!") 24 | $done() 25 | } else { 26 | $notification.post("‼️ " + m + "月" + day + "日【自动签到】报告", "🔔 百度贴吧 失败!", "请检查!") 27 | $done() 28 | } 29 | }) --------------------------------------------------------------------------------