├── README.md ├── aimeiju.txt ├── bfg-1.14.0.jar ├── bfg.bat ├── bfg.txt ├── hh.txt ├── install.html ├── js ├── CamScanner.js ├── Nicegram.js ├── aimeiju.js ├── amap.js ├── baidumap.js ├── caiyun.js ├── dsx555.js ├── enpass.js ├── jd_price.js ├── kuwo.js ├── lxy.js ├── meitu.js ├── qimao.js ├── slidebox.js ├── storm.js ├── xlyx.js ├── xxtea_js.js ├── xxtea_原生JS.js └── yjb.js └── task ├── ampDache.js ├── ampDacheCoupon.js ├── csvw.js ├── ffqc.js ├── geely.js ├── hifini.js ├── hzh.js ├── iios.js ├── jetour.js ├── nissan.js ├── volvo.js ├── wbzj.js ├── wps.js ├── xdm.js └── zeekr.js /README.md: -------------------------------------------------------------------------------- 1 | 这个人很懒,什么都没留下。 -------------------------------------------------------------------------------- /aimeiju.txt: -------------------------------------------------------------------------------- 1 | #xmj.app 2 | hostname = api.bjxkhc.com 3 | #ads 4 | ^http(s)://api.bjxkhc.com/index.php/app/ios/ads/index url reject-dict 5 | ^http(s)://api.bjxkhc.com/index.php/app/ios/ver/index_ios$ url reject 6 | ^http(s)://api.bjxkhc.com/index.php/app/ios/pay/ok$ url reject-dict 7 | #VIP&ads 8 | ^http(s)://api.bjxkhc.com/index.php/app/ios/(vod/show|(user|vod|topic|type)/index) url script-response-body https://raw.githubusercontent.com/wf021325/qx/master/js/aimeiju.js -------------------------------------------------------------------------------- /bfg-1.14.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wf021325/qx/f45cefbb6450be10f64adc9e061a1669c465a762/bfg-1.14.0.jar -------------------------------------------------------------------------------- /bfg.bat: -------------------------------------------------------------------------------- 1 | java -jar bfg-1.14.0.jar --delete-files bfg.bat 2 | java -jar bfg-1.14.0.jar --delete-files bfg.txt 3 | java -jar bfg-1.14.0.jar --delete-files hh.txt 4 | java -jar bfg-1.14.0.jar --delete-files storm.js 5 | java -jar bfg-1.14.0.jar --delete-files caiyun.js 6 | -------------------------------------------------------------------------------- /bfg.txt: -------------------------------------------------------------------------------- 1 | 官网 2 | https://rtyley.github.io/bfg-repo-cleaner/ 3 | 4 | 删除文件 5 | java -jar bfg-1.14.0.jar --delete-files hh.txt 6 | 7 | java -jar bfg-1.14.0.jar --delete-files 文件名 8 | 9 | 删文件夹 10 | java -jar bfg-1.14.0.jar --delete-folders "{js,task,qx}" 11 | 12 | 13 | git reflog expire --expire=now --all && git gc --prune=now --aggressive 14 | git push -f 15 | 16 | -------------------------------------------------------------------------------- /hh.txt: -------------------------------------------------------------------------------- 1 | hostname = asia-east2-slidebox-ios-prod.cloudfunctions.net , *.wtzw.com , ap*.intsig.net , restore-access.indream.app , *.cyapi.cn 2 | 3 | # >>> slidebox 4 | #hostname = asia-east2-slidebox-ios-prod.cloudfunctions.net 5 | ^https?:\/\/asia-east2-slidebox-ios-prod\.cloudfunctions\.net\/api_v1$ url script-response-body https://raw.githubusercontent.com/wf021325/qx/master/js/slidebox.js 6 | 7 | # >>> 七猫小说 8 | # hostname = *.wtzw.com 9 | # ^https:\/\/api-cfg\.wtzw\.com\/v\d\/\w+\/index\?ad_unit_id= url reject-dict 10 | ^https?:\/\/(api-\w+|xiaoshuo)\.wtzw\.com\/api\/v\d\/ url script-response-body https://raw.githubusercontent.com/wf021325/qx/master/js/qimao.js 11 | 12 | # >>> 扫描全能王 13 | # hostname = ap*.intsig.net 14 | ^https?:\/\/api(|-cs)\.intsig\.net\/purchase\/cs\/query_property\? url script-response-body https://raw.githubusercontent.com/wf021325/qx/master/js/CamScanner.js 15 | 16 | # >>> Nicegram 17 | # hostname = restore-access.indream.app 18 | ^https?:\/\/restore-access\.indream\.app\/restoreAccess\?id=\d{5,10} url script-echo-response https://raw.githubusercontent.com/wf021325/qx/master/js/Nicegram.js 19 | 20 | # >>> 彩云天气 21 | # hostname = *.cyapi.cn 22 | # 普通版广告 23 | ^https:\/\/ad\.cyapi\.cn\/v2\/req\?app_name=weather url reject-dict 24 | # 赏叶赏花 25 | ^https:\/\/wrapper\.cyapi\.cn\/v1\/activity\?app_name=weather url script-response-body https://raw.githubusercontent.com/wf021325/qx/master/js/caiyun.js 26 | # 解锁vip 27 | ^https:\/\/biz\.cyapi\.cn\/v2\/user url script-response-body https://raw.githubusercontent.com/wf021325/qx/master/js/caiyun.js 28 | # 卫星云图 48小时预报 29 | ^https:\/\/wrapper\.cyapi\.cn\/v1\/(satellite|nafp\/origin_images) url script-request-header https://raw.githubusercontent.com/wf021325/qx/master/js/caiyun.js 30 | 31 | -------------------------------------------------------------------------------- /install.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | install 5 | 6 | 7 | 8 | 12 | 55 | 70 | 71 | 72 | 73 |
74 |
使用Safari打开安装
75 |
【一个不行就换另一个】
76 |
本地API(部分版本IOS无法使用)
77 |
远程API(都能使用,但可能跑路)
78 |
${ipaName}
79 |
${OSVersion}
80 |
安装1(本地API)
81 |
安装2(远程API)
82 |
83 | 84 | 85 | -------------------------------------------------------------------------------- /js/CamScanner.js: -------------------------------------------------------------------------------- 1 | /* 2 | CamScanner 解锁部分高级特权 3 | ==================================== 4 | [rewrite_local] 5 | ^https:\/\/api(|-cs)\.intsig\.net\/purchase\/cs\/query_property\? url script-response-body https://raw.githubusercontent.com/wf021325/qx/master/js/CamScanner.js 6 | 7 | [mitm] 8 | hostname = ap*.intsig.net 9 | ==================================== 10 | */ 11 | let body = $response.body; 12 | body = '{"data":{"psnl_vip_property":{"expiry":"3742732800"}}}'; 13 | $done({body}); -------------------------------------------------------------------------------- /js/Nicegram.js: -------------------------------------------------------------------------------- 1 | /* 2 | Nicegram 3 | ==================================== 4 | [rewrite_local] 5 | ^https:\/\/restore-access\.indream\.app\/restoreAccess\?id=\d{5,10} url script-echo-response https://raw.githubusercontent.com/wf021325/qx/master/js/Nicegram.js 6 | 7 | [mitm] 8 | hostname = restore-access.indream.app 9 | ==================================== 10 | */ 11 | 12 | 13 | const res = { 14 | status : 'undefined' !== typeof $task ? 'HTTP/1.1 200 OK' : 200, 15 | headers : {'Content-Type':'application/json'}, 16 | body : '{"data": {"premiumAccess": true}}' 17 | } 18 | $done(res); -------------------------------------------------------------------------------- /js/aimeiju.js: -------------------------------------------------------------------------------- 1 | /* 2 | #爱美剧 3 | hostname = *.*.com 4 | 5 | #启动广告/弹窗 6 | ^http(s)://\w+.\w+.com/index.php/app/ios/ads/index url reject-dict 7 | ^http(s)://\w+.\w+.com/index.php/app/ios/ver/index_ios$ url reject 8 | ^http(s)://\w+.\w+.com/index.php/app/ios/pay/ok$ url reject-dict 9 | 10 | #VIP 11 | ^http(s)://\w+.\w+.com/index.php/app/ios/(vod\/show|(user|vod|topic|type)/index) url script-response-body 12 | */ 13 | var body = $response.body; 14 | var url = $request.url; 15 | const user = "/index.php/app/ios/user/index"; //用户信息 16 | const show = "/index.php/app/ios/vod/show"; //视频播放页面 17 | const banner = "/index.php/app/ios/vod/index";//首页轮播广告 18 | const topic = "/index.php/app/ios/topic/index";//豆瓣热榜中间广告 19 | const type = "/index.php/app/ios/type/index"//综合专区,美剧专区中间广告 20 | 21 | if (url.indexOf(user) != -1){ 22 | let obj = JSON.parse(body); 23 | obj.data.user.viptime = "2088-08-08 08:08:08"; 24 | obj.data.user.cion = "88888"; 25 | obj.data.user.vip = "1"; 26 | body = JSON.stringify(obj); 27 | } 28 | 29 | if (url.indexOf(show) != -1) { 30 | let obj = JSON.parse(body); 31 | obj.data.looktime = -1; 32 | obj.data.vip = "4"; 33 | //obj.data.advertising = {}; 34 | delete obj.data.advertising;//视频下方轮播,删掉也不能清除广告占位 35 | obj.data.CT_App_Show_Pic1 = "";//联系客服图片 36 | obj.data.CT_App_Show_Url1 = "";//联系客服链接 37 | obj.data.CT_App_Show_Vod1 = "https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=1519044039,3175177225&fm=26&gp=0.jpg";//片头广告,留空的话不会自动播放 38 | obj.data.CT_App_Show_Vod_Time1 = "0";//片头广告显示时间(0秒也短暂显示) 39 | obj.data.CT_App_Show_Vod_Url1 = "";//片头广告链接 40 | obj.data.CT_App_Show_Vod_Type1 = "2";//片头广告显示类型,0一直显示,1暂停播放显示,2显示后自动播放 41 | obj.data.CT_App_Show_Vod_must_Time1 = "0";//片头联系客服图片显示时间,前面改VIP这里自动变0 42 | obj.data.CT_Pic_url1_pause = "";//暂停播放联系客服图片 43 | obj.data.CT_Pic_url1_pause_skip = "";//暂停播放联系客服链接 44 | body = JSON.stringify(obj); 45 | } 46 | 47 | if (url.indexOf(banner) != -1) { 48 | let obj = JSON.parse(body); 49 | let data = obj.data 50 | for (var i = data.length - 1 ; i >= 0 ; i--) { 51 | if (data[i].ad == 1) { 52 | data.splice(i, 1)//从后往前删除一个(针对数组) 53 | } 54 | } 55 | body = JSON.stringify(obj); 56 | } 57 | 58 | 59 | if (url.indexOf(topic) != -1||url.indexOf(type) != -1) { 60 | let obj = JSON.parse(body); 61 | let data = obj.data 62 | for (var i = data.length - 1 ; i >= 0 ; i--) { 63 | if (data[i].ad == 1) { 64 | data[i].ad = 0; 65 | data[i].pic = ""; 66 | delete data[i].url//删除 67 | } 68 | } 69 | body = JSON.stringify(obj); 70 | } 71 | $done({body}); 72 | -------------------------------------------------------------------------------- /js/amap.js: -------------------------------------------------------------------------------- 1 | /* 2 | # 来源 https://github.com/RuCu6/QuanX/blob/main/Rewrites/Cube/bdmap.snippet 3 | #!name = 高德地图 4 | #!desc = 缺德地图有治了 5 | #!author = RuCu6 kokoryh 6 | #!update = 2023-06-05 11:00 7 | 8 | [rewrite_local] 9 | # 此条可以屏蔽首次进入的天气动效图层 但是会导致足迹不显示地图数据 10 | ;^https:\/\/mps\.amap\.com\/ws\/mps\/scene\? url reject-dict 11 | 12 | # 其他 13 | ^http:\/\/amdc\.m\.taobao\.com\/amdc\/mobileDispatch AMapiPhone url-and-header reject-dict 14 | ^https:\/\/m5\.amap\.com\/ws\/asa\/ads_attribution\? url reject-dict 15 | ^https:\/\/m5\.amap\.com\/ws\/shield\/scene\/recommend\? url reject-dict 16 | 17 | # 导航详情页,路线规划,地点详情页,搜索详情页 18 | ^https:\/\/m5\.amap\.com\/ws\/faas\/amap-navigation\/card-service-route-plan\? url reject-dict 19 | ^https:\/\/m5\.amap\.com\/ws\/shield\/search\/new_hotword\? url reject-dict 20 | ^https:\/\/m5\.amap\.com\/ws\/shield\/search\/(common\/coupon\/info|poi\/detail)\? url script-response-body https://raw.githubusercontent.com/wf021325/qx/master/js/amap.js 21 | ^https:\/\/m5\.amap\.com\/ws\/shield\/search_poi\/tips_adv\? url reject-dict 22 | ^https:\/\/m5\.amap\.com\/ws\/shield\/search_poi\/(city_feed|mps|search\/sp|tips_operation_location)\? url script-response-body https://raw.githubusercontent.com/wf021325/qx/master/js/amap.js 23 | ^https:\/\/m5\.amap\.com\/ws\/shield\/search(_poi)?\/sug\? url script-response-body https://raw.githubusercontent.com/wf021325/qx/master/js/amap.js 24 | 25 | # 首页,推广卡片,红点角标,右上角动图,搜索框热词,左下角天气,消息横幅 26 | ^https:\/\/m5\.amap\.com\/ws\/faas\/amap-navigation\/main-page\? url script-response-body https://raw.githubusercontent.com/wf021325/qx/master/js/amap.js 27 | ^https:\/\/m5\.amap\.com\/ws\/faas\/amap-navigation\/main-page-(assets|location)\? url reject-dict 28 | ^https:\/\/m5\.amap\.com\/ws\/(mapapi\/hint_text\/offline_data|message\/notice\/list|shield\/search\/new_hotword)\? url reject-dict 29 | ^https:\/\/m5\.amap\.com\/ws\/mapapi\/poi\/infolite\/\? url script-response-body https://raw.githubusercontent.com/wf021325/qx/master/js/amap.js 30 | ^https:\/\/m5\.amap\.com\/ws\/shield\/frogserver\/aocs\/updatable\/1\? url script-response-body https://raw.githubusercontent.com/wf021325/qx/master/js/amap.js 31 | ^https:\/\/m5\.amap\.com\/ws\/valueadded\/weather\/v2\? url reject-dict 32 | ^https:\/\/sns\.amap\.com\/ws\/msgbox\/pull(_mp)?\? url reject-dict 33 | 34 | # 我的页面,个人主页,推广卡片 35 | ^https:\/\/m5\.amap\.com\/ws\/faas\/amap-navigation\/usr-profile-fc\/(highlightV2|home)\? url script-response-body https://raw.githubusercontent.com/wf021325/qx/master/js/amap.js 36 | ^https:\/\/m5\.amap\.com\/ws\/shield\/dsp\/profile\/index\/nodefaasv3\? url script-response-body https://raw.githubusercontent.com/wf021325/qx/master/js/amap.js 37 | 38 | # 附近页 39 | ^https:\/\/m5\.amap\.com\/ws\/shield\/search\/nearbyrec_smart\? url script-response-body https://raw.githubusercontent.com/wf021325/qx/master/js/amap.js 40 | 41 | # 开屏广告 42 | ^https:\/\/m5\.amap\.com\/ws\/valueadded\/alimama\/splash_screen\? url script-response-body https://raw.githubusercontent.com/wf021325/qx/master/js/amap.js 43 | 44 | # 打车页,红点角标,弹窗,推广卡片 45 | ^https:\/\/m5-zb\.amap\.com\/ws\/boss\/order(_web\/friendly_information|\/car\/king_toolbox_car_bubble)\? url reject-dict 46 | ^https:\/\/m5-zb\.amap\.com\/ws\/promotion-web\/resource\?? url script-response-body https://raw.githubusercontent.com/wf021325/qx/master/js/amap.js 47 | ^https:\/\/m5-zb\.amap\.com\/ws\/sharedtrip\/taxi\/order_detail_car_tips\? url script-response-body https://raw.githubusercontent.com/wf021325/qx/master/js/amap.js 48 | 49 | [mitm] 50 | hostname = m5.amap.com, m5-zb.amap.com, sns.amap.com 51 | 52 | */ 53 | 54 | 55 | 56 | // 2023-06-21 08:50 57 | const url = $request.url; 58 | if (!$response.body) $done({}); 59 | let obj = JSON.parse($response.body); 60 | 61 | if (url.includes("/faas/amap-navigation/main-page")) { 62 | // 首页底部卡片 63 | if (obj.data.cardList) { 64 | obj.data.cardList = obj.data.cardList.filter( 65 | (i) => 66 | i.dataKey === "ContinueNavigationCard" || // 继续导航 67 | i.dataKey === "FrequentLocation" || // 常去地点 68 | i.dataKey === "LoginCard" // 登陆卡片 69 | ); 70 | } 71 | if (obj.data.mapBizList) { 72 | obj.data.mapBizList = obj.data.mapBizList.filter( 73 | (i) => i.dataKey === "FindCarVirtualCard" // 显示关联车辆位置 74 | ); 75 | } 76 | } else if (url.includes("/faas/amap-navigation/usr-profile-fc/")) { 77 | const item = [ 78 | "bulletData", 79 | "cardList", 80 | "dataList", 81 | "homePageData", 82 | "privateData", 83 | "shareData", 84 | "upgradeDialogData" 85 | ]; 86 | for (let i of item) { 87 | if (obj.data?.[i]) { 88 | obj.data[i] = []; 89 | } 90 | } 91 | } else if (url.includes("/mapapi/poi/infolite")) { 92 | // 搜索结果 列表详情 93 | if (obj.data?.district?.poi_list) { 94 | let poi = obj.data.district.poi_list[0]; 95 | // 订票横幅 订票用高德 出行享低价 96 | if (poi?.transportation) { 97 | delete poi.transportation; 98 | } 99 | // 周边推荐 列表项 景点 酒店 美食 100 | if (poi?.feed_rec_tab) { 101 | delete poi.feed_rec_tab; 102 | } 103 | } else if (obj.data?.list_data) { 104 | let list = obj.data.list_data.content[0]; 105 | if (list?.bottom?.taxi_button) { 106 | list.bottom.taxi_button = 0; 107 | } 108 | // 底栏 酒店 109 | if (list?.map_bottom_bar?.hotel) { 110 | delete list.map_bottom_bar.hotel; 111 | } 112 | if (list?.poi?.item_info?.tips_bottombar_button?.hotel) { 113 | delete list.poi.item_info.tips_bottombar_button.hotel; 114 | } 115 | if (list?.tips_operation_info) { 116 | delete list.tips_operation_info; 117 | } 118 | if (list?.bottom?.bottombar_button?.hotel) { 119 | delete list.bottom.bottombar_button.hotel; 120 | } 121 | // 底栏 打车 122 | if (list?.bottom?.bottombar_button?.takeCar) { 123 | delete list.bottom.bottombar_button.takeCar; 124 | } 125 | // 预览信息中的优惠推广 126 | if (list?.promotion_wrap_card) { 127 | delete list.promotion_wrap_card; 128 | } 129 | // 预览信息中的推广 130 | if (list?.hookInfo) { 131 | delete list.hookInfo; 132 | } 133 | } 134 | } else if (url.includes("/promotion-web/resource")) { 135 | // 打车页面 136 | let item = [ 137 | "alpha", // 出行优惠套餐 138 | "banner", 139 | "bravo", // 第三方推广 喜马拉雅月卡 140 | "bubble", 141 | "charlie", // 横版推广 单单立减 领专属优惠 体验问卷 142 | "icon", 143 | "other", 144 | "popup", 145 | "push", // 顶部通知 发单立享优惠 146 | "tips" 147 | ]; 148 | if (obj.data) { 149 | item.forEach((i) => { 150 | delete obj.data[i]; 151 | }); 152 | } 153 | } else if (url.includes("/sharedtrip/taxi/order_detail_car_tips")) { 154 | if (obj.data?.carTips?.data?.popupInfo) { 155 | delete obj.data.carTips.data.popupInfo; 156 | } 157 | } else if (url.includes("/shield/dsp/profile/index/nodefaasv3")) { 158 | // 我的页面 159 | if (obj.data.cardList) { 160 | obj.data.cardList = obj.data.cardList.filter( 161 | (i) => i.dataKey === "MyOrderCard" 162 | ); 163 | } 164 | if (obj.data.tipData) { 165 | delete obj.data.tipData; 166 | } 167 | // 足迹 168 | // if (obj.data.footPrintV2) { 169 | // delete obj.data.footPrintV2; 170 | // } 171 | // 成就勋章 lv1见习达人 172 | if (obj.data.memberInfo) { 173 | delete obj.data.memberInfo; 174 | } 175 | } else if (url.includes("/shield/frogserver/aocs")) { 176 | // 整体图层 177 | const item = [ 178 | "Naviendpage_Searchwords", 179 | "SplashScreenControl", 180 | "TipsTaxiButton", 181 | "TrainOrderBanner", 182 | "_testmark_info", 183 | "_user_profile_", 184 | "air_card", 185 | "amapCoin", 186 | "aos_feedback", 187 | "apple_location_log_collect", 188 | "collect", 189 | "deviceml_force_recommend", 190 | "deviceml_update_apk_conf", 191 | "footprint", // 足迹 192 | "gd_code_cover", 193 | "gd_notch_logo", 194 | "his_input_tip", 195 | "home_business_position_config", // 首页右上角动图 196 | "homepage_resource_config", 197 | "hotel_activity", 198 | "hotel_fillin_opt", 199 | "hotel_loop", 200 | "hotel_portal", 201 | "hotel_tipsicon", 202 | "icon_show", 203 | "info_env_setting", 204 | "ip_square", 205 | "ip_square_share", 206 | "isNewSearchMapCard", // 可能是足迹 207 | "isPoiBubbleDisplay", 208 | "lab_beta", 209 | "lab_screenrecording", 210 | "landing_page_info", 211 | "list_action_drawer", 212 | "listguide", 213 | "map_environment_air", 214 | "map_weather_switch", 215 | "maplayers", // 赏花地图 216 | "message_tab", 217 | "navi_end", // 导航结束页面 218 | "nearby", 219 | "nearby_business_popup", 220 | "nearby_map_entry_guide", 221 | "nearby_map_pull_down_guide", 222 | "nore_rec", 223 | "operation_layer", // 首页右上角图层 224 | "photo_with_location", 225 | "poi_rec", 226 | "preword", 227 | "profileHeaderPic", 228 | "profiletTopBtn", 229 | "recommend_api", 230 | "recommend_key", 231 | "redesign_user", 232 | "routeresult_banner", 233 | "search_homepage", 234 | "search_keyword", 235 | "search_moni", 236 | "search_perf", 237 | "search_poi_recommend", 238 | "search_service_adcode", 239 | "search_word", 240 | "small_biz_fun", 241 | "small_biz_index", 242 | "small_biz_news", 243 | "splashscreen", 244 | "splashview_config", 245 | "sur_bar", 246 | "taxi_activity", 247 | "testflight_adiu", 248 | "tf_remind", 249 | "third_party_places", 250 | "tips_bar_black_list", 251 | "tips_hook", 252 | "trackupload", 253 | "user_insight", // 您对本次导航满意吗 254 | "vip", 255 | "weather_restrict_config" 256 | ]; 257 | for (let i of item) { 258 | if (obj.data?.[i]) { 259 | obj.data[i] = { status: 1, version: "", value: "" }; 260 | } 261 | } 262 | } else if (url.includes("/shield/search/common/coupon/info")) { 263 | if (obj.data) { 264 | obj.data = {}; 265 | } 266 | } else if (url.includes("/shield/search/nearbyrec_smart")) { 267 | // 附近页面 268 | if (obj.data.modules) { 269 | obj.data.modules = obj.data.modules.filter( 270 | (i) => i === "head" || i === "search_hot_words" || i === "feed_rec" 271 | ); 272 | } 273 | } else if (url.includes("/shield/search/poi/detail")) { 274 | // 搜索结果 模块详情 275 | const item = [ 276 | // "anchor", 277 | "adv_compliance_info", // 服务提供方 278 | "adv_gift", 279 | // "base_info", 280 | "bigListBizRec", // 周边景点推荐 三张景点大图 281 | // "brand_introduction", 282 | "brand_shop_bar", 283 | // "brand_story", 284 | "checkIn", 285 | "check_in", // 足迹打卡 286 | "city_discount", // 专业老师在线答疑 287 | "claim", // 立即认领 管理店铺 288 | "co_branded_card", 289 | "collector_guide", // 游玩的图文指南 290 | "common_coupon_bar", // 领券条幅 新客专享 省钱卡 291 | "comprehensiveEditEntrance", // 编辑地点信息 292 | // "consultancy", 293 | "contributor", // 地点贡献 294 | // "coupon_allowance", 295 | // "coupon_entrance", 296 | "cpt_service_shop", //买卖二手房 297 | // "craftsman_entry", 298 | // "crowd_index", // 人流量情况 299 | // "detailFeedCommodity", 300 | // "detail_bottom_shop_service", 301 | "divergentRecommendModule", // 你可能还喜欢 302 | // "evaluate", // 高德出行评分 303 | // "events", 304 | "everyOneToSee", // 大家还在看 305 | "feedback", // 问题反馈 306 | "first_surround_estate_tab", // 周边小区 307 | // "footer_logo", 308 | // "foreclosurehouse", 309 | // "gallery_info", // 现场照片 310 | // "ggc_entry", 311 | // "hkfMiniPortal", // 订票页面 飞机 火车 汽车 312 | "horizontalGoodsShelf", 313 | "hot_new_house_estate", 314 | "hot_shop", 315 | "hotelCoupon", 316 | // "hotelRooms", // 酒店所有房间 317 | // "hourHotelRooms", // 钟点房 318 | "houseList", 319 | "houseOfficeBrandIntroduction", 320 | "houseOfficeInfo", 321 | "houseOfficeNotice", 322 | "houseOfficeService", 323 | "house_apart_info", 324 | "house_buying_agent", 325 | "house_coupon", 326 | "house_cp_clues", 327 | "house_cpt_coupon", 328 | "house_cpt_grab", 329 | "house_price", 330 | "house_rent_sale_agency", 331 | // "human_traffic", // 人流量情况 有统计图 332 | "image_banner", 333 | "legal_document", // 房源法律信息 334 | "listBizRec_1", 335 | "listBizRec_2", // 周边餐饮 336 | "membership", // 高德菲住卡 会员项目 337 | "movie_info", // 优惠购票 景点宣传片 338 | "multi_page_anchor", // 二级导航菜单 门票 评论 推荐 339 | "nearbyRecommendModule", // 周边推荐 340 | "nearby_house", 341 | "nearby_new_house_estate", 342 | "nearby_office_estate", 343 | "nearby_old_sell_estate", 344 | "nearby_play_rec", // 附近玩乐项目 345 | "newGuest", // 新客专享 346 | "newRelatedRecommends", // 探索周边 347 | "new_operation_banner", // 精选活动 高德的推广 348 | "newsellhouse", 349 | // "normal_nav_bar", // 右上角图标 客服 反馈 350 | // "notification", 351 | "officerenthouse", 352 | "officesellhouse", 353 | "official_account", // 其他平台官方账号 354 | "oldsellhouse", 355 | // "opentime", // 营业时间 356 | "operation_banner", // 横版图片推广 357 | "operator_card", 358 | // "packageShelf", 359 | "parentBizRec", 360 | "poster_banner", 361 | // "poi_intercept", 362 | "portal_entrance", // 高德旅游版块 引流到旅游频道 363 | // "question_answer_card", // 问问 地点附近的热门问题 364 | "relatedRecommends", // 附近同类型酒店 365 | // "realtorRealStep", 366 | "renthouse", 367 | "rentsaleagencyv2", 368 | "rentsaleagencyv3", 369 | "rentsalehouse", 370 | "residentialOwners", // 小区业主 371 | "reviews", // 用户评价 372 | // "roomSelect", // 选择订房日期 悬浮菜单 373 | "sameIndustryRecommendModule", 374 | "sameIndustry2RecommendModule", 375 | // "same_price_new_estate", 376 | "scenic_coupon", // 优惠券过期提示 377 | "scenic_filter", // 购票悬浮菜单 可定明日 随时退 378 | // "scenic_guide", 379 | // "scenic_helper", // 景区助手 开放时间 旺季 淡季 380 | // "scenic_knowledge", 381 | "scenic_lifeservices", // 吃住购娱 餐厅 购物 382 | "scenic_mustplay", // 必游景点 四张景点大图 383 | // "scenic_parking", 384 | "scenic_play_guide", // 景区攻略 游玩攻略 交通攻略 385 | "scenic_recommend", // 景点建议 386 | // "scenic_route", 387 | // "scenic_route_intelligent", // 推荐游玩线路 388 | // "scenic_service", 389 | // "scenic_ski", // 滑雪攻略 雪道数量 设施及服务 390 | // "scenic_story", 391 | // "scenic_ticket", // 购票 392 | // "scenic_ticket_activity", // 购票活动 393 | "scenic_voice", // 语音讲解 付费的项目 394 | "second_surround_estate_tab", // 周边房产 395 | "service_shop", // 中介门店 396 | // "shop_news", 397 | "smallListBizRec", // 周边热门酒店 398 | "smallOrListBizRec", 399 | "surround_facility", 400 | "surround_facility_new", 401 | "surround_house_tab", 402 | "surround_oldsellhouse", 403 | "surround_renthouse", 404 | "surround_rentoffice", 405 | "surround_selloffice", 406 | // "traffic", // 交通出行 地铁站 公交站 停车场 407 | "uploadBar", 408 | "upload_bar", // 上传照片 409 | "verification" // 商家已入驻 410 | // "video", 411 | ]; 412 | if (obj.data.modules) { 413 | item.forEach((i) => { 414 | delete obj.data.modules[i]; 415 | }); 416 | } 417 | } else if (url.includes("/shield/search_poi/city_feed")) { 418 | const item = ["city_feed", "transportation"]; 419 | if (obj.modules) { 420 | item.forEach((i) => { 421 | delete obj.modules[i]; 422 | }); 423 | } 424 | } else if ( 425 | url.includes("/shield/search_poi/search/sp") || 426 | url.includes("/shield/search_poi/mps") 427 | ) { 428 | if (obj.data?.list_data) { 429 | let list = obj.data.list_data.content[0]; 430 | // 详情页 底部 房产推广 431 | if (list?.hookInfo) { 432 | let hookData = list.hookInfo.data; 433 | if (hookData?.header) { 434 | delete hookData.header; 435 | } 436 | if (hookData?.house_info) { 437 | delete hookData.house_info; 438 | } 439 | } 440 | // 详情页 底部 订酒店 441 | if (list?.map_bottom_bar?.hotel) { 442 | delete list.map_bottom_bar.hotel; 443 | } 444 | if (list?.poi?.item_info?.tips_bottombar_button?.hotel) { 445 | delete list.poi.item_info.tips_bottombar_button.hotel; 446 | } 447 | if (list?.tips_operation_info) { 448 | delete list.tips_operation_info; 449 | } 450 | if (list?.bottom?.bottombar_button?.hotel) { 451 | delete list.bottom.bottombar_button.hotel; 452 | } 453 | // 搜索页 顶部卡片 454 | if ( 455 | list?.card?.card_id === "SearchCardBrand" && 456 | list?.item_type === "brandAdCard" 457 | ) { 458 | delete list.card; 459 | } 460 | if ( 461 | list?.card?.card_id === "NearbyGroupBuy" && 462 | list?.item_type === "toplist" 463 | ) { 464 | delete list.card; 465 | } 466 | if ( 467 | list?.card?.card_id === "ImageBanner" && 468 | list?.item_type === "ImageBanner" 469 | ) { 470 | delete list.card; 471 | } 472 | } else if (obj.data?.district?.poi_list) { 473 | // 搜索列表详情页 474 | let poi = obj.data.district.poi_list[0]; 475 | // 订票横幅 476 | if (poi?.transportation) { 477 | delete poi.transportation; 478 | } 479 | // 景点门票 酒店特惠 特色美食 休闲玩乐 480 | if (poi?.feed_rec_tab) { 481 | delete poi.feed_rec_tab; 482 | } 483 | } 484 | } else if ( 485 | url.includes("/shield/search_poi/sug") || 486 | url.includes("/shield/search/sug") 487 | ) { 488 | if (obj?.tip_list) { 489 | let newList = []; 490 | if (obj?.tip_list?.length > 0) { 491 | for (let item of obj.tip_list) { 492 | if ( 493 | ["12"].includes(item?.tip?.datatype_spec) || 494 | ["toplist"].includes(item?.tip?.result_type) || 495 | [ 496 | "exct_query_sug_merge_theme", 497 | "query_sug_merge_theme", 498 | "sp" 499 | ].includes(item?.tip?.task_tag) 500 | ) { 501 | continue; 502 | } else { 503 | newList.push(item); 504 | } 505 | } 506 | obj.tip_list = newList; 507 | } 508 | } else if (obj?.city_list) { 509 | let newList = []; 510 | if (obj?.city_list?.length > 0) { 511 | for (let item of obj.city_list) { 512 | let newTip = []; 513 | if (item?.tip_list?.length > 0) { 514 | for (let ii of item.tip_list) { 515 | if (["12"].includes(ii?.tip?.datatype_spec)) { 516 | continue; 517 | } else { 518 | newTip.push(ii); 519 | } 520 | } 521 | item.tip_list = newTip; 522 | } 523 | newList.push(item); 524 | } 525 | obj.city_list = newList; 526 | } 527 | } 528 | } else if (url.includes("/shield/search_poi/tips_operation_location")) { 529 | // 搜索页面 底部结果上方窄横幅 530 | if (obj.data.coupon) { 531 | delete obj.data.coupon; 532 | } 533 | const bar = [ 534 | "belt", 535 | "common_float_bar", 536 | "common_image_banner", 537 | "coupon_discount_float_bar", 538 | "coupon_float_bar", 539 | "discount_coupon", 540 | "image_cover_bar", 541 | "mood_coupon_banner", 542 | "operation_brand", 543 | "promotion_wrap_card", 544 | "tips_top_banner" 545 | ]; 546 | if (obj.data.modules) { 547 | bar.forEach((i) => { 548 | delete obj.data.modules[i]; 549 | }); 550 | } 551 | } else if (url.includes("/valueadded/alimama/splash_screen")) { 552 | // 开屏广告 553 | if (obj.data.ad) { 554 | for (let item of obj.data.ad) { 555 | item.set.setting.display_time = 0; 556 | item.creative[0].start_time = 2208960000; // Unix 时间戳 2040-01-01 00:00:00 557 | item.creative[0].end_time = 2209046399; // Unix 时间戳 2040-01-01 23:59:59 558 | } 559 | } 560 | } 561 | 562 | $done({ body: JSON.stringify(obj) }); -------------------------------------------------------------------------------- /js/baidumap.js: -------------------------------------------------------------------------------- 1 | /* 2 | # 来源 https://github.com/RuCu6/QuanX/blob/main/Rewrites/Cube/bdmap.snippet 3 | #!name = 百度地图 4 | #!desc = 移除广告 5 | #!author = RuCu6 6 | #!update = 2023-05-05 18:35 7 | 8 | [rewrite_local] 9 | # 组件包 10 | ^https:\/\/newclient\.map\.baidu\.com\/client\/crossmarketing\/\?container=du_aide_module url reject-dict 11 | ^https:\/\/newclient\.map\.baidu\.com\/client\/crossmarketing\/\?container=du_card_ugc url reject-dict 12 | ^https:\/\/newclient\.map\.baidu\.com\/client\/crossmarketing\/\?container=du_trip_route_tab url reject-dict 13 | ^https:\/\/newclient\.map\.baidu\.com\/client\/crossmarketing\/\?oem= url reject-dict 14 | ^https:\/\/newclient\.map\.baidu\.com\/client\/imap\/dl\/s\/UpdateInfo\.php\? url script-response-body https://raw.githubusercontent.com/wf021325/qx/master/js/baidumap.js 15 | # 首页 小横条,左上角动图 16 | ^https:\/\/newclient\.map\.baidu\.com\/client\/noticebar\/get\? url reject-dict 17 | ^https:\/\/newclient\.map\.baidu\.com\/client\/phpui2\/\?qt=ads url reject-dict 18 | # 我的页面 19 | ^https:\/\/newclient\.map\.baidu\.com\/client\/usersystem\/mine\/page\? url script-response-body https://raw.githubusercontent.com/wf021325/qx/master/js/baidumap.js 20 | ^https:\/\/newclient\.map\.baidu\.com\/grow-engine\/api\/common\/userHome\? url reject-dict 21 | # 打车页 22 | ^https:\/\/yongche\.baidu\.com\/goorder\/passenger\/notice url reject-dict 23 | ^https:\/\/yongche\.baidu\.com\/gomarketing\/api\/activity\/talos\/activitycard\? url reject-dict 24 | ^https:\/\/yongche\.baidu\.com\/gomarketing\/api\/popup\/getentrancecordovaurl url reject-dict 25 | ^https:\/\/yongche\.baidu\.com\/goorder\/passenger\/baseinfo url reject-dict 26 | 27 | [mitm] 28 | hostname = newclient.map.baidu.com, yongche.baidu.com 29 | 30 | */ 31 | 32 | 33 | // 2023-05-05 18:35 34 | const url = $request.url; 35 | if (!$response.body) $done({}); 36 | let obj = JSON.parse($response.body); 37 | 38 | if (url.includes("/usersystem/mine/page")) { 39 | const item = [ 40 | "car", // 我的车辆 41 | "gold", // 金币商城等活动 42 | "voice" // 语音包 43 | ]; 44 | if (obj.data) { 45 | item.forEach((i) => { 46 | delete obj.data[i]; 47 | }); 48 | } 49 | } else if (url.includes("/noticebar/get")) { 50 | if (obj.content?.multi_data) { 51 | obj.content.multi_data = []; 52 | } 53 | } else if (url.includes("/imap/dl/s/UpdateInfo")) { 54 | const item = [ 55 | "map.iphone.baidu.aihomenearbycontent", // 新首页附近组件 56 | "map.iphone.baidu.cater", // 美食 57 | "map.iphone.baidu.comdetailtmpl", // 通用详情页 58 | "map.iphone.baidu.hotel", // 酒店 59 | // "map.iphone.baidu.movie", // 电影 60 | "map.iphone.baidu.nearbybraavos", // 美食休闲 61 | "map.iphone.baidu.nearbycontent", // 周边组件 62 | "map.iphone.baidu.scenery", // 景点 63 | "map.iphone.baidu.surround", // 新周边 64 | "map.iphone.baidu.usersystem", // 用户体系 65 | "map.iphone.baidu.websdk" // websdk 66 | ]; 67 | if (obj?.packages) { 68 | item.forEach((i) => { 69 | delete obj.packages[i]; 70 | }); 71 | } 72 | } 73 | 74 | $done({ body: JSON.stringify(obj) }); -------------------------------------------------------------------------------- /js/caiyun.js: -------------------------------------------------------------------------------- 1 | /* 2 | 彩云天气 3 | 4 | 大于>7.20.2版本不可以mitm 需要使用最新版,比如7.22.0,可以通过登录旧版解锁,在线升级到新版版即可 5 | 如果出现广告无法消除,请卸载重装,或者巨魔用户使用 轻松签+👉应用👉已安装👉彩云天气(Pro)👉清除数据👉仅清空数据(这样清除广告缓存且不需要重新登录) 6 | 7 | ==================================== 8 | [filter_local] 9 | # 上传信息 10 | host, gather.colorfulclouds.net ,reject 11 | 12 | [rewrite_local] 13 | # 普通版开屏广告(此广告不定时出现) 14 | ^https:\/\/ad\.cyapi\.cn\/v2\/req\?app_name=weather url reject-dict 15 | # 7.1.9 限时福利Svip 16 | ^https:\/\/biz\.cyapi\.cn\/p\/v1\/trial_card\/info url reject-dict 17 | # 7.2.0普通版修改VIP后提示账号迁移 18 | ^https:\/\/biz\.cyapi\.cn\/api\/v1\/token\/device$ url reject-dict 19 | 20 | # 亲友卡 21 | ^https:\/\/biz\.cyapi\.cn\/p\/v1\/entries url reject-dict 22 | # 左上角+进去推荐 23 | ^https:\/\/starplucker\.cyapi\.cn\/v3\/config$ url reject-dict 24 | 25 | # 通知 26 | ^https:\/\/starplucker\.cyapi\.cn\/v3\/notification\/message_center url reject-dict 27 | # 会员限时弹窗 28 | ^https:\/\/starplucker\.cyapi\.cn\/v3\/config\/cypage\/home\/conditions\/local$ url reject-dict 29 | ^https:\/\/starplucker\.cyapi\.cn\/v3\/config\/cypage\/home_activity\/conditions$ url reject-dict 30 | ^https:\/\/starplucker\.cyapi\.cn\/v3\/config\/cypage\/40day\/conditions\/local$ url reject-dict 31 | 32 | # 赏叶赏花模块 33 | ^https:\/\/wrapper\.cyapi\.cn\/v1\/activity\?app_name=weather url script-response-body https://raw.githubusercontent.com/wf021325/qx/master/js/caiyun.js 34 | # 解锁旧版vip(7.20.0之前) 35 | ^https:\/\/biz\.cyapi\.cn\/v2\/user url script-response-body https://raw.githubusercontent.com/wf021325/qx/master/js/caiyun.js 36 | # 卫星云图 48小时预报 37 | ^https:\/\/wrapper\.cyapi\.cn\/v1\/(satellite|nafp\/origin_images) url script-request-header https://raw.githubusercontent.com/wf021325/qx/master/js/caiyun.js 38 | # 7.20.0版本显示VIP 39 | ^https?:\/\/biz\.cyapi\.cn\/api\/v1\/user_detail$ url script-response-body https://raw.githubusercontent.com/wf021325/qx/master/js/caiyun.js 40 | # 7.22.0版本 40天趋势/60天潮汐/风 等等有时候无法加载 41 | ^https:\/\/starplucker\.cyapi\.cn\/v3\/ url script-request-header https://raw.githubusercontent.com/wf021325/qx/master/js/caiyun.js 42 | 43 | # 发现-轮播 44 | ^https:\/\/starplucker\.cyapi\.cn\/v3\/operation\/banners\?user_type=paid$ url script-response-body https://raw.githubusercontent.com/wf021325/qx/master/js/caiyun.js 45 | # 发现-宫格 46 | ^https:\/\/starplucker\.cyapi\.cn\/v3\/operation\/features\?user_type=paid$ url script-response-body https://raw.githubusercontent.com/wf021325/qx/master/js/caiyun.js 47 | # 发现-官方活动 48 | ^https:\/\/starplucker\.cyapi\.cn\/v3\/campaigns$ url script-response-body https://raw.githubusercontent.com/wf021325/qx/master/js/caiyun.js 49 | # 发现-瀑布流 50 | ^https:\/\/starplucker\.cyapi\.cn\/v3\/operation\/feeds url script-response-body https://raw.githubusercontent.com/wf021325/qx/master/js/caiyun.js 51 | 52 | [mitm] 53 | hostname = *.cyapi.cn 54 | ==================================== 55 | */ 56 | var huihui = {}, url = $request.url, headers = ObjectKeys2LowerCase($request.headers); 57 | const token = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ2ZXJzaW9uIjoxLCJ1c2VyX2lkIjoiNWY1YmZjNTdkMmM2ODkwMDE0ZTI2YmI4Iiwic3ZpcF9leHBpcmVkX2F0IjoxNzA1MzMxMTY2LjQxNjc3MSwidmlwX2V4cGlyZWRfYXQiOjB9.h_Cem89QarTXxVX9Z_Wt-Mak6ZHAjAJqgv3hEY6wpps'; 58 | if (url.includes("/v2/user")) { 59 | let obj = JSON.parse($response.body); 60 | Object.assign(obj.result, {is_vip: true, svip_expired_at: 3742732800, vip_type: "s"}); 61 | huihui.body = JSON.stringify(obj) 62 | } else if (/v1\/(satellite|nafp\/origin_images)/.test(url)) { 63 | huihui.headers = {...headers, 'device-token': token}; 64 | if (compareVersions(headers['app-version'], '7.19.0') > 0) { 65 | huihui.headers['authorization'] = `Bearer ${token}`; 66 | } 67 | } else if (url.includes('v1/activity')) { 68 | const body = compareVersions(headers['app-version'], '7.20.0') < 0 ? '{"status":"ok","activities":[{"items":[{}]}]}' : '{"status":"ok","activities":[]}'; 69 | huihui.body = body; 70 | } else if (url.includes('/user_detail')) { 71 | const obj = JSON.parse($response.body); 72 | Object.assign(obj.vip_info.svip, {is_auto_renewal: true, expires_time: '3742732800'}); 73 | huihui.body = JSON.stringify(obj) 74 | } else if (url.includes('starplucker.cyapi.cn/v3/')) { 75 | huihui.headers = headers; 76 | huihui.headers['authorization'] = `Bearer ${token}`; 77 | } 78 | // 轮播 79 | if (url.includes('/operation/banners')) { 80 | huihui.body = `{"data": [{"avatar": "","url": "","title": "","banner_type": ""}],"interval": 5000}` 81 | } 82 | // 宫格 83 | if (url.includes('/operation/features')) { 84 | //const obj = JSON.parse($response.body); 85 | //obj.data = obj?.data.filter(item => item?.title !== '水汽之旅' && item?.title !== '生活指数'); 86 | huihui.body = `{"data":[{"avatar":"https://cdn-w.caiyunapp.com/p/app/operation/prod/feature/66a881fbd428d25287131ed0/7c0bc08d8bde602523220d05c3a1f148.png","url":"https://h5.caiyunapp.com/calender","title":"万年历","feature_type":"","badge_type":""},{"avatar":"https://cdn-w.caiyunapp.com/p/app/operation/prod/feature/665579a9a16f650e019e41b0/37f5cb7e2e4bd46fe5162e8adf8cd9ff.png","url":"cy://page_driving_weather","title":"驾驶天气","feature_type":"","badge_type":""},{"avatar":"https://cdn-w.caiyunapp.com/p/app/operation/prod/feature/6556d0853aad9a16ec615563/f3d65d4e56a01de218d51bd57f236a03.png","url":"cy://page_cycling_weather","title":"骑行天气","feature_type":"","badge_type":""},{"avatar":"https://cdn-w.caiyunapp.com/p/app/operation/prod/feature/64100001aa27c7a808e3d3fd/f0377e1e49e60a2dd4d19a095c3273be.png","url":"cy://page_index_fish","title":"钓鱼指数","feature_type":"","badge_type":""},{"avatar":"https://cdn-w.caiyunapp.com/p/app/operation/prod/feature/642555ed55a01b072a6db687/ee2c1efe31ba36445779ae940c5c6901.png","url":"cy://page_index_clothing","title":"穿衣指数","feature_type":"","badge_type":""},{"avatar":"https://cdn-w.caiyunapp.com/p/app/operation/prod/feature/668cf839367625ff6748e635/3e2f27c8642a8e1a49f9619878194845.png","url":"cy://page_earthquake_view","title":"地震地图","feature_type":"","badge_type":""},{"avatar":"https://cdn-w.caiyunapp.com/p/app/operation/prod/feature/66f50b56908a75e646cf76df/1de5a65fc905b2a26c260a377bfa24c2.png","url":"https://h5.caiyunapp.com/mountain-view/list","title":"登山天气","feature_type":"","badge_type":"","badge":""},{"avatar":"https://cdn-w.caiyunapp.com/p/app/operation/prod/feature/66f50fdb908a75e646cf76e1/a57e9c6400ab6c407d565e354d3347a8.png","url":"cy://page_tide_view","title":"60天潮汐","feature_type":"","badge_type":""}]}` 87 | } 88 | // 官方活动 89 | if (url.includes('starplucker.cyapi.cn/v3/campaigns')) { 90 | huihui.body = `{"campaigns": []}` 91 | } 92 | //瀑布流 93 | if (url.includes('/operation/feeds')) { 94 | const obj = JSON.parse($response.body); 95 | obj.data = obj?.data.filter(item => item?.category_name == '文章'); 96 | huihui.body = JSON.stringify(obj) 97 | } 98 | $done(huihui); 99 | 100 | function compareVersions(t,r){"string"!=typeof t&&(t="0"),"string"!=typeof r&&(r="0");const e=t.split(".").map(Number),n=r.split(".").map(Number);for(let t=0;ti)return 1;if(r[k.toLowerCase(),v]))}; 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | //eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ2ZXJzaW9uIjoxLCJ1c2VyX2lkIjoiNWY1YmZjNTdkMmM2ODkwMDE0ZTI2YmI4Iiwic3ZpcF9leHBpcmVkX2F0IjoxNzA1MzMxMTY2LjQxNjc3MSwidmlwX2V4cGlyZWRfYXQiOjB9.h_Cem89QarTXxVX9Z_Wt-Mak6ZHAjAJqgv3hEY6wppslet //eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ2ZXJzaW9uIjoxLCJ1c2VyX2lkIjoiNWY1YmZjNTdkMmM2ODkwMDE0ZTI2YmI4Iiwic3ZpcF9leHBpcmVkX2F0IjoxNjc0MjI3MTY2LjQxNjc3MSwidmlwX2V4cGlyZWRfYXQiOjB9.wbgfCRp3W9zEvzEYsiWxerta4G-d-b0qlYCcilevOKY 122 | -------------------------------------------------------------------------------- /js/dsx555.js: -------------------------------------------------------------------------------- 1 | /* 2 | 大师兄&555 3 | 4 | 5 | # 555 6 | # https://app-v1.ecoliving168.com/api/v1/advert/config?pack= 开屏广告 7 | # https://a.weilai555.com:1000/api/v1/app/config? url reject 8 | # https://app-v1.ecoliving168.com/api/v1/movie/index_recommend?pack= 9 | # ^https?:\/\/[\w+\.\-\:]+\/api\/v\d\/movie\/index_recommend url script-response-body http://192.168.2.170:8080/dsx555.js 10 | 11 | ==================================== 12 | [rewrite_local] 13 | # 555_ 14 | ^https?:\/\/[\w+\.\-\:]+\/api\/v\d\/app\/config\? url reject 15 | # 555_开屏 16 | ^https?:\/\/[\w+\.\-\:]+\/api\/v\d\/advert\/config\?pack= url reject 17 | #555_首页轮播图 首页信息流 我的页面推广 18 | ^https?:\/\/[\w+\.\-\:]+\/api\/v\d\/movie\/index_recommend url script-response-body https://raw.githubusercontent.com/wf021325/qx/master/js/dsx555.js 19 | 20 | 21 | # 大师兄_去更新弹窗_加密文本 22 | ^http:\/\/sdk\.alibaba\.com\.ailbaba\.me\/dsx\.php\/v6\/version url reject 23 | # 大师兄_排行榜页面_加密文本 影响投屏 24 | #^http:\/\/sdk\.alibaba\.com\.ailbaba\.me\/dsx\.php\/v6\/app_config url reject 25 | # 大师兄_去通告_Json对象 26 | ^http:\/\/sdk\.alibaba\.com\.ailbaba\.me\/dsx\.php\/v6\/top_notice url reject-dict 27 | 28 | 29 | [mitm] 30 | hostname = run.api.qyfxgd.cn , *.weilai555.com , *.ecoliving168.com , sdk.alibaba.com.ailbaba.me 31 | ==================================== 32 | */ 33 | 34 | let url = $request.url; 35 | let body = $response.body; 36 | let obj = JSON.parse(body); 37 | 38 | if (url.includes('/movie/index_recommend')) { 39 | obj.data = obj.data.filter(t => "advert_self" !== t.layout);// data[2].layout='advert_self' 删除 data[2] 留下其他 40 | obj.data.forEach(t => { 41 | t.list = t.list.filter(t => 3 !== t.type)//data[0].list[2].type=3 删除 data[0].list[2] 留下其他 42 | }); 43 | body = JSON.stringify(obj) 44 | } 45 | 46 | $done({body}); 47 | 48 | 49 | //data[2].layout='advert_self' 50 | //data[2].data='{"channel":"ios","data":{"image":"https://vpic.cms.qq.com/nj_vpic/2997368263/1672589369406893485/4798783723275000326","url":"https://60074705.com:8888/?channelCode=app-ios"}}' 51 | 52 | //data[0].list[2].type=3 53 | //data[0].list[2].image='https://vpic.cms.qq.com/nj_vpic/2997368263/1672587171289317820/1058165247617016544' 54 | 55 | //{"msg":"生成成功","data":[{"layout":"index_recommend_carousel","title":"轮播图","list":[{"image":"http://t1.szrtcpa.com/2023/07/26/3cc582eacfe8c.jpg","type":1,"title":"封神第一部","sub_title":"战争,奇幻","label":"热播","click":"796884cc8c25"},{"image":"https://img.ynajax.com:2391/storage/images/2023/07/733/5d29ec3615620beab37c81f7be8f84d2.jpg","type":1,"title":"长安三万里","sub_title":"动画/历史","label":"热播","click":"796885cc8c23"},{"image":"https://vpic.cms.qq.com/nj_vpic/2997368263/1672587171289317820/1058165247617016544","type":3,"title":"","sub_title":"","label":"","click":"https://79553678.com:8888"},{"image":"http://t1.szrtcpa.com/2023/07/05/1aa80cd3ac270.jpg","type":1,"title":"八角笼中","sub_title":"剧情/动作","label":"热播","click":"796a82ce8223"},{"image":"https://vpic.cms.qq.com/nj_vpic/2997368263/1672654115094187954/4939591070217557892","type":3,"title":"","sub_title":"","label":"","click":"https://64334270.com/8hz733"},{"image":"https://img.ynajax.com:2391/storage/images/2023/07/499/445ce461277921c25030eaaa74b442b1.jpg","type":1,"title":"奥本海默","sub_title":"剧情/历史/传记","label":"新片上线","click":"796f85c9"},{"image":"https://vpic.cms.qq.com/nj_vpic/2997368263/1672588080581218318/5656086845064506776","type":3,"title":"","sub_title":"","label":"","click":"https://60942644.com:8888/?channelCode=8044"},{"image":"https://img.ynajax.com:2391/storage/images/2023/07/373/9b9b5597de639ec3b6b41481fb96a142.jpg","type":1,"title":"超能一家人","sub_title":"喜剧 / 家庭 / 奇幻","label":"新片上线","click":"7b6781cd84"},{"image":"https://vpic.cms.qq.com/nj_vpic/2997368263/1677551941128327490/8079528143548149142","type":3,"title":"","sub_title":"","label":"","click":"http://d23f9gkn0byj85.cloudfront.net/swh4bx.pdf"},{"image":"https://t1.szrtcpa.com/2023/07/25/fb7f10b3b4590.jpg","type":1,"title":"茶啊二中","sub_title":"喜剧/奇幻","label":"动画","click":"796885cc8c21"},{"image":"https://img.ynajax.com:2391/storage/images/2023/07/33/9af8479628c6868923e8fc0e92644c2f.jpg","type":1,"title":"别叫我赌神","sub_title":"剧情/家庭/运动","label":"热播","click":"796b87cb842e"}],"right":{}},{"layout":"base","title":"最新上线·全网热播","list":[{"id":"7b66","name":"百炼成神","cover":"https://t1.021huaying.com/uploads/2023-06-10/20/ee53ddf8af24c04b661ab387ef80a575.webp","year":"2022","dynamic":"更新至39集","type_name":"动漫","label":"8.1"},{"id":"7d6f","name":"完美世界","cover":"https://t1.021huaying.com/uploads/2023-06-09/4a/18b8931dd0a27391f62ecaef1960270e.webp","year":"2021","dynamic":"更新至120集","type_name":"动漫","label":"多人收藏"},{"id":"7166","name":"绝世武魂","cover":"https://t1.021huaying.com/uploads/2023-06-10/b1/897ac44e1eb80b21d1acbf7ddcb11be2.webp","year":"2020","dynamic":"第291集","type_name":"动漫","label":"多人收藏"},{"id":"796c8a","name":"刘老根5","cover":"https://t1.021huaying.com/uploads/2023-07-19/7d/6158ddd35bdb0e8d28372f30d297556d.webp","year":"2022","dynamic":"第40集","type_name":"剧集","label":""},{"id":"796a80","name":"狩猎","cover":"https://t1.021huaying.com/uploads/2023-06-09/0b/e451c5abab5310813b5a6b728eef0e97.webp","year":"2022","dynamic":"正片","type_name":"电影","label":"多人收藏"},{"id":"796b81","name":"元龙第三季","cover":"https://t1.021huaying.com/uploads/2023-06-10/92/fe25f239f1f6b641736d2dc09d292ad0.webp","year":"2022","dynamic":"第16集","type_name":"动漫","label":"7.5"},{"id":"796781","name":"是大臣第三季","cover":"https://t1.021huaying.com/uploads/2023-06-09/1a/8300aa475e17d1e18da3c8ed53ff2d70.webp","year":"1982","dynamic":"第7集","type_name":"剧集","label":"9.9"},{"id":"7a6d87","name":"喜剧之王","cover":"https://t1.021huaying.com/uploads/2023-06-09/8a/14714c1da038d4a68293bce89d8e8299.webp","year":"1999","dynamic":"正片","type_name":"电影","label":"高分推荐"},{"id":"7a6981","name":"仙剑奇侠传","cover":"https://t1.021huaying.com/uploads/2023-06-09/cd/33878ac8fae766995e54568e9275e475.webp","year":"2005","dynamic":"更新至13集","type_name":"剧集","label":"9.1"}],"right":{}},{"layout":"advert_self","title":"","list":[],"right":{},"data":{"channel":"ios","data":{"image":"https://vpic.cms.qq.com/nj_vpic/2997368263/1672589369406893485/4798783723275000326","url":"https://60074705.com:8888/?channelCode=app-ios"}}},{"layout":"base","title":"近期热门电影","list":[{"id":"796884cc8c25","name":"封神第一部朝歌风云","cover":"https://t1.021huaying.com/uploads/2023-07-21/16/b2e7c106f8a982c349c1d684e6f37e19.webp","year":"2023","dynamic":"抢先版","type_name":"","label":"7.7"},{"id":"796885cc8c23","name":"长安三万里","cover":"https://t1.021huaying.com/uploads/2023-07-06/ad/a8ae589761c3bedcea622d17fad58c05.webp","year":"2023","dynamic":"更新至抢先版","type_name":"","label":"热度飙升"},{"id":"796a82ce8223","name":"八角笼中","cover":"https://t1.021huaying.com/uploads/2023-06-10/9d/a7e04a386c892727ba0adff894e7ae07.webp","year":"2023","dynamic":"更新至抢先版","type_name":"","label":"热度飙升"},{"id":"796885cc8c21","name":"茶啊二中","cover":"https://t1.021huaying.com/uploads/2023-07-24/38/9bb366894759f990c3d272436feed66a.webp","year":"2023","dynamic":"清晰版","type_name":"","label":"多人收藏"},{"id":"7b6781cd84","name":"超能一家人","cover":"https://t1.021huaying.com/uploads/2023-06-10/a9/e4e0827d7e2544ea9357e880a6db145d.webp","year":"2023","dynamic":"纪录片","type_name":"","label":"多人收藏"},{"id":"796a84cf8521","name":"消失的她","cover":"https://t1.021huaying.com/uploads/2023-06-10/7f/7e7913479076b66bc7c00b7b424b5087.webp","year":"2022","dynamic":"更新至抢先版","type_name":"","label":"推荐"},{"id":"796884cc8327","name":"零号追杀","cover":"https://t1.021huaying.com/uploads/2023-07-21/21/0df6747c1960065272c3d86ffeeb9965.webp","year":"2023","dynamic":"HD","type_name":"","label":"多人收藏"},{"id":"796a87cf8d21","name":"扫毒3人在天涯","cover":"https://t1.021huaying.com/uploads/2023-06-09/df/4298a9cc0bba1b32a9faacc67d7cf16a.webp","year":"2023","dynamic":"先行版","type_name":"","label":"推荐"},{"id":"796b87cb842e","name":"别叫我赌神","cover":"https://t1.021huaying.com/uploads/2023-06-10/22/590decdd77ca0ae9e067e935e064a289.webp","year":"2023","dynamic":"1080P","type_name":"","label":"推荐"}],"right":{"text":"查看更多","type":"tabs","data":{"index":1,"param":{}}}},{"layout":"advert_self","title":"","list":[],"right":{},"data":{"channel":"ios","data":{"image":"https://vpic.cms.qq.com/nj_vpic/2997368263/1672589128373829559/5089327747030259410","url":"https://57929907.com:8888/?channelCode=df199"}}},{"layout":"base","title":"Netflix热门推荐","list":[{"id":"716683","name":"路德灵异侦探社","year":"2023","cover":"https://t1.021huaying.com/uploads/2023-06-09/49/e9a084b7b2f70821859a5c853b912cda.webp","dynamic":"第08集","type_name":"","label":""},{"id":"796880ce8621","name":"绝世网红","year":"2023","cover":"https://t1.021huaying.com/uploads/2023-06-09/1a/0a5df12c670d88431ef1bd04550e72b0.webp","dynamic":"已完结","type_name":"","label":"多人收藏"},{"id":"706782ce87","name":"甜蜜家园","year":"2020","cover":"https://t1.021huaying.com/uploads/2023-06-09/90/a68b83fe964ebf44811afc67920b0db5.webp","dynamic":"第10集","type_name":"","label":"7.8"},{"id":"796a86c8832e","name":"人选之人造浪者","year":"2023","cover":"https://t1.021huaying.com/uploads/2023-06-09/03/c25cfe0c50e6906c884a23f5f00303bf.webp","dynamic":"第08集","type_name":"","label":""},{"id":"7b6c85cf","name":"怪奇物语第一季","year":"2016","cover":"https://t1.021huaying.com/uploads/2023-06-10/4f/e071383aba68891abae3698ba7448167.webp","dynamic":"第08集","type_name":"","label":"9.0"},{"id":"7b6784cb86","name":"米沙与狼","year":"2021","cover":"https://t1.021huaying.com/uploads/2023-06-09/69/5fa2eb0d25f6436131e449d4c4098484.webp","dynamic":"正片","type_name":"","label":""},{"id":"7b6d87ce","name":"国王永远的君主","year":"2020","cover":"https://t1.021huaying.com/uploads/2023-06-09/c5/0be5ceaa57c114ec6f6c46ad42fd7cec.webp","dynamic":"第16集","type_name":"","label":"7.1"},{"id":"796d80cc","name":"维京传奇英灵神殿第二季","year":"2023","cover":"https://t1.021huaying.com/uploads/2023-06-10/0a/001b7db7a6e98d8757b6dea586a5d9b0.webp","dynamic":"第08集","type_name":"","label":""},{"id":"796887cb8724","name":"黑镜第六季","year":"2023","cover":"https://t1.021huaying.com/uploads/2023-06-15/64/dd0d423ed9d1cd021d7258a157130819.webp","dynamic":"5集全","type_name":"","label":"多人收藏"}],"right":{"text":"查看更多","type":"tabs","data":{"index":2,"param":{"class":"netflix"}}}},{"layout":"advert_self","title":"","list":[],"right":{},"data":{"channel":"ios","data":{"image":"https://vpic.cms.qq.com/nj_vpic/2997368263/1672589398708873836/7563543196960949128","url":"https://79553678.com:8888"}}},{"layout":"base","title":"近期热门日韩剧","list":[{"id":"7a6f84c9","name":"金科长","cover":"https://t1.021huaying.com/uploads/2023-06-09/64/fc5f2fbe829ea404fce207d9e2eb54cb.webp","year":"2017","dynamic":"20集全","type_name":"","label":"8.5"},{"id":"7a6a84c4","name":"请回答1988","cover":"https://t1.021huaying.com/uploads/2023-06-09/c3/5837be1dd0c9ea7bd06b425246fed32c.webp","year":"2015","dynamic":"第20集","type_name":"","label":"9.7"},{"id":"7a698bc4","name":"她爱上了我的谎","cover":"https://t1.021huaying.com/uploads/2023-06-09/bd/56ad4f482794eb2ec9df7d0f9cac716e.webp","year":"2017","dynamic":"16集全","type_name":"","label":""},{"id":"7a698ac4","name":"三流之路","cover":"https://t1.021huaying.com/uploads/2023-06-09/e9/ce195e19d3f6b97d19d14d82bd201c1a.webp","year":"2017","dynamic":"第16集","type_name":"","label":"高分推荐"},{"id":"7e6c85c4","name":"失踪他们存在过","cover":"https://t1.021huaying.com/uploads/2023-06-10/62/28b970f71b1921c1bed87d3b53e58e00.webp","year":"2020","dynamic":"12集全","type_name":"","label":"7.7"},{"id":"7f6684cf","name":"孤独的美食家第一季","cover":"https://t1.021huaying.com/uploads/2023-06-09/fc/8443bc3ff24fd47ae14a3b2a1595dddb.webp","year":"2012","dynamic":"第12集","type_name":"","label":"9.0"},{"id":"706c85cf","name":"现在正在分手中","cover":"https://t1.021huaying.com/uploads/2023-06-10/37/59927de0c8910fc7a04b4bfc42906c09.webp","year":"2021","dynamic":"第16集完结","type_name":"","label":""},{"id":"706a8acc","name":"致我的星星","cover":"https://t1.021huaying.com/uploads/2023-06-10/51/1e6f6a802d7a9baab933721bde6e2b13.webp","year":"2021","dynamic":"完结","type_name":"","label":"高分推荐"},{"id":"706982ce","name":"你与世界终结的日子","cover":"https://t1.021huaying.com/uploads/2023-06-09/40/6a326c02898bae039a560b76bd9a84c4.webp","year":"2021","dynamic":"10集全","type_name":"","label":""}],"right":{"text":"查看更多","type":"tabs","data":{"index":2,"param":{}}}},{"layout":"advert_self","title":"","list":[],"right":{},"data":{"channel":"ios","data":{"image":"https://vpic.cms.qq.com/nj_vpic/2997368263/1677552229211955056/7222252661879232335","url":"http://d23f9gkn0byj85.cloudfront.net/swh4bx.pdf"}}},{"layout":"base","title":"近期热门欧美剧","list":[{"id":"796781","name":"是大臣第三季","cover":"https://t1.021huaying.com/uploads/2023-06-09/1a/8300aa475e17d1e18da3c8ed53ff2d70.webp","year":"1982","dynamic":"第7集","type_name":"","label":"高分推荐"},{"id":"7e6a86","name":"朽木第一季","cover":"https://t1.021huaying.com/uploads/2023-06-09/3d/ec59a719d30b98dcbaa8b0761b269365.webp","year":"2004","dynamic":"已完结","type_name":"","label":"高分推荐"},{"id":"706c84","name":"老友记第四季","cover":"https://t1.021huaying.com/uploads/2023-06-09/98/c6976f29d2e8634cabd9a1d9c70a991a.webp","year":"1997","dynamic":"第24集","type_name":"","label":"高分推荐"},{"id":"716683","name":"路德灵异侦探社","cover":"https://t1.021huaying.com/uploads/2023-06-09/49/e9a084b7b2f70821859a5c853b912cda.webp","year":"2023","dynamic":"第08集","type_name":"","label":""},{"id":"796c86ce","name":"燃情克利夫兰第五季","cover":"https://t1.021huaying.com/uploads/2023-06-09/6a/2915f37a3f9d2374cbb853181b583edc.webp","year":"2014","dynamic":"已完结","type_name":"","label":"高分推荐"},{"id":"7c6a82c5","name":"破产姐妹第二季","cover":"https://t1.021huaying.com/uploads/2023-06-09/99/13b4626e2b9d6cea68867ca4d4325179.webp","year":"2012","dynamic":"第24集","type_name":"","label":"8.9"},{"id":"7c6b85cf","name":"黑袍纠察队第一季","cover":"https://t1.021huaying.com/uploads/2023-06-09/ea/71cda33b17cfd5e1561d389db0c3a6e8.webp","year":"2019","dynamic":"第08集","type_name":"","label":"多人收藏"},{"id":"7d6983ca","name":"继承之战第一季","cover":"https://t1.021huaying.com/uploads/2023-06-09/bf/e9d565d4ab30161ba0040a73a5d471b9.webp","year":"2018","dynamic":"第10集","type_name":"","label":"高分推荐"},{"id":"7f6e82cd","name":"西部世界第二季","cover":"https://t1.021huaying.com/uploads/2023-06-10/47/4043c70b537976795599b054965f8798.webp","year":"2018","dynamic":"第10集","type_name":"","label":""}],"right":{"text":"查看更多","type":"tabs","data":{"index":2,"param":{}}}},{"layout":"base","title":"近期热门港台剧","list":[{"id":"7b6e86ca","name":"陀枪师姐3国语","cover":"https://t1.021huaying.com/uploads/2023-06-09/16/8f99629245fcc6d05a0592e7d5371709.webp","year":"2001","dynamic":"已完结","type_name":"","label":"7.9"},{"id":"716f83cf","name":"法证先锋4国语","cover":"https://t1.021huaying.com/uploads/2023-06-10/14/14fce842c22b3fed8a61765e0d13cc18.webp","year":"2020","dynamic":"已完结","type_name":"","label":""},{"id":"796987ce80","name":"盲侠大律师国语","cover":"https://t1.021huaying.com/uploads/2023-06-10/b5/c7ece2f8b6e772c721c0e930932dc9e2.webp","year":"2017","dynamic":"已完结","type_name":"","label":"7.7"},{"id":"796682cc86","name":"男亲女爱","cover":"https://t1.021huaying.com/uploads/2023-06-09/52/45aa14ef49d002c26ffe1c078d536536.webp","year":"2000","dynamic":"第50集","type_name":"","label":"9.3"},{"id":"7b6984c986","name":"大唐双龙传国语","cover":"https://t1.021huaying.com/uploads/2023-06-09/81/0cd0f5887c31a532d6b50dd473cc4e2a.webp","year":"2004","dynamic":"已完结","type_name":"","label":"7.8"},{"id":"706880cf83","name":"我和僵尸有个约会国语第二部","cover":"https://t1.021huaying.com/uploads/2023-06-09/92/a9e8e1e051057a2cc4f40ad8fca95da2.webp","year":"2000","dynamic":"已完结","type_name":"","label":"高分推荐"},{"id":"70668aca8d","name":"篮球火","cover":"https://t1.021huaying.com/uploads/2023-06-10/a4/6c005bb4043a3b180a54443039a98bdd.webp","year":"2008","dynamic":"已完结","type_name":"","label":""},{"id":"716e8bc98c","name":"金宵大厦2粤语","cover":"https://t1.021huaying.com/uploads/2023-06-10/0b/6ca32e44bce6c4609f1fc142fab55cfe.webp","year":"2022","dynamic":"完结","type_name":"","label":"7.3"},{"id":"716b84cd81","name":"C9特工粤语","cover":"https://t1.021huaying.com/uploads/2023-06-10/67/ea77d86e0179394b910fd8eca9e81021.webp","year":"2020","dynamic":"20集全","type_name":"","label":""}],"right":{"text":"查看更多","type":"tabs","data":{"index":2,"param":{}}}},{"layout":"base","title":"近期热门国产剧","list":[{"id":"796c8a","name":"刘老根5","cover":"https://t1.021huaying.com/uploads/2023-07-19/7d/6158ddd35bdb0e8d28372f30d297556d.webp","year":"2022","dynamic":"第40集","type_name":"","label":""},{"id":"7a6981","name":"仙剑奇侠传","cover":"https://t1.021huaying.com/uploads/2023-06-09/cd/33878ac8fae766995e54568e9275e475.webp","year":"2005","dynamic":"更新至13集","type_name":"","label":"9.1"},{"id":"7c6d80","name":"结爱千岁大人的初恋","cover":"https://t1.021huaying.com/uploads/2023-06-10/64/d39aa9b5c83553ee0874866a8376cf1a.webp","year":"2018","dynamic":"宋茜黄景瑜上演千年绝恋","type_name":"","label":"7.1"},{"id":"796787c9","name":"鹤唳华亭","cover":"https://t1.021huaying.com/uploads/2023-06-09/bd/15b830aa70be70c98d00dfe1bac2dee1.webp","year":"2019","dynamic":"第60集","type_name":"","label":"7.1"},{"id":"7a6f84c4","name":"棋魂","cover":"https://t1.021huaying.com/uploads/2023-06-09/b2/898e424a64d181287eba6f916b9300e5.webp","year":"2020","dynamic":"第36集","type_name":"","label":"高分推荐"},{"id":"7a6985c5","name":"剑王朝","cover":"https://t1.021huaying.com/uploads/2023-06-09/2e/c2a102a138cba2b8c3289492ade2ea2b.webp","year":"2019","dynamic":"已完结","type_name":"","label":""},{"id":"7b6983ce","name":"青囊传","cover":"https://t1.021huaying.com/uploads/2023-06-10/8e/be8af1fef5625be2fd22c4cddaa925e0.webp","year":"2019","dynamic":"第36集","type_name":"","label":""},{"id":"7c6980cd","name":"江照黎明","cover":"https://t1.021huaying.com/uploads/2023-06-09/54/076f9f0396d34c132a61578f6feb8fea.webp","year":"2022","dynamic":"第24集","type_name":"","label":""},{"id":"7d6a87cc","name":"红顶商人胡雪岩","cover":"https://t1.021huaying.com/uploads/2023-06-09/f9/c108182bcc6d0f1b020117ba4eaa96ce.webp","year":"2004","dynamic":"已完结","type_name":"","label":"7.6"}],"right":{"text":"查看更多","type":"tabs","data":{"index":2,"param":{}}}},{"layout":"base","title":"近期热门动漫","list":[{"id":"7b66","name":"百炼成神","cover":"https://t1.021huaying.com/uploads/2023-06-10/20/ee53ddf8af24c04b661ab387ef80a575.webp","year":"2022","dynamic":"更新至39集","type_name":"","label":"多人收藏"},{"id":"7d6f","name":"完美世界","cover":"https://t1.021huaying.com/uploads/2023-06-09/4a/18b8931dd0a27391f62ecaef1960270e.webp","year":"2021","dynamic":"更新至120集","type_name":"","label":"多人收藏"},{"id":"7166","name":"绝世武魂","cover":"https://t1.021huaying.com/uploads/2023-06-10/b1/897ac44e1eb80b21d1acbf7ddcb11be2.webp","year":"2020","dynamic":"第291集","type_name":"","label":"多人收藏"},{"id":"796b81","name":"元龙第三季","cover":"https://t1.021huaying.com/uploads/2023-06-10/92/fe25f239f1f6b641736d2dc09d292ad0.webp","year":"2022","dynamic":"第16集","type_name":"","label":"多人收藏"},{"id":"796b84ca","name":"辛普森一家第二十一季","cover":"https://t1.021huaying.com/uploads/2023-06-09/88/659b46f2279fe534dd8d79966aa29fc6.webp","year":"2009","dynamic":"第23集","type_name":"","label":"高分推荐"},{"id":"7a6f86c8","name":"惊爆游戏","cover":"https://t1.021huaying.com/uploads/2023-06-10/d7/c346a378794e46be0c35c0ad512044b3.webp","year":"2012","dynamic":"已完结","type_name":"","label":"7.5"},{"id":"7a6a8ace","name":"无上神帝","cover":"https://t1.021huaying.com/uploads/2023-07-24/78/71618e19a18ac9a0bd442ee1616dfedf.webp","year":"2020","dynamic":"更新至294集","type_name":"","label":"多人收藏"},{"id":"7b6c8bc4","name":"万界至尊","cover":"https://t1.021huaying.com/uploads/2023-06-09/88/c39598ee913d5606869715c14dfc7025.webp","year":"2022","dynamic":"第50集","type_name":"","label":""},{"id":"7b6885cc","name":"假面骑士Decade","cover":"https://t1.021huaying.com/uploads/2023-06-09/49/33b7982b9fd597585546c9f33f7b43d9.webp","year":"2009","dynamic":"已完结","type_name":"","label":"7.6"}],"right":{"text":"查看更多","type":"tabs","data":{"index":4,"param":{}}}},{"layout":"base","title":"近期热门综艺","list":[{"id":"796e86ce","name":"令人心动的offer第四季","cover":"https://t1.021huaying.com/uploads/2023-06-09/f8/57d0fcd8f2e3b08ce86cf5662c188b42.webp","year":"2022","dynamic":"已完结","type_name":"","label":""},{"id":"7b6f87cc","name":"一袋女王","cover":"https://t1.021huaying.com/uploads/2023-06-09/95/44e1fde6493566b62e8edb25bfaa7f2d.webp","year":"2009","dynamic":"更新至20230725","type_name":"","label":""},{"id":"7b6c81cb","name":"欲罢不能第三季","cover":"https://t1.021huaying.com/uploads/2023-06-10/89/7580094b343a5ed9806cd5b73bdbfc4b.webp","year":"2022","dynamic":"已完结","type_name":"","label":""},{"id":"7b6d83c9","name":"综艺大热门","cover":"https://t1.021huaying.com/uploads/2023-06-09/31/35aa96ca913aace98380592fe9789758.webp","year":"2013","dynamic":"更新至20230725","type_name":"","label":"7.5"},{"id":"7f6f85cb","name":"WOW桃姐","cover":"https://t1.021huaying.com/uploads/2023-06-09/3b/5a5bfa0aff2d1035bb0e30d95c4c7403.webp","year":"2022","dynamic":"更新至第20230113期","type_name":"","label":""},{"id":"796880c586","name":"脱口秀大会第五季","cover":"https://t1.021huaying.com/uploads/2023-06-10/28/dc5d964e800ed211250168f23abc1294.webp","year":"2022","dynamic":"年度特辑下","type_name":"","label":""},{"id":"7b6e87cb80","name":"密室大逃脱第一季","cover":"https://t1.021huaying.com/uploads/2023-06-09/a5/80ffcd162e3d097f8329d2ab2403803d.webp","year":"2019","dynamic":"已完结","type_name":"","label":""},{"id":"706882cd8c","name":"喜欢你我也是第一季","cover":"https://t1.021huaying.com/uploads/2023-06-09/60/a013e32609b91443d79880faccf6a77e.webp","year":"2019","dynamic":"已完结","type_name":"","label":"7.0"},{"id":"706884c586","name":"欢乐喜剧人第一季","cover":"https://t1.021huaying.com/uploads/2023-06-10/99/c590ab459dd82aa26948979e98c730af.webp","year":"2015","dynamic":"已完结","type_name":"","label":"高分推荐"}],"right":{"text":"查看更多","type":"tabs","data":{"index":3,"param":{}}}}]} -------------------------------------------------------------------------------- /js/enpass.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | [rewrite_local] 4 | ^https?:\/\/license\.enpass\.io\/api\/v1\/subscription\/me url script-response-body https://raw.githubusercontent.com/wf021325/qx/master/js/enpass.js 5 | 6 | [mitm] 7 | hostname = license.enpass.io 8 | */ 9 | 10 | var obj = JSON.parse($response.body); 11 | 12 | obj.license = "premium"; 13 | obj.info = { 14 | purchase_type: "inapp", 15 | store: "ios", 16 | id: "ENP_IAP_LTP", 17 | userid: "000000", 18 | transaction_id: "1000000000000000", 19 | logo: "" 20 | }; 21 | 22 | $done({ body: JSON.stringify(obj) }); -------------------------------------------------------------------------------- /js/kuwo.js: -------------------------------------------------------------------------------- 1 | /* 2 | # 来源 https://github.com/RuCu6/QuanX/blob/main/Rewrites/Cube/kuwo.snippet 3 | #!name = 酷我音乐 4 | #!desc = 无广告的酷我才是真酷我 5 | #!author = RuCu6 nameking77 6 | #!update = 2023-04-22 14:05 7 | 8 | [rewrite_local] 9 | # 广告 10 | ^http:\/\/audiobookpay\.kuwo\.cn\/a\.p\?op=get_advertright_endtime url reject-dict 11 | ^http:\/\/(mgxhtj|nmobi|searchrecterm)\.kuwo\.cn\/(mgxh|mobi|recterm)\.s url script-response-body https://raw.githubusercontent.com/wf021325/qx/master/js/kuwo.js 12 | 13 | # 会员 14 | ^http:\/\/audiobookpay\.kuwo\.cn\/a\.p url script-response-body https://raw.githubusercontent.com/wf021325/qx/master/js/kuwo.js 15 | ^http:\/\/musicpay\.kuwo\.cn\/music\.pay url script-response-body https://raw.githubusercontent.com/wf021325/qx/master/js/kuwo.js 16 | ^http:\/\/vip1\.kuwo\.cn\/vip\/(enc\/user\/vip\?op=ui|v2\/theme\?op=gd) url script-response-body https://raw.githubusercontent.com/wf021325/qx/master/js/kuwo.js 17 | ^https:\/\/vip1\.kuwo\.cn\/vip\/v2\/user\/vip\?op=ui url script-response-body https://raw.githubusercontent.com/wf021325/qx/master/js/kuwo.js 18 | 19 | [mitm] 20 | hostname = *.kuwo.cn 21 | */ 22 | 23 | 24 | // 2023-04-22 14:55 25 | 26 | if (!$response.body) 27 | $done({}); 28 | const method = $request.method; 29 | const url = $request.url; 30 | let body = $response.body; 31 | 32 | if (url.includes("/a.p")) { 33 | if (method == "POST") { 34 | body = body.replace(/"playright":\d+/g, '"playright":1').replace(/"downright":\d+/g, '"downright":1').replace(/"policytype":\d+/g, '"policytype":3').replace(/"policy":\d+/g, '"policy":5'); 35 | } else if (url.includes("getvip")) { 36 | let obj = JSON.parse(body); 37 | obj.packs = { 38 | end: 32495443200, 39 | bought_vip: 1, 40 | type: 1, 41 | period: 31, 42 | bought_vip_end: 32495443200 43 | }; 44 | body = JSON.stringify(obj); 45 | } 46 | } else if (url.includes("mgxhtj.kuwo.cn") || url.includes("nmobi.kuwo.cn")) { 47 | body = body.replace(/]*>/g, "").replace(/]*>/g, "").replace(/( (item.st = 0)); 54 | let tmp = obj.songs[0].audio[0].policy; 55 | obj.user[0] = { 56 | pid: obj.songs[0].audio[0].pid, 57 | type: tmp, 58 | name: tmp + "_1", 59 | categray: tmp + "_1", 60 | id: obj.songs[0].id, 61 | order: 375787919, 62 | final: [], 63 | buy: 1657425321, 64 | begin: 1657425321, 65 | end: 4180305321, 66 | CurEnd: 0, 67 | playCnt: 0, 68 | playUpper: 300, 69 | downCnt: 0, 70 | downUpper: 300, 71 | playVideoCnt: 0, 72 | playVideoUpper: 3000, 73 | downVideoCnt: 0, 74 | downVideoUpper: 3000, 75 | price: obj.songs[0].audio[0].price, 76 | period: 1000, 77 | feetype: 0, 78 | info: obj.songs[0] 79 | }; 80 | body = JSON.stringify(obj); 81 | } 82 | } else if (url.includes("/vip/enc/user/vip?op=ui")) { 83 | body = "Vo4m6X2hTph/vfpPmau8PTT0sFN6JCgzxSLVH/u3sbEt7VniYsVHbRFgOgN+Uvs39rAI7R3C5HVpaSj8tr8U8dLYwYdDCjMILuUorh3z0BiQToiWxudHkcASIPHNrmZHZYC/yv3DP4b89hbzfqU5UUDUqaZpEBZr76sDF2wNPmYjUEFSVCMGyTl1F6j1DBmKJ1Tik0YuG/2UBa/Ilz12a1KneXsNs5x5EE41bXDke7EygIB3I+6SoITZXOLFAFQFZujdI0GzClNglDKtclpUxpjN3uVeJxHLU40FTwNWo3ZDNv8KSdZpYZ5BDEOCyZkifmHlf1wnocX2zTr2xRAM6JhAD2WaSSNQQVJUI5lv72QNZSN43Pj/qdzatHQP4Pp/H1YxyP36rv3qBcnnJy/55YouIczRc3eJjXExRgo54qdyTYRMYoS9GzNn/edR3hSNnMn9PnElBCfZhkL0R5kZ9JBFCM3vNOy7Cnp6RVyAG0GFHv/g2q1yqkJxibyDro5nlnnvHjhZrsOvSvTXI1BBUlQjGoRqqCTDUvHLoiNwWMoKKfxtswWQiXjoQ6mL5dazxjUsbsHzC1N8YNMVtzf8gBryr3nMWS44wyUpi1/0WhGTRW1wsCllO1DB24+ibTFH/yftWN+/apM9vbQAkc/J+aFy/01plK7rsGNwWYYKG0sr6CS8dGQzy0On6aFo07hiU+wjUEFSVCOf/wKzzX5Cn/OLMKeVa1BPDxV5tm39vCrsxIG6T29VHWx8ck93S/nXCm2dHfojuLySZKJ50B1FaN5uFIY+LA1RbO/0sL+CoSJhoNOLibzt75c5dleW+lbwxLAAdBh5AFq4Z1Uj8bPjm5mHcGWQuBAyZIO+ie8wP4yvWwQFf1ENJiNQQVJUIzwCo22cpAtoAzYZWm3XFPfSlov4G15JGaaHL2X5FG5BTeUwwbBiQfwUpcb6oT8dbIKh2SsUZCeJZW43lLI0UIo9u3y1+P4GMtOKEZ7Sx0aQ3ewknthU2tpL0gnykFtiEtKBxcfHjJEen158zVXrbxxC0W35SmaYOOwgAmEMfxwHI1BBUlQjhVUHnBabnJcnmXCICcyUBglrZkXcNLwg91p4889vKFTLlzROHTt20UzjfKWsNK3U8pYgKYXPbQtSzIuRheEEQDFhLvEhIGKaB6yDoacDLJZ0jgFRIKKFBkbK0VE4nIABi1qgQOXvq1sG4QeupjfEWYqMX8EyyqPHrsDiCltAF1wjUEFSVCNybeUusnxJF2zswj8xQtfPiwfDj3TwKWxKXCmkheqHy7/0Qpyc84xWvq+YXktsU97wUZLHrgJmARudJmQNEwAweIdHMafcwreBy731z6kGLojy5TLgTN7XSm5Ar+hgOW+1ZwkWLyrVvaCdO/8/zdYl1w/PQUCs6dw0ThIeahwjpQ=="; 84 | } else if (url.includes("/vip/v2/user/vip?op=ui")) { 85 | let obj = JSON.parse(body); 86 | obj.data = { 87 | vipIcon: "https://image.kuwo.cn/fe/f2d09ac0-b959-404f-86fa-dc65c715c0e96.png", 88 | iconJumpUrl:"http://vip1.kuwo.cn/vip/vue/anPay/pay/index.html?pageType=avip&MBOX_WEBCLOSE=1&FULLHASARROW=1", 89 | growthValue: "21600", 90 | vipTag: "VIP6", 91 | vipOverSeasExpire: "0", 92 | time: "1659582730304", 93 | goSvipPage: "1", 94 | isNewUser: "1", 95 | vipmIcon:"https://image.kuwo.cn/fe/34ad47f8-da7f-43e4-abdc-e6c995666368yyb.png", 96 | svipIcon:"https://image.kuwo.cn/fe/f2d09ac0-b959-404f-86fa-dc65c715c0e96.png", 97 | vipmExpire: "32495443200000", 98 | biedSong: "0", 99 | luxuryIcon:"https://image.kuwo.cn/fe/2fae68ff-de2d-4473-bf28-8efc29e44968vip.png", 100 | userType: "3", 101 | isYearUser: "2", 102 | vip3Expire: "0", 103 | experienceExpire: "0", 104 | luxAutoPayUser: "2", 105 | biedAlbum: "1", 106 | vipLuxuryExpire: "32495443200000", 107 | vipmAutoPayUser: "2", 108 | svipAutoPayUser: "2", 109 | vipExpire: "32495443200000", 110 | svipExpire: "32495443200000" 111 | }; 112 | body = JSON.stringify(obj); 113 | } else if (url.includes("/vip/v2/theme?op=gd")) { 114 | let obj = JSON.parse(body); 115 | obj.data.needBieds = null; 116 | body = JSON.stringify(obj); 117 | } 118 | 119 | $done({body}); 120 | -------------------------------------------------------------------------------- /js/meitu.js: -------------------------------------------------------------------------------- 1 | /* 2 | 美图秀秀 3 | 4 | [rewrite_local] 5 | ^https?:\/\/(h5|api)\.xiuxiu\.meitu\.com\/v\d\/(h\d\/vip|vip|user)\/ url script-response-body https://raw.githubusercontent.com/wf021325/qx/master/js/meitu.js 6 | 7 | [mitm] 8 | hostname = *.xiuxiu.meitu.com 9 | */ 10 | 11 | url = $request.url 12 | body = $response.body 13 | if (url.indexOf('vip/vip_show') != -1) { 14 | var obj = JSON.parse(body); 15 | obj.data.show_producer_level = 2; 16 | obj.data.s = 1; 17 | obj.data.vip_type = 3; 18 | obj.data.is_valid_user = 1; 19 | obj.data.is_expire = 0; 20 | obj.data.valid_time = 4641350722; 21 | obj.data.vip_icon = 'https://xximg1.meitudata.com/6948531818264286440.png'; 22 | body = JSON.stringify(obj); 23 | } 24 | $done({body)}); 25 | -------------------------------------------------------------------------------- /js/qimao.js: -------------------------------------------------------------------------------- 1 | /* 2 | 七猫小说 3 | # ^https?:\/\/(api-\w+|xiaoshuo)\.wtzw\.com\/api\/v\d\/ url script-response-body http://192.168.2.170:8080/qimao.js 4 | ==================================== 5 | [rewrite_local] 6 | ^https?:\/\/(api-\w+|xiaoshuo)\.wtzw\.com\/api\/v\d\/ url script-response-body https://raw.githubusercontent.com/wf021325/qx/master/js/qimao.js 7 | ^https:\/\/api-gw\.wtzw\.com\/welf\/app\/v1\/task\/red-packet$ url reject-dict 8 | 9 | [mitm] 10 | hostname = *.wtzw.com 11 | ==================================== 12 | */ 13 | 14 | var body = $response.body; 15 | var url = $request.url; 16 | 17 | //https://xiaoshuo.wtzw.com/api/v1/user/get-user-info 18 | if (url.includes('/user/get-user-info')) { 19 | body = body.replace(/\"is_vip\"\:\"\d\"/g, '"is_vip":"1"'); 20 | } 21 | 22 | //https://xiaoshuo.wtzw.com/api/v3/user/my-center? 23 | if (url.includes('/user/my-center')) { 24 | body = body.replace(/\"year_vip_show\"\:\"\d\"/g, '"year_vip_show":"1"').replace(/\"vip_show_type\"\:\"\d+\"/g, '"vip_show_type":"40"').replace(/\"is_vip\"\:\"\d\"/g, '"is_vip":"1"'); 25 | let obj = JSON.parse(body); 26 | delete obj.data.user_area.vip_info; 27 | //data['func_area'][0].type='core_func' 保留data['func_area'][0] //data['func_area'][4].type='other' 保留data['func_area'][4] 28 | obj.data.func_area.length > 0 && (obj.data.func_area = obj.data.func_area.filter(item => item.type == "core_func" || item.type == "other"));//只留obj.data.func_area[0]core_func 和 .other 29 | body = JSON.stringify(obj); 30 | } 31 | 32 | //https://api-gw.wtzw.com/api/v2/vip/index? 33 | if (url.includes('/vip/index')) { 34 | body = body.replace(/\"isvip\"\:\"\d\"/g, '"isvip":"1"').replace(/\"year_vip_show\"\:\"\d\"/g, '"year_vip_show":"1"').replace(/\"time\"\:\"\d\"/g, '"time":"3742732800"') 35 | } 36 | 37 | if (url.includes('/login/tourist')) { 38 | body = body.replace(/\"is_vip\"\:\"\d\"/g, '"is_vip":"1"'); 39 | } 40 | 41 | if (url.includes('/user/get-role-adv-vip-info')) { 42 | body = body.replace(/\"year_vip_show\"\:\"\d\"/g, '"year_vip_show":"1"').replace(/\"isvip\"\:\"\d\"/g, '"isvip":"1"').replace(/\"isLifetimeVip\"\:\"\d\"/g, '"isLifetimeVip":"1"').replace(/\"type\"\:\"\d+\"/g, '"type":"40"'); 43 | } 44 | 45 | if (url.includes('/bookshelf-adv/index')) { 46 | body = body.replace(/\"list\"\:\[.*?\]/g, '"list":[]'); 47 | } 48 | 49 | if (url.includes('/user/page')) { 50 | body = body.replace(/\"year_vip_show\"\:\"\d\"/g, '"year_vip_show":"1"').replace(/\"is_vip\"\:\"\d\"/g, '"is_vip":"1"'); 51 | } 52 | 53 | if (url.includes('/book/download')) { 54 | body = body.replace(/\"list\"\:\[.*?\]/g, '"list":[]'); 55 | } 56 | 57 | if (url.includes('/reader-adv/index')) { 58 | body = body.replace(/\"reader_chapter_list\"\:\[.*?\]/g, '"reader_chapter_list":[]').replace(/\"reader_getcoin\"\:\[.*?\]/g, '"reader_getcoin":[]').replace(/\"reader_bottom_list\"\:\[.*?\]/g, '"reader_bottom_list":[]').replace(/\"reader_page_turn_list\"\:\[.*?\]/g, '"reader_page_turn_list":[]').replace(/\"reader_noad\"\:\[.*?\]/g, '"reader_noad":[]').replace(/\"reader_inchapter\"\:\[.*?\]/g, '"reader_inchapter":[]').replace(/\"feedback\"\:\[.*?\]/g, '"feedback":[]'); 59 | } 60 | 61 | if (url.includes('/voice-adv/index')) { 62 | body = body.replace(/\"voice_top\"\:\[.*?\]/g, '"voice_top":[]').replace(/\"voice_bottom\"\:\[.*?\]/g, '"voice_bottom":[]'); 63 | } 64 | 65 | if (url.includes('/get-player-info')) { 66 | body = body.replace(/\"voice_list\"\:\[.*?\]/g, '"voice_list":[]'); 67 | } 68 | 69 | if (url.includes('/init-adv/index')) { 70 | body = body.replace(/\"coopenHighList\"\:\[.*?\]/g, '"coopenHighList":[]'); 71 | } 72 | 73 | if (url.includes('/bookshelf-adv/index')) { 74 | body = body.replace(/\"bookshelf\"\:\[.*?\]/g, '"bookshelf":[]'); 75 | } 76 | 77 | $done({body}); 78 | 79 | 80 | //{"data":{"user_area":{"type":"my_center","base_info":{"title":"我的","login":"1","avatar":"https://cdn.wtzw.com/bookimg/free/jpeg/avatar/230520/16845606937682177_360x360.jpeg","avatar_review_status":"0","nickname":"灰灰021325","nickname_review_status":"0","is_vip":"0","vip_show_type":"3","year_vip_show":"0","user_other_data":[{"num":"0","link_url":"freereader://user_fans?param={\"uid\":\"0\", \"id\":\"460195838\"}","title":"粉丝","type":"fans_data","stat_code":"my_followers_#_click"},{"num":"0","link_url":"freereader://user_follow?param={\"uid\":\"0\", \"id\":\"460195838\"}","title":"关注","type":"follow_data","stat_code":"my_following_#_click"}],"level":{"avatar":"https://cdn.wtzw.com/bookimg/free/images/app/1_0_0/portraits_default_photo_360x360.png"},"level_icon":"https://cdn.wtzw.com/bookimg/free/images/app/1_0_0/level/level_icon_4.png","tourist_mode":"2"},"grid_info":[{"num":"13201","title":"我的金币","link_url":"freereader://exchange?param={\"url\":\"https://xiaoshuo.wtzw.com/app-h5/freebook/web/my-card?type=1\"}","type":"my_coin","click_toast":"","coin_to_money":"1.32","stat_code":"my_#_coin_click"},{"num":"62","title":"今日金币","link_url":"freereader://exchange?param={\"url\":\"https://xiaoshuo.wtzw.com/app-h5/freebook/web/my-card?type=1\"}","type":"today_coin","click_toast":"","stat_code":"my_#_todaycoin_click"},{"num":"0","title":"今日听读(分钟)","link_url":"","type":"today_read","click_toast":"阅读、听书达到一定时长可获得金币奖励","stat_code":"my_#_todayreading_click"}],"vip_info":{"stat_code":"my_#_vip_click","vip_link_url":"freereader://webview?param={\"url\":\"https://xiaoshuo.wtzw.com/app-h5/freebook/vip?full_screen=1\u0026from=myvip\"}","activity_info":{"stat_code":"","icon_url":"","link_url":""},"vip_open_info":{"stat_code":"my_vip_5_click","show_type":"1","text":"¥6 开通","link_url":"freereader://webview?param={\"url\":\"https://xiaoshuo.wtzw.com/app-h5/freebook/vip?full_screen=1\u0026from=myvip5\"}"},"vip_business":[{"stat_code":"my_vip_1_click","icon_url":"https://cdn.wtzw.com/bookimg/free/images/app/1_0_0/my-center/v3/mycenter_icon_vip_privilege_read.png","link_url":"freereader://webview?param={\"url\":\"https://xiaoshuo.wtzw.com/app-h5/freebook/vip?full_screen=1\u0026from=myvip1\"}","text":"阅读听书无广告","red_point":""},{"stat_code":"my_vip_2_click","icon_url":"https://cdn.wtzw.com/bookimg/free/images/app/1_0_0/my-center/v3/mycenter_icon_vip_privilege_coin_exchange.png","link_url":"freereader://webview?param={\"url\":\"https://xiaoshuo.wtzw.com/app-h5/freebook/web/withdraw?source=myvip2\"}","text":"金币兑换会员","red_point":""},{"stat_code":"my_vip_3_click","icon_url":"https://cdn.wtzw.com/bookimg/free/images/app/1_0_0/my-center/v3/mycenter_icon_vip_privilege_more.png","link_url":"freereader://webview?param={\"url\":\"https://xiaoshuo.wtzw.com/app-h5/freebook/vip?full_screen=1\u0026from=myvip3\"}","text":"更多会员权益","red_point":""}]}},"func_area":[{"type":"core_func","show_type":"1","list":[{"type":"my_read_history","first_title":"阅读历史","icon_url":"https://cdn.wtzw.com/bookimg/free/images/app/1_0_0/my-center/v3/mycenter_read_history.png","link_url":"freereader://reading_record","stat_code":"my_#_readhistory_click","red_point_show_type":"0","red_point_text":"","number":"0"},{"type":"must_read_ticket","first_title":"必读票","icon_url":"https://cdn.wtzw.com/bookimg/free/images/app/1_0_0/my-center/v3/mycenter_must_read_ticket.png","link_url":"freereader://bookstore_ticket_record","stat_code":"my_ticketrecord_#_click","red_point_show_type":"0","red_point_text":"","number":"1"},{"type":"book_friend","first_title":"书友圈","icon_url":"https://cdn.wtzw.com/bookimg/free/images/app/1_0_0/my-center/v3/mycenter_book_friend.png","link_url":"freereader://book_friend?param={\"type\":\"2\",\"tab\":\"3\"}","stat_code":"my_bookfriends_none[action]","red_point_show_type":"0","red_point_text":"","number":"0"},{"type":"message","first_title":"消息通知","icon_url":"https://cdn.wtzw.com/bookimg/free/images/app/1_0_0/my-center/v3/mycenter_system_message.png","link_url":"freereader://message_notice?param={\"system_num\":\"0\", \"reply_num\":\"0\", \"like_num\":\"0\"}","stat_code":"my_#_message_click","red_point_show_type":"0","red_point_text":"","number":"0"}]},{"type":"banner","show_type":"2","banners_show_type":"0","list":[{"show_percent":"100","stat_code":"my_#_banner_click","image_url":"https://cdn.wtzw.com/bookimg/free/jpeg/mycenter-seven-read-summer.jpg","link_url":"freereader://webview?param={\"url\":\"https://xiaoshuo.wtzw.com/app-h5/freebook/activity/seven-day-read-habit/index?full_screen=1\"}"},{"show_percent":"100","stat_code":"my_#_banner_click","image_url":"https://cdn.wtzw.com/bookimg/free/jpeg/mycenter-summer-read-challenge.jpg","link_url":"freereader://webview?param={\"url\":\"https://xiaoshuo.wtzw.com/app-h5/freebook/activity/summer-read-challenge\"}"}]},{"type":"ads","show_type":"3","list":[{"discover_name":"幸运7抽奖","icon_url":"https://cdn-ad.wtzw.com/bookimg/free/images/cache/16595968792425625.png","deep_link_url":"","web_link_url":"freereader://webview?param={\"url\":\"https://xiaoshuo.wtzw.com/app-h5/freebook/lucky7/index?enable_close=1\"}","statistical_code":"xingyunqi","stat_code":"my_discovery_#[action]","stat_params":"{\"statid\":\"xingyunqi\"}","aid":"","cid":"","click_feedback_url":"","expose_feedback_url":"","third_click_feedback_url":"","third_expose_feedback_url":"","is_show_privacy":"0","show_privacy_type":"1","developer":"","privacy_detail_url":"https://xiaoshuo.wtzw.com/app-h5/freebook/ad/application?enable_close=1\u0026id=133","id":"133","app_version":"","user_permission":"","privacy_policy_url":"","user_permission_url":""},{"discover_name":"防诈骗指南","icon_url":"https://cdn-ad.wtzw.com/bookimg/free/images/cache/15832919765369430.png","deep_link_url":"","web_link_url":"freereader://webview?param={\"url\":\"https://xiaoshuo.wtzw.com/app-h5/freebook/article/fraud-prevention-guide\"}","statistical_code":"wode_faxian_fang","stat_code":"my_discovery_#[action]","stat_params":"{\"statid\":\"wode_faxian_fang\"}","aid":"","cid":"","click_feedback_url":"","expose_feedback_url":"","third_click_feedback_url":"","third_expose_feedback_url":"","is_show_privacy":"0","show_privacy_type":"1","developer":"","privacy_detail_url":"https://xiaoshuo.wtzw.com/app-h5/freebook/ad/application?enable_close=1\u0026id=81","id":"81","app_version":"","user_permission":"","privacy_policy_url":"","user_permission_url":""},{"discover_name":"幸运大转盘","icon_url":"https://cdn-ad.wtzw.com/bookimg/free/images/cache/15832917292607050.png","deep_link_url":"","web_link_url":"freereader://webview?param={\"url\":\"https://xiaoshuo.wtzw.com/app-h5/freebook/wheelSurf?enable_close=1\"}","statistical_code":"wode_faxian_shouji","stat_code":"my_discovery_#[action]","stat_params":"{\"statid\":\"wode_faxian_shouji\"}","aid":"","cid":"","click_feedback_url":"","expose_feedback_url":"","third_click_feedback_url":"","third_expose_feedback_url":"","is_show_privacy":"0","show_privacy_type":"1","developer":"","privacy_detail_url":"https://xiaoshuo.wtzw.com/app-h5/freebook/ad/application?enable_close=1\u0026id=79","id":"79","app_version":"","user_permission":"","privacy_policy_url":"","user_permission_url":""}]},{"type":"topic","show_type":"8","first_title":"书友圈・推书邀请","link_url":"freereader://book_friend_rescue?param={\"tab\":\"2\",\"id\":\"\",\"type\":\"2\"}","list":[{"icon_url":"https://cdn.wtzw.com/bookimg/free/images/upload/system_avatar/102406/159341148636596703_96x96.png","nick_title":"七猫书友_072650511005 邀请你拯救书荒","topic":"# 求短篇小说(不超过100章的那种),HE","topic_url":"freereader://book_friend_detail?param={\"id\":\"222482\", \"type\":\"2\"}","recommend_url":"freereader://bf_recommend_book?param={\"topic_id\":\"222482\",\"type\":\"2\",\"title\":\"求短篇小说(不超过100章的那种),HE\",\"from\":\"1\"}","stat_code":"my_savebooklist_1_click","stat_code_recommend":"my_saverecommend_1_click"},{"icon_url":"https://cdn.wtzw.com/bookimg/free/jpeg/avatar/230131/16751596701331892_96x96.jpeg","nick_title":"糖炒栗子mjq 邀请你拯救书荒","topic":"# 穿书#先婚后爱","topic_url":"freereader://book_friend_detail?param={\"id\":\"222477\", \"type\":\"2\"}","recommend_url":"freereader://bf_recommend_book?param={\"topic_id\":\"222477\",\"type\":\"2\",\"title\":\"穿书#先婚后爱\",\"from\":\"1\"}","stat_code":"my_savebooklist_2_click","stat_code_recommend":"my_saverecommend_2_click"},{"icon_url":"https://cdn.wtzw.com/bookimg/free/jpeg/avatar/230721/16899497297044625_96x96.jpeg","nick_title":"卉 邀请你拯救书荒","topic":"# 双重山,有萌宝","topic_url":"freereader://book_friend_detail?param={\"id\":\"222466\", \"type\":\"2\"}","recommend_url":"freereader://bf_recommend_book?param={\"topic_id\":\"222466\",\"type\":\"2\",\"title\":\"双重山,有萌宝\",\"from\":\"1\"}","stat_code":"my_savebooklist_3_click","stat_code_recommend":"my_saverecommend_3_click"}]},{"type":"other","show_type":"4","list":[{"type":"person_comment","stat_code":"my_mycomment_#_click","icon_url":"https://cdn.wtzw.com/bookimg/free/images/app/1_0_0/my-center/v3/mycenter_my_comment.png","link_url":"freereader://person_comment","first_title":"我的评论","red_point":"0"},{"type":"read_preference","stat_code":"my_#_readlike_click","icon_url":"https://cdn.wtzw.com/bookimg/free/images/app/1_0_0/my-center/v3/mycenter_read_preferences.png","link_url":"freereader://reading_preference","first_title":"阅读喜好","red_point":"0"},{"type":"feedback","stat_code":"my_helpfeedback_#_click","icon_url":"https://cdn.wtzw.com/bookimg/free/images/app/1_0_0/my-center/v3/mycenter_feedback.png","link_url":"freereader://help_feedback","first_title":"帮助与反馈","red_point":"0"},{"type":"invite_friend","stat_code":"my_#_invitation_click","icon_url":"https://cdn.wtzw.com/bookimg/free/images/app/1_0_0/my-center/v3/mycenter_invite_friend.png","link_url":"freereader://invitation_invitefriend?param={\"url\":\"https://xiaoshuo.wtzw.com/app-h5/freebook/invite-friend\", \"type\":\"invite\"}","first_title":"邀请好友","red_point":"0"},{"type":"withdraw","stat_code":"my_coinwithdraw_#_click","icon_url":"https://cdn.wtzw.com/bookimg/free/images/app/1_0_0/my-center/usercenter_ico_gold.png","link_url":"freereader://webview?param={\"url\":\"https://xiaoshuo.wtzw.com/app-h5/freebook/web/withdraw?source=coin\"}","first_title":"金币提现","red_point":"0"},{"type":"become_author","stat_code":"my_#_author_click","icon_url":"https://cdn.wtzw.com/bookimg/free/images/app/1_0_0/my-center/v3/mycenter_become_author.png","link_url":"freereader://webview?param={\"url\":\"https://www.qimao.com/become_author.html\"}","first_title":"成为作家","red_point":"0"},{"type":"teenager_model","stat_code":"my_#_teenager_click","icon_url":"https://cdn.wtzw.com/bookimg/free/images/app/1_0_0/my-center/v3/mycenter_teenager_model.png","link_url":"freereader://teenager_model","first_title":"青少年模式","red_point":"0"},{"type":"setting","stat_code":"my_#_settings_click","icon_url":"https://cdn.wtzw.com/bookimg/free/images/app/1_0_0/my-center/v3/mycenter_setting.png","link_url":"freereader://settings","first_title":"设置","red_point":"0"}]}]}} -------------------------------------------------------------------------------- /js/slidebox.js: -------------------------------------------------------------------------------- 1 | /* 2 | # slidebox 3 | ==================================== 4 | [mitm] 5 | hostname = asia-east2-slidebox-ios-prod.cloudfunctions.net 6 | 7 | [rewrite_local] 8 | ^https:\/\/asia-east2-slidebox-ios-prod\.cloudfunctions\.net\/api_v1$ url script-response-body https://raw.githubusercontent.com/wf021325/qx/master/js/slidebox.js 9 | ==================================== 10 | */ 11 | 12 | var body = '{"data":{"env":{"projectId":"slidebox-ios-prod","region":"us-central1","function":"api_v1","realm":"prod"},"appStoreRecord":{"purchases":[{"productId":"co.slidebox.iap.apple.fullversion"}],"subscriptions":[],"validatedTimestampMs":"1616836532860","bundleId":"co.slidebox.Slidebox"}}}'; 13 | $done({body}); 14 | -------------------------------------------------------------------------------- /js/storm.js: -------------------------------------------------------------------------------- 1 | /* 2 | 本地解锁StormSniffer 3 | 4 | # 脚本制作 @NobyDa_Chat @wangfei021325 5 | # 加密来源 @PayNe 6 | ==================================== 7 | [rewrite_local] 8 | ^https?:\/\/api\.x-storm\.com\/app\/(user-profile|share-code\/get)\/$ url script-response-body https://raw.githubusercontent.com/wf021325/qx/master/js/storm.js 9 | 10 | [mitm] 11 | hostname = *.x-storm.com 12 | ==================================== 13 | */ 14 | 15 | int(); 16 | let url = $request.url, body = $response.body, headers = $request.headers; 17 | let uid = headers.uid, time = headers.t, key = '29hgfhdfv78344' + uid, huihui = '\u82CD\u4E95\u7070\u7070@wangfei021325', data; 18 | 19 | if (url == 'https://api.x-storm.com/app/user-profile/') { 20 | data = `{"uid":"${uid}","userID":10086,"isVip":1,"member_type":2,"member_title":"${huihui}","expire_on":"\u6280\u672F\u652F\u6301@PayNe","auth_quantity":999999999,"auth_mail":"","is_primary":0,"trail_status":0,"function_list":[1,2,3,4,5],"can_deauthorize":true,"timestamp":${time},"ts":1}`; 21 | data = l.btoa(l.encrypt(data, key)); 22 | } else if (url == 'https://api.x-storm.com/app/share-code/get/') { 23 | let obj = JSON.parse(body); 24 | data = l.decrypt(l.atob(obj.data), key); 25 | data = data.replace(/title\"\: \"(.+?)\"/g, `title": "$1${huihui}"`).replace(/is_encrypt\"\: \d/g, 'is_encrypt": 0').replace(/user\"\: \d+/g, 'user": 10086'); 26 | data = l.btoa(l.encrypt(data, key)); 27 | } 28 | body = `{"code":200,"data":"${data}","msg":"success","status":"success"}`; 29 | $done({body}); 30 | 31 | 32 | function int(){l={DELTA:2654435769,a:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),b:[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1],btoa(r){let t,e,n,o,a,c,i;for(e=n=0,o=r.length,c=(o-=a=o%3)/3<<2,a>0&&(c+=4),t=new Array(c);e>18]+l.a[i>>12&63]+l.a[i>>6&63]+l.a[63&i];return 1===a?(i=r.charCodeAt(e++),t[n++]=`${l.a[i>>2]+l.a[(3&i)<<4]}==`):2===a&&(i=r.charCodeAt(e++)<<8|r.charCodeAt(e++),t[n++]=`${l.a[i>>10]+l.a[i>>4&63]+l.a[(15&i)<<2]}=`),t.join("")},atob(r){let t,e,n,o,a,c,i,h,d,s;if((i=r.length)%4!=0||/[^ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\+\/\=]/.test(r))return"";for(d=i,(h="="===r.charAt(i-2)?1:"="===r.charAt(i-1)?2:0)>0&&(d-=4),d=3*(d>>2)+h,s=new Array(d),a=c=0;a>4),-1!==(n=l.b[r.charCodeAt(a++)]))&&(s[c++]=String.fromCharCode((15&e)<<4|(60&n)>>2),-1!==(o=l.b[r.charCodeAt(a++)]));)s[c++]=String.fromCharCode((3&n)<<6|o);return s.join("")},toBinaryString(r,t){const e=r.length;let n=e<<2;if(t){const t=r[e-1];if(t<(n-=4)-3||t>n)return null;n=t}for(let t=0;t>>8&255,r[t]>>>16&255,r[t]>>>24&255);const o=r.join("");return t?o.substring(0,n):o},toUint32Array(r,t){const e=r.length;let n,o=e>>2;3&e&&++o,t?(n=new Array(o+1))[o]=e:n=new Array(o);for(let t=0;t>2]|=r.charCodeAt(t)<<((3&t)<<3);return n},int32:r=>4294967295&r,mx:(r,t,e,n,o,a)=>(e>>>5^t<<2)+(t>>>3^e<<4)^(r^t)+(a[3&n^o]^e),fixk:r=>(r.length<4&&(r.length=4),r),encryptUint32Array(r,t){const e=r.length,n=e-1;let o,a,c,i,h,d;for(a=r[n],c=0,d=0|Math.floor(6+52/e);d>0;--d){for(i=(c=l.int32(c+l.DELTA))>>>2&3,h=0;h>>2&3,h=n;h>0;--h)a=r[h-1],o=r[h]=l.int32(r[h]-l.mx(c,o,a,h,i,t));a=r[n],o=r[0]=l.int32(r[0]-l.mx(c,o,a,0,i,t))}return r},utf8Encode(r){if(/^[\x00-\x7F]*$/.test(r))return r;const t=[],e=r.length;for(let n=0,o=0;n>6,128|63&a);else{if(!(a<55296||a>57343)){if(n+1=56320&&e<=57343){const r=65536+((1023&a)<<10|1023&e);t[o]=String.fromCharCode(240|r>>18&63,128|r>>12&63,128|r>>6&63,128|63&r),++n;continue}}throw new Error("Malformed string")}t[o]=String.fromCharCode(224|a>>12,128|a>>6&63,128|63&a)}}return t.join("")},utf8DecodeShortString(r,t){const e=new Array(t);let n=0,o=0;for(let a=r.length;n>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:e[n]=t;break;case 12:case 13:if(!(o=0&&a<=1048575))throw new Error(`Character outside valid Unicode range:0x${a.toString(16)}`);e[n++]=a>>10&1023|55296,e[n]=1023&a|56320}break;default:throw new Error(`Bad UTF-8 encoding 0x${t.toString(16)}`)}}return n>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:n[o]=i;break;case 12:case 13:if(!(a=0&&t<=1048575))throw new Error(`Character outside valid Unicode range:0x${t.toString(16)}`);n[o++]=t>>10&1023|55296,n[o]=1023&t|56320}break;default:throw new Error(`Bad UTF-8 encoding 0x${i.toString(16)}`)}if(o>=32766){const r=o+1;n.length=r,e[e.length]=String.fromCharCode.apply(String,n),t-=r,o=-1}}return o>0&&(n.length=o,e[e.length]=String.fromCharCode.apply(String,n)),e.join("")},utf8Decode:(r,t)=>((null==t||t<0)&&(t=r.length),0===t?"":/^[\x00-\x7F]*$/.test(r)||!/^[\x00-\xFF]*$/.test(r)?t===r.length?r:r.substr(0,t):t<32767?l.utf8DecodeShortString(r,t):l.utf8DecodeLongString(r,t)),encrypt:(r,t)=>null==r||0===r.length?r:(r=l.utf8Encode(r),t=l.utf8Encode(t),l.toBinaryString(l.encryptUint32Array(l.toUint32Array(r,!0),l.fixk(l.toUint32Array(t,!1))),!1)),decrypt:(r,t)=>null==r||0===r.length?r:(t=l.utf8Encode(t),l.utf8Decode(l.toBinaryString(l.decryptUint32Array(l.toUint32Array(r,!1),l.fixk(l.toUint32Array(t,!1))),!0)))}} -------------------------------------------------------------------------------- /js/xlyx.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | 小蓝医学,解锁VIP 仅QX测试 4 | 软件下载链接:https://apps.apple.com/cn/app/id1642455052 5 | 6 | 7 | 密钥来源频道:https://t.me/chxm1023 8 | 密钥来源链接:https://t.me/chxm1023/318 9 | ==================================== 10 | [rewrite_local] 11 | ^https:\/\/edu\.lezaitizhong\.com\/(vod|tiku)\/(class_list|getclassifychapter)\? url script-response-body https://raw.githubusercontent.com/wf021325/qx/master/js/xlyx.js 12 | 13 | [mitm] 14 | hostname = edu.lezaitizhong.com 15 | ==================================== 16 | 17 | */ 18 | 19 | let body = $response.body; 20 | body = body.replace(/\"is_unlock\"\:\"0\"/g,'"is_unlock":"1"'); 21 | $done({body}); 22 | 23 | -------------------------------------------------------------------------------- /js/xxtea_js.js: -------------------------------------------------------------------------------- 1 | const l={DELTA:2654435769,base64EncodeChars:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),base64DecodeChars:[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1],btoa(e){let r,n,o,t,c,F,i;for(n=o=0,t=e.length,c=t%3,t=t-c,F=t/3<<2,c>0&&(F+=4),r=new Array(F);n>18]+l.base64EncodeChars[i>>12&63]+l.base64EncodeChars[i>>6&63]+l.base64EncodeChars[i&63];return c===1?(i=e.charCodeAt(n++),r[o++]=`${l.base64EncodeChars[i>>2]+l.base64EncodeChars[(i&3)<<4]}==`):c===2&&(i=e.charCodeAt(n++)<<8|e.charCodeAt(n++),r[o++]=`${l.base64EncodeChars[i>>10]+l.base64EncodeChars[i>>4&63]+l.base64EncodeChars[(i&15)<<2]}=`),r.join("")},atob(e){let r,n,o,t,c,F,i,a,s,d;if(i=e.length,i%4!==0||/[^ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\+\/\=]/.test(e))return"";for(e.charAt(i-2)==="="?a=1:e.charAt(i-1)==="="?a=2:a=0,s=i,a>0&&(s-=4),s=(s>>2)*3+a,d=new Array(s),c=F=0;c>4),o=l.base64DecodeChars[e.charCodeAt(c++)],o===-1)||(d[F++]=String.fromCharCode((n&15)<<4|(o&60)>>2),t=l.base64DecodeChars[e.charCodeAt(c++)],t===-1)));)d[F++]=String.fromCharCode((o&3)<<6|t);return d.join("")},toBinaryString(e,r){const n=e.length;let o=n<<2;if(r){const c=e[n-1];if(o-=4,co)return null;o=c}for(let c=0;c>>8&255,e[c]>>>16&255,e[c]>>>24&255);const t=e.join("");return r?t.substring(0,o):t},toUint32Array(e,r){const n=e.length;let o=n>>2;n&3&&++o;let t;r?(t=new Array(o+1),t[o]=n):t=new Array(o);for(let c=0;c>2]|=e.charCodeAt(c)<<((c&3)<<3);return t},int32(e){return e&4294967295},mx(e,r,n,o,t,c){return(n>>>5^r<<2)+(r>>>3^n<<4)^(e^r)+(c[o&3^t]^n)},fixk(e){return e.length<4&&(e.length=4),e},encryptUint32Array(e,r){const n=e.length,o=n-1;let t,c,F,i,a,s;for(c=e[o],F=0,s=Math.floor(6+52/n)|0;s>0;--s){for(F=l.int32(F+l.DELTA),i=F>>>2&3,a=0;a>>2&3,a=o;a>0;--a)c=e[a-1],t=e[a]=l.int32(e[a]-l.mx(F,t,c,a,i,r));c=e[o],t=e[0]=l.int32(e[0]-l.mx(F,t,c,0,i,r))}return e},utf8Encode(e){if(/^[\x00-\x7F]*$/.test(e))return e;const r=[],n=e.length;for(let o=0,t=0;o>6,128|c&63);else if(c<55296||c>57343)r[t]=String.fromCharCode(224|c>>12,128|c>>6&63,128|c&63);else{if(o+1=56320&&F<=57343){const i=((c&1023)<<10|F&1023)+65536;r[t]=String.fromCharCode(240|i>>18&63,128|i>>12&63,128|i>>6&63,128|i&63),++o;continue}}throw new Error("Malformed string")}}return r.join("")},utf8DecodeShortString(e,r){const n=new Array(r);let o=0,t=0;for(let c=e.length;o>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:n[o]=F;break;case 12:case 13:if(t=0&&i<=1048575)n[o++]=i>>10&1023|55296,n[o]=i&1023|56320;else throw new Error(`Character outside valid Unicode range:0x${i.toString(16)}`)}else throw new Error("Unfinished UTF-8 octet sequence");break;default:throw new Error(`Bad UTF-8 encoding 0x${F.toString(16)}`)}}return o>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:o[t]=i;break;case 12:case 13:if(c=0&&a<=1048575)o[t++]=a>>10&1023|55296,o[t]=a&1023|56320;else throw new Error(`Character outside valid Unicode range:0x${a.toString(16)}`)}else throw new Error("Unfinished UTF-8 octet sequence");break;default:throw new Error(`Bad UTF-8 encoding 0x${i.toString(16)}`)}if(t>=32767-1){const a=t+1;o.length=a,n[n.length]=String.fromCharCode.apply(String,o),r-=a,t=-1}}return t>0&&(o.length=t,n[n.length]=String.fromCharCode.apply(String,o)),n.join("")},utf8Decode(e,r){return(r==null||r<0)&&(r=e.length),r===0?"":/^[\x00-\x7F]*$/.test(e)||!/^[\x00-\xFF]*$/.test(e)?r===e.length?e:e.substr(0,r):r<32767?l.utf8DecodeShortString(e,r):l.utf8DecodeLongString(e,r)},encrypt(e,r){return e==null||e.length===0?e:(e=l.utf8Encode(e),r=l.utf8Encode(r),l.toBinaryString(l.encryptUint32Array(l.toUint32Array(e,!0),l.fixk(l.toUint32Array(r,!1))),!1))},decrypt(e,r){return e==null||e.length===0?e:(r=l.utf8Encode(r),l.utf8Decode(l.toBinaryString(l.decryptUint32Array(l.toUint32Array(e,!1),l.fixk(l.toUint32Array(r,!1))),!0)))}}; 2 | 3 | //xxtea 加密到base64 4 | function xxtea_encrypt2base64(e, r) { 5 | return l.btoa(l.encrypt(e, r)) 6 | } 7 | 8 | //xxtea 从base64解密 9 | function xxtea_decryptFormBase64(e, r) { 10 | return e == null || e.length === 0 ? e : l.decrypt(l.atob(e), r) 11 | } -------------------------------------------------------------------------------- /js/xxtea_原生JS.js: -------------------------------------------------------------------------------- 1 | var base64EncodeChars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var base64DecodeChars=new Array(-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1);function base64encode(str){var out,i,len;var c1,c2,c3;len=str.length;i=0;out="";while(i>2);out+=base64EncodeChars.charAt((c1&0x3)<<4);out+="==";break;}c2=str.charCodeAt(i++);if(i==len){out+=base64EncodeChars.charAt(c1>>2);out+=base64EncodeChars.charAt(((c1&0x3)<<4)|((c2&0xF0)>>4));out+=base64EncodeChars.charAt((c2&0xF)<<2);out+="=";break;}c3=str.charCodeAt(i++);out+=base64EncodeChars.charAt(c1>>2);out+=base64EncodeChars.charAt(((c1&0x3)<<4)|((c2&0xF0)>>4));out+=base64EncodeChars.charAt(((c2&0xF)<<2)|((c3&0xC0)>>6));out+=base64EncodeChars.charAt(c3&0x3F);}return out;}function base64decode(str){var c1,c2,c3,c4;var i,len,out;len=str.length;i=0;out="";while(i>4));do{c3=str.charCodeAt(i++)&0xff;if(c3==61)return out;c3=base64DecodeChars[c3];}while(i>2));do{c4=str.charCodeAt(i++)&0xff;if(c4==61)return out;c4=base64DecodeChars[c4];}while(i=0x0001)&&(c<=0x007F)){out+=str.charAt(i);}else if(c>0x07FF){out+=String.fromCharCode(0xE0|((c>>12)&0x0F));out+=String.fromCharCode(0x80|((c>>6)&0x3F));out+=String.fromCharCode(0x80|((c>>0)&0x3F));}else{out+=String.fromCharCode(0xC0|((c>>6)&0x1F));out+=String.fromCharCode(0x80|((c>>0)&0x3F));}}return out;}function utf8to16(str){var out,i,len,c;var char2,char3;out="";len=str.length;i=0;while(i>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:out+=str.charAt(i-1);break;case 12:case 13:char2=str.charCodeAt(i++);out+=String.fromCharCode(((c&0x1F)<<6)|(char2&0x3F));break;case 14:char2=str.charCodeAt(i++);char3=str.charCodeAt(i++);out+=String.fromCharCode(((c&0x0F)<<12)|((char2&0x3F)<<6)|((char3&0x3F)<<0));break;}}return out;}function CharToHex(str){var out,i,len,c,h;out="";len=str.length;i=0;while(i0&&i%8==0)out+="\r\n";}return out;}var DELTA=0x9E3779B9;function toBinaryString(v,includeLength){var length=v.length;var n=length<<2;if(includeLength){var m=v[length-1];n-=4;if((mn)){return null;}n=m;}for(var i=0;i>>8&0xFF,v[i]>>>16&0xFF,v[i]>>>24&0xFF);}var result=v.join('');if(includeLength){return result.substring(0,n);}return result;}function toUint32Array(bs,includeLength){var length=bs.length;var n=length>>2;if((length&3)!==0){++n;}var v;if(includeLength){v=new Array(n+1);v[n]=length;}else{v=new Array(n);}for(var i=0;i>2]|=bs.charCodeAt(i)<<((i&3)<<3);}return v;}function int32(i){return i&0xFFFFFFFF;}function mx(sum,y,z,p,e,k){return((z>>>5^y<<2)+(y>>>3^z<<4))^((sum^y)+(k[p&3^e]^z));}function fixk(k){if(k.length<4)k.length=4;return k;}function encryptUint32Array(v,k){var length=v.length;var n=length-1;var y,z,sum,e,p,q;z=v[n];sum=0;for(q=Math.floor(6+52/length)|0;q>0;--q){sum=int32(sum+DELTA);e=sum>>>2&3;for(p=0;p>>2&3;for(p=n;p>0;--p){z=v[p-1];y=v[p]=int32(v[p]-mx(sum,y,z,p,e,k));}z=v[n];y=v[0]=int32(v[0]-mx(sum,y,z,0,e,k));}return v;}function utf8Encode(str){if(/^[\x00-\x7f]*$/.test(str)){return str;}var buf=[];var n=str.length;for(var i=0,j=0;i>6),0x80|(codeUnit&0x3F));}else if(codeUnit<0xD800||codeUnit>0xDFFF){buf[j]=String.fromCharCode(0xE0|(codeUnit>>12),0x80|((codeUnit>>6)&0x3F),0x80|(codeUnit&0x3F));}else{if(i+1>18)&0x3F),0x80|((rune>>12)&0x3F),0x80|((rune>>6)&0x3F),0x80|(rune&0x3F));++i;continue;}}throw new Error('Malformed string');}}return buf.join('');}function utf8DecodeShortString(bs,n){var charCodes=new Array(n);var i=0,off=0;for(var len=bs.length;i>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:charCodes[i]=unit;break;case 12:case 13:if(off>10)&0x03FF)|0xD800);charCodes[i]=((rune&0x03FF)|0xDC00);}else{throw new Error('Character outside valid Unicode range: 0x'+rune.toString(16));}}else{throw new Error('Unfinished UTF-8 octet sequence');}break;default:throw new Error('Bad UTF-8 encoding 0x'+unit.toString(16));}}if(i>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:charCodes[i]=unit;break;case 12:case 13:if(off>10)&0x03FF)|0xD800);charCodes[i]=((rune&0x03FF)|0xDC00);}else{throw new Error('Character outside valid Unicode range: 0x'+rune.toString(16));}}else{throw new Error('Unfinished UTF-8 octet sequence');}break;default:throw new Error('Bad UTF-8 encoding 0x'+unit.toString(16));}if(i>=0x7FFF-1){var size=i+1;charCodes.length=size;buf[buf.length]=String.fromCharCode.apply(String,charCodes);n-=size;i=-1;}}if(i>0){charCodes.length=i;buf[buf.length]=String.fromCharCode.apply(String,charCodes);}return buf.join('');}function utf8Decode(bs,n){if(n===undefined||n===null||(n<0))n=bs.length;if(n===0)return'';if(/^[\x00-\x7f]*$/.test(bs)||!(/^[\x00-\xff]*$/.test(bs))){if(n===bs.length)return bs;return bs.substr(0,n);}return((n<0xFFFF)?utf8DecodeShortString(bs,n):utf8DecodeLongString(bs,n));}function encrypt(data,key){if(data===undefined||data===null||data.length===0){return data;}data=utf8Encode(data);key=utf8Encode(key);return toBinaryString(encryptUint32Array(toUint32Array(data,true),fixk(toUint32Array(key,false))),false);}function decrypt(data,key){if(data===undefined||data===null||data.length===0){return data;}key=utf8Encode(key);return utf8Decode(toBinaryString(decryptUint32Array(toUint32Array(data,false),fixk(toUint32Array(key,false))),true));} 2 | 3 | 4 | //xxtea 加密到base64 5 | function xxtea_encryptToBase64(data, key) { 6 | return base64encode(encrypt(data, key)); 7 | } 8 | 9 | //xxtea 从base64解密 10 | function xxtea_decryptFromBase64(data, key) { 11 | if (data === undefined || data === null || data.length === 0) { 12 | return data; 13 | } 14 | return decrypt(base64decode(data), key); 15 | } 16 | -------------------------------------------------------------------------------- /js/yjb.js: -------------------------------------------------------------------------------- 1 | /* 2 | ==================================== 3 | [rewrite_local] 4 | ^https?:\/\/app-api\.yangjibao\.com url script-response-body https://raw.githubusercontent.com/wf021325/qx/master/js/yjb.js 5 | 6 | [mitm] 7 | hostname = *.yangjibao.com 8 | ==================================== 9 | */ 10 | 11 | var U=h;(function(i,j){var Y={i:0xf2,j:0x109,k:0xfb,l:0x13e,m:0xda},D=h,k=i();while(!![]){try{var l=-parseInt(D(0x12b))/0x1*(parseInt(D(0xe7))/0x2)+parseInt(D(0xe6))/0x3*(-parseInt(D(0xe9))/0x4)+-parseInt(D(0x12a))/0x5*(-parseInt(D(Y.i))/0x6)+parseInt(D(Y.j))/0x7*(-parseInt(D(0x127))/0x8)+parseInt(D(Y.k))/0x9*(parseInt(D(Y.l))/0xa)+-parseInt(D(0x110))/0xb*(parseInt(D(Y.m))/0xc)+parseInt(D(0x10e))/0xd;if(l===j)break;else k['push'](k['shift']());}catch(m){k['push'](k['shift']());}}}(g,0xea0b6));var f=(function(){var i=!![];return function(j,k){var Z={i:0x10d},l=i?function(){var E=h;if(k){var m=k[E(Z.i)](j,arguments);return k=null,m;}}:function(){};return i=![],l;};}()),e=f(this,function(){var a3={i:0x111,j:0x14a,k:0x102},F=h,i={'DuQsw':'(((.+)+)+)+$'};return e[F(0x111)]()[F(0x14a)](i['DuQsw'])[F(a3.i)]()[F(0x10f)](e)[F(a3.j)](i[F(a3.k)]);});function g(){var aY=['DhHlwgq','EeDpvwi','sNH3C3m','ANnVswq','wwret3q','C2v0sw50zxj2ywW','uxfVBeS','EMfMs0m','Ehb1AvK','tfPHqKi','DhjHy2u','kcGOlISPkYKRksSK','uvz4ENe','C2jWy3C','DgvZDa','ywn0Aw9U','B2zvvum','D2HPBguGkhrYDwuPihT9','AgrZA2y','q1Dqwfq','E30Uy29UC3rYDwn0B3iOiNjLDhvYBIb0AgLZiIKOicK','mZyXotC2BxDKv3n0','C3rHDgvpyMPLy3q','AK1IBNe','nJvhAwHbq24','mtrxsuP2v1K','svHnBg0','Aej0tKO','zwrIvhi','C3rYAw5N','yMLUza','tgfyswO','Cfrzu0G','A3jNEKW','zvjRs0W','DvHLvgy','AKDQrvC','DgfIBgu','qxPbruK','y29UC29Szq','sLnIt1y','seDLwuO','txzHANa','BMn1ExC','mZq4mJq3mg1vC1HjvG','EerVwgu','DxjS','wgLUuxK','sxrmqNe','wwLwt3u','y01Ztxm','uwnUvu0','uMXTq3G','r2Tts3i','Bvz4Agi','qKz1Bva','C2vHCMnO','xcTCkYaQkd86w2eTEKeTwL8KxvSWltLHlxPblvPFjf0Qkq','uNr1ruG','y2fSBa','u1r6uwK','s1fvrM0','zgvIDq','mti0mdaWnJHiww9suu4','rxHrEvu','qwDNBLK','AwX2vuO','CfvOvgu','A3rjt0C','zK9jvMC','zhnTu1e','sev2AM0','zxHJzxb0Aw9U','zNvUy3rPB24GkLWOicPCkq','x19WCM90B19F','ndiZovvsqxHkua','otm1mtzlv1jgy3a','Bg9N','mZC3mKTZvgngvG','D2fYBG','sNPhrwO','zxLYD3C','A2jRDeW','qMfQEeC','u0DKzfG','uND3y1K','qun3reO','mtm3ntm4DfngDgvt','q3j3zvC','y291BNrLCG','uezJwfq','ANbbwvK','yM9KEq','zxjYB3i','BgvUz3rO','vhrozhm','mJDcBvbsEum','EMnXrvm','BKr3DKu','seLNyuy','q01kufe','DMHpAe0','Aw5PDa','rhvrC3C','uvvLrg4','BNjlshG','vM5Nzxu','z2DLCG','CMv0DxjUicHMDw5JDgLVBIGPia','s2jQreO','n2jyBfDJEa','wxHcAKC','DfLxD08','Aw5MBW','yxbWBhK','mZq4nJaZmtLetwXVzMu','y29UC3rYDwn0B3i','mtfvugXUyuW','Dg9tDhjPBMC'];g=function(){return aY;};return g();}e();var d=(function(){var a8={i:0x12c},a7={i:0x11d,j:0x111,k:0x10b},a5={i:0xeb,j:0x133,k:0x10d},G=h,i={'JzGEj':function(k,l){return k===l;},'AzAEI':G(0x13b),'krgzL':G(a8.i),'BajxG':G(0xf0)},j=!![];return function(k,l){var H=G,m={'tYWwO':H(a7.i)};if(H(0xf0)===i[H(0xee)]){var n=j?function(){var I=H;if(l){if(i[I(a5.i)](i[I(0x138)],i[I(a5.j)])){if(m){var q=q[I(a5.k)](r,arguments);return s=null,q;}}else{var o=l[I(0x10d)](k,arguments);return l=null,o;}}}:function(){};return j=![],n;}else return k[H(a7.j)]()['search'](m[H(a7.k)])[H(0x111)]()[H(0x10f)](l)['search'](m[H(0x10b)]);};}());(function(){var ak={i:0x106,j:0x116,k:0x14f,l:0x13f},aj={i:0xde,j:0x115,k:0x118,l:0xf5,m:0xdb,n:0x11a,o:0x128},J=h,i={'mZqYa':function(l,m){return l+m;},'wHuzR':J(0x150),'tepAT':J(ak.i),'yuoQa':function(l,m){return l(m);},'KbjDJ':J(ak.j),'pUhTe':function(l,m){return l===m;},'jsoId':J(0x143),'BFumP':'wxkpe','QqolK':function(l,m){return l(m);},'nDwvE':J(0x107),'PFcXT':J(0x126),'ExQyU':function(l,m){return l===m;},'xpuiY':J(ak.k),'xDoXe':function(l){return l();}},j=function(){var K=J,l={'STzQi':function(n,o){return i['yuoQa'](n,o);}};if(i['KbjDJ']===i[K(0x108)]){var m;try{if(i[K(aj.i)](i[K(aj.j)],i[K(0x149)])){var ag={i:0x10d},o=o?function(){var L=K;if(o){var C=y[L(ag.i)](z,arguments);return A=null,C;}}:function(){};return t=![],o;}else m=i[K(aj.k)](Function,i[K(0xfd)]+i[K(aj.l)]+');')();}catch(o){i[K(aj.m)](i['xpuiY'],i[K(aj.n)])?m=window:l[K(0x14e)](j,0x0);}return m;}else(function(){return![];}[K(0x10f)](i['mZqYa'](i['wHuzR'],i['tepAT']))[K(0x10d)](K(aj.o)));},k=i[J(ak.l)](j);k[J(0x117)](c,0xfa0);}()),(function(){var ar={i:0xe4,j:0x14b},aq={i:0xe2,j:0x10d,k:0x136,l:0x103,m:0x11b},M=h,i={'HEvjm':function(j,k){return j===k;},'KvYbk':'GmVbV','zPyQd':M(ar.i),'CMJPQ':M(ar.j),'uRGQK':function(j,k){return j(k);},'jGjEW':M(0x101),'pTYSH':function(j,k){return j+k;},'DOZFy':'chain','QUeDn':function(j,k){return j(k);},'LZaBB':function(j){return j();}};d(this,function(){var N=M;if(i[N(aq.i)](i['KvYbk'],'PRLKx')){if(m){var n=q[N(aq.j)](r,arguments);return s=null,n;}}else{var j=new RegExp(i['zPyQd']),k=new RegExp(i[N(0xff)],'i'),l=i['uRGQK'](c,i[N(aq.k)]);!j[N(0x120)](i['pTYSH'](l,i['DOZFy']))||!k['test'](i[N(0x132)](l,'input'))?i[N(aq.l)](l,'0'):i[N(aq.m)](c);}})();}());var b=(function(){var av={i:0x119},O=h,i={'HIgaF':O(av.i),'oRpkn':'xgBHb'},j=!![];return function(k,l){var as={i:0x148,j:0x10d},P=O,m={'mVxhb':i[P(0xfe)],'dMIsv':i['oRpkn']},n=j?function(){var Q=P;if(l){if(m[Q(as.i)]===m['dMIsv'])k=l;else{var o=l[Q(as.j)](k,arguments);return l=null,o;}}}:function(){};return j=![],n;};}()),a=b(this,function(){var aF={i:0x126,j:0x147,k:0x137,l:0x135,m:0x10c,n:0x13a,o:0x11f,p:0xf1,q:0xe5,r:0x130},aE={i:0x107,j:0x100,k:0x134},aD={i:0x114},R=h,i={'Jxwss':function(r,s){return r(s);},'CrweW':function(r,s){return r+s;},'ofUUC':function(r,s){return r+s;},'QVxzq':R(aF.i),'vhOhM':function(r,s){return r===s;},'eRkKL':R(aF.j),'lxqMG':function(r){return r();},'Mvajp':R(0xe8),'JSbOV':R(0xf8),'gbvpT':R(0xe3),'sbpcw':R(aF.k),'ACwDJ':R(0x11c),'mhUIO':function(r,s){return r>(-0x2*r&0x6)):r:0x0){t=n['indexOf'](t);}for(var v=0x0,w=o['length'];v { 27 | if (typeof $request != "undefined") { 28 | getCookie(); 29 | return; 30 | } 31 | if ($.hifini != undefined) { 32 | await signin(); 33 | await Personal(); 34 | $.log(message); 35 | await SendMsg(message); 36 | }else{ 37 | $.msg($.name, '', `❌请先获取${authenticationName}🎉`); 38 | } 39 | })() 40 | .catch((e) => { 41 | $.log("", `❌失败! 原因: ${e}!`, ""); 42 | }) 43 | .finally(() => { 44 | $.done(); 45 | }); 46 | 47 | function getCookie() { 48 | if ($request.method = 'GET') { 49 | let token = $request.headers.token; 50 | if(token){ 51 | $.setdata(token, _key); 52 | $.msg($.name, `获取${authenticationName}成功🎉`, token); 53 | } else { 54 | $.msg($.name, "", `错误获取签到${authenticationName}失败`); 55 | } 56 | } 57 | } 58 | 59 | function getHeaders() { 60 | return { 61 | 'content-type': 'application/json', 62 | 'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 15_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.44(0x18002c2d) NetType/WIFI Language/zh_CN', 63 | 'token': $.hifini 64 | } 65 | } 66 | 67 | function signin() { 68 | return new Promise((resolve) => { 69 | headers = getHeaders(); 70 | url = 'https://capi.risingauto.com/api/energy/task/r/mini/dailySignIn?brandCode=4'; 71 | body = '{"token":"${huihui}"}'; 72 | const rest = {url: url,body: body,headers: headers}; 73 | $.post(rest, (error, response, data) => { 74 | try { 75 | //$.log('签到:'+data); 76 | var obj = $.toObj(data); 77 | if (obj?.resultCode == 200) { 78 | message += `签到: 获得积分:${obj?.data?.point} 连续签到:${obj?.data?.periodCheckInDays}天\n`; 79 | } else { 80 | message += `签到:${obj?.errMsg}\n`; 81 | } 82 | } catch (e) { 83 | $.logErr(e, `❌请重新登陆更新${authenticationName}`); 84 | } finally { 85 | resolve(); 86 | } 87 | }); 88 | }); 89 | } 90 | 91 | function Personal() { 92 | return new Promise((resolve) => { 93 | headers = getHeaders(); 94 | url = 'https://capi.risingauto.com/api/ccmmembers/members/Personal/v3?brandCode=4'; 95 | const rest = {url: url,headers: headers}; 96 | $.get(rest, (error, response, data) => { 97 | try { 98 | //$.log('总积分:'+data); 99 | var obj = $.toObj($.toObj(data)?.data); 100 | message += `总积分:${obj?.content.points}\n`; 101 | } catch (e) { 102 | $.logErr(e, `❌请重新登陆更新${authenticationName}`); 103 | } finally { 104 | resolve(); 105 | } 106 | }); 107 | }); 108 | } 109 | 110 | //通知 111 | async function SendMsg(message){$.isNode()?await notify.sendNotify($.name,message):$.msg($.name,"",message);} 112 | 113 | //***************************** 114 | 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,a)=>{s.call(this,t,(t,s,r)=>{t?a(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.encoding="utf-8",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}getEnv(){return"undefined"!=typeof $environment&&$environment["surge-version"]?"Surge":"undefined"!=typeof $environment&&$environment["stash-version"]?"Stash":"undefined"!=typeof module&&module.exports?"Node.js":"undefined"!=typeof $task?"Quantumult X":"undefined"!=typeof $loon?"Loon":"undefined"!=typeof $rocket?"Shadowrocket":void 0}isNode(){return"Node.js"===this.getEnv()}isQuanX(){return"Quantumult X"===this.getEnv()}isSurge(){return"Surge"===this.getEnv()}isLoon(){return"Loon"===this.getEnv()}isShadowrocket(){return"Shadowrocket"===this.getEnv()}isStash(){return"Stash"===this.getEnv()}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 a=this.getdata(t);if(a)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,a)=>e(a))})}runScript(t,e){return new Promise(s=>{let a=this.getdata("@chavy_boxjs_userCfgs.httpapi");a=a?a.replace(/\n/g,"").trim():a;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[i,o]=a.split("@"),n={url:`http://${o}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":i,Accept:"*/*"},timeout:r};this.post(n,(t,e,a)=>s(a))}).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),a=!s&&this.fs.existsSync(e);if(!s&&!a)return{};{const a=s?t:e;try{return JSON.parse(this.fs.readFileSync(a))}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),a=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):a?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const a=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of a)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,a)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[a+1])>>0==+e[a+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,a]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,a,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,a,r]=/^@(.*?)\.(.*?)$/.exec(e),i=this.getval(a),o=a?"null"===i?null:i||"{}":"{}";try{const e=JSON.parse(o);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),a)}catch(e){const i={};this.lodash_set(i,r,t),s=this.setval(JSON.stringify(i),a)}}else s=this.setval(t,e);return s}getval(t){switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":return $persistentStore.read(t);case"Quantumult X":return $prefs.valueForKey(t);case"Node.js":return this.data=this.loaddata(),this.data[t];default:return this.data&&this.data[t]||null}}setval(t,e){switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":return $persistentStore.write(t,e);case"Quantumult X":return $prefs.setValueForKey(t,e);case"Node.js":return this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0;default:return 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=(()=>{})){switch(t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"],delete t.headers["content-type"],delete t.headers["content-length"]),t.params&&(t.url+="?"+this.queryStr(t.params)),this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":default:this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,a)=>{!t&&s&&(s.body=a,s.statusCode=s.status?s.status:s.statusCode,s.status=s.statusCode),e(t,s,a)});break;case"Quantumult X":this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:a,headers:r,body:i,bodyBytes:o}=t;e(null,{status:s,statusCode:a,headers:r,body:i,bodyBytes:o},i,o)},t=>e(t&&t.error||"UndefinedError"));break;case"Node.js":let s=require("iconv-lite");this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:a,statusCode:r,headers:i,rawBody:o}=t,n=s.decode(o,this.encoding);e(null,{status:a,statusCode:r,headers:i,rawBody:o,body:n},n)},t=>{const{message:a,response:r}=t;e(a,r,r&&s.decode(r.rawBody,this.encoding))})}}post(t,e=(()=>{})){const s=t.method?t.method.toLocaleLowerCase():"post";switch(t.body&&t.headers&&!t.headers["Content-Type"]&&!t.headers["content-type"]&&(t.headers["content-type"]="application/x-www-form-urlencoded"),t.headers&&(delete t.headers["Content-Length"],delete t.headers["content-length"]),this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":default:this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient[s](t,(t,s,a)=>{!t&&s&&(s.body=a,s.statusCode=s.status?s.status:s.statusCode,s.status=s.statusCode),e(t,s,a)});break;case"Quantumult X":t.method=s,this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:a,headers:r,body:i,bodyBytes:o}=t;e(null,{status:s,statusCode:a,headers:r,body:i,bodyBytes:o},i,o)},t=>e(t&&t.error||"UndefinedError"));break;case"Node.js":let a=require("iconv-lite");this.initGotEnv(t);const{url:r,...i}=t;this.got[s](r,i).then(t=>{const{statusCode:s,statusCode:r,headers:i,rawBody:o}=t,n=a.decode(o,this.encoding);e(null,{status:s,statusCode:r,headers:i,rawBody:o,body:n},n)},t=>{const{message:s,response:r}=t;e(s,r,r&&a.decode(r.rawBody,this.encoding))})}}time(t,e=null){const s=e?new Date(e):new Date;let a={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in a)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?a[e]:("00"+a[e]).substr((""+a[e]).length)));return t}queryStr(t){let e="";for(const s in t){let a=t[s];null!=a&&""!==a&&("object"==typeof a&&(a=JSON.stringify(a)),e+=`${s}=${a}&`)}return e=e.substring(0,e.length-1),e}msg(e=t,s="",a="",r){const i=t=>{switch(typeof t){case void 0:return t;case"string":switch(this.getEnv()){case"Surge":case"Stash":default:return{url:t};case"Loon":case"Shadowrocket":return t;case"Quantumult X":return{"open-url":t};case"Node.js":return}case"object":switch(this.getEnv()){case"Surge":case"Stash":case"Shadowrocket":default:{let e=t.url||t.openUrl||t["open-url"];return{url:e}}case"Loon":{let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}case"Quantumult X":{let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl,a=t["update-pasteboard"]||t.updatePasteboard;return{"open-url":e,"media-url":s,"update-pasteboard":a}}case"Node.js":return}default:return}};if(!this.isMute)switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":default:$notification.post(e,s,a,i(r));break;case"Quantumult X":$notify(e,s,a,i(r));break;case"Node.js":}if(!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),a&&t.push(a),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":case"Quantumult X":default:this.log("",`❗️${this.name}, 错误!`,t);break;case"Node.js":this.log("",`❗️${this.name}, 错误!`,t.stack)}}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;switch(this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":case"Quantumult X":default:$done(t);break;case"Node.js":process.exit(1)}}}(t,e)} 115 | -------------------------------------------------------------------------------- /task/geely.js: -------------------------------------------------------------------------------- 1 | /* 2 | 吉利汽车签到 3 | 测试Quantumult-X,nodejs,其他自测 4 | 2024-06-22 5 | 2024-08-28 6 | 签到风控升级处理,请重新获取cookie,青龙也增加了一个参数 7 | 8 | 获取Cookie方法 ,QX开重写,进入【吉利汽车】 9 | 10 | ======调试区|忽略====== 11 | # ^https?:\/\/app\.geely\.com\/my\/getMyCenterCounts$ url script-response-body http://192.168.2.170:8080/geely.js 12 | ======调试区|忽略====== 13 | 14 | ==================================== 15 | [rewrite_local] 16 | ^https?:\/\/app\.geely\.com\/my\/getMyCenterCounts$ url script-response-body https://raw.githubusercontent.com/wf021325/qx/master/task/geely.js 17 | 18 | [task_local] 19 | 1 0 * * * https://raw.githubusercontent.com/wf021325/qx/master/task/geely.js, tag= 吉利汽车签到, enabled=true 20 | 21 | [mitm] 22 | hostname = app.geely.com 23 | ==================================== 24 | 25 | # 青龙环境变量 geely_val={"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","devicesn":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"} 26 | */ 27 | 28 | const $ = new Env("吉利汽车签到"); 29 | const _key = 'geely_val'; 30 | const CK_Val = $.toObj(getEnv(_key)); 31 | //$.log($.toStr(CK_Val)) 32 | $.is_debug ='true--'; 33 | $.messages = []; 34 | 35 | async function getCk() { 36 | if ($request && $request.method != 'OPTIONS') { 37 | const head = ObjectKeys2LowerCase($request.headers); 38 | const token = head['token']; 39 | const devicesn = head['devicesn']; 40 | if (token && devicesn) { 41 | const ckVal = $.toStr({token, devicesn}); 42 | $.setdata(ckVal, _key); 43 | $.msg($.name, '获取ck成功🎉', ckVal); 44 | } else { 45 | $.msg($.name, '', '❌获取ck失败'); 46 | } 47 | } 48 | } 49 | 50 | async function main() { 51 | if (CK_Val) { 52 | const {token, devicesn} = CK_Val; 53 | if (token && !devicesn) { 54 | $.msg($.name, '', '❌❌App升级,请重新更新ck🎉🎉'); 55 | return; 56 | } 57 | $.token = token; 58 | $.devicesn = devicesn; 59 | } else { 60 | $.msg($.name, '', '❌请先获取ck🎉'); 61 | return; 62 | } 63 | $.appversion = $.toObj((await $.http.get(`https://itunes.apple.com/cn/lookup?id=1518762715`))?.body)?.results[0]?.version; 64 | $.appversion = $.appversion ? $.appversion : "3.25.0"; 65 | $.log(`最新版本号:${$.appversion}`); 66 | 67 | const code = await signIn();//签到 68 | if (code.includes('token')) { 69 | return; 70 | }// 签到错误停止运行 71 | await getSignMsg(); 72 | await summary(); 73 | } 74 | 75 | // 签到 76 | async function signIn() { 77 | let _msg = ''; 78 | url = `https://app.geely.com/api/v1/userSign/sign/risk`; 79 | ts = Math.floor((new Date).getTime() / 1000); 80 | time = $.time('yyyy-MM-dd HH:mm:ss', ts * 1000); 81 | body = `{"signDate":"${time}","ts":"${ts}","cId":"BLqo2nmmoPgGuJtFDWlUjRI2b1b"}`; 82 | sign = `cId=BLqo2nmmoPgGuJtFDWlUjRI2b1b&signDate=${ts * 1000}&ts=${ts}0]3K@'9MK+6Jf` 83 | sign = CryptoJS.MD5(sign).toString(); 84 | /* sweet_security_info = { 85 | "appVersion": $.appversion , 86 | "channel": "ios%E5%AE%98%E6%96%B9", 87 | "deviceUUID": $.devicesn, 88 | "brand": "Apple", 89 | "osVersion": "17.6.1", 90 | "networkType": "NETWORK_WIFI",// 91 | "battery": "100",//电量 92 | "os": "iOS", 93 | "isCharging": "4",//充电 94 | "isSetProxy": "false",//设置代理 95 | "isLBSEnabled": "false",//LBS 96 | "ip": "192.168.1.1", 97 | "platform": "ios", 98 | "geelyDeviceId": $.devicesn, 99 | "screenResolution": "1290 * 2796",//分辨率 100 | "os_version": "17.6.1", 101 | "model": "iPhone 15 Pro Max", 102 | "isUsingVpn": "flase",//VPN 103 | "isJailbreak": "false"//越狱 104 | };*/ 105 | sweet_security_info = { 106 | appVersion: $.appversion , 107 | deviceUUID: $.devicesn, 108 | geelyDeviceId: $.devicesn 109 | } 110 | headers = { 111 | "X-Data-Sign": sign, 112 | appVersion: $.appversion, 113 | deviceSN: $.devicesn, 114 | sweet_security_info: $.toStr(sweet_security_info), 115 | token: $.token, 116 | platform: "iOS", 117 | "User-Agent": `GLMainProject/${$.appversion} (iPhone; iOS 17.6.1; Scale/2.00)`, 118 | "Content-Type": "application/json", 119 | }; 120 | const rest = {url, body, headers} 121 | let {code, data, message} = await httpRequest(rest); 122 | _msg += `签到:${message}`;//{"code":"fail","message":"您已签到,请勿重复操作!"} 123 | pushMsg(_msg); 124 | return code 125 | } 126 | 127 | // 累计签到 128 | async function getSignMsg() { 129 | url = `https://app.geely.com/api/v1/userSign/getSignMsg`; 130 | const _Date = new Date(); 131 | body = `{"year":"${_Date.getFullYear()}","month":"${_Date.getMonth() + 1}"}`; 132 | headers = { 133 | token: $.token, 134 | "Content-Type": "application/json", 135 | "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 17_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148/ios/geelyApp", 136 | }; 137 | const rest = {url, body, headers} 138 | let {code, data, message} = await httpRequest(rest); 139 | let _msg; 140 | _msg = (code == 'success') ? `累计签到:${data?.continuousSignDay}天` : ''; 141 | pushMsg(_msg); 142 | } 143 | //能力体 144 | async function summary() { 145 | url = `https://app.geely.com/api/v1/growthSystem/energyBody/summary`; 146 | headers = { 147 | appVersion: $.appversion, 148 | deviceSN: $.devicesn, 149 | token: $.token , 150 | platform: "iOS", 151 | "User-Agent": `GLMainProject/${$.appversion} (iPhone; iOS 17.6.1; Scale/2.00)`, 152 | }; 153 | const rest = {url, headers}; 154 | let {code, data, message} = await httpRequest(rest); 155 | let _msg; 156 | _msg = (code == 'success') ? `能量体:${parseFloat(data?.total)}` : '';//parseFloat('2.00') 157 | //{"code":"success","data":{"total":"2.00"},"message":"API调用成功"} 158 | pushMsg(_msg); 159 | 160 | } 161 | 162 | async function httpRequest(options) { 163 | try { 164 | options = options.url ? options : { url: options }; 165 | const _method = options?._method || ('body' in options ? 'post' : 'get'); 166 | const _respType = options?._respType || 'body'; 167 | const _timeout = options?._timeout || 15e3; 168 | const _http = [ 169 | new Promise((_, reject) => setTimeout(() => reject(`⛔️ 请求超时: ${options['url']}`), _timeout)), 170 | new Promise((resolve, reject) => { 171 | debug(options, '[Request]'); 172 | $[_method.toLowerCase()](options, (error, response, data) => { 173 | //debug(response, '[response]'); 174 | debug(data, '[data]'); 175 | error && $.log($.toStr(error)); 176 | if (_respType !== 'all') { 177 | resolve($.toObj(response?.[_respType], response?.[_respType])); 178 | } else { 179 | resolve(response); 180 | } 181 | }) 182 | }) 183 | ]; 184 | return await Promise.race(_http); 185 | } catch (err) { 186 | $.logErr(err); 187 | } 188 | } 189 | 190 | // 脚本执行入口 191 | !(async () => { 192 | if (typeof $request !== `undefined`) { 193 | getCk(); 194 | } else { 195 | if (!CK_Val) throw new Error('❌请先获取Token🎉') 196 | CryptoJS = await intCryptoJS(); 197 | await main(); 198 | } 199 | })().catch((e) => $.messages.push(e.message || e) && $.logErr(e)) 200 | .finally(async () => { 201 | await sendMsg($.messages.join('\n').trimStart().trimEnd());// 推送通知 202 | $.done(); 203 | }) 204 | 205 | //-------- 206 | function pushMsg(msg) { 207 | $.messages.push(msg.trimEnd()), $.log(msg.trimEnd()); 208 | } 209 | 210 | //加载 crypto-js 211 | async function intCryptoJS() { 212 | function Eval_Crypto(script_str) { 213 | const evalFunc = $.isNode() ? global.eval : eval; 214 | evalFunc(script_str); 215 | return $.isNode() ? global.CryptoJS : CryptoJS; 216 | } 217 | if($.is_debug !== 'true'){//调试模式默认从网络读取js脚本 218 | let script_str = ($.isNode() ? require("crypto-js") : $.getdata("cryptojs_Script")) || ""; 219 | if ($.isNode()) { 220 | $.log("✅ " + $.name + ": node环境,默认使用crypto-js模块"); 221 | return script_str; 222 | } 223 | if (script_str && Object.keys(script_str).length) { 224 | $.log("✅ " + $.name + ": 缓存中存在CryptoJS代码, 跳过下载"); 225 | return Eval_Crypto(script_str) 226 | } 227 | } 228 | $.log("🚀 " + "开始下载CryptoJS代码"); 229 | // const script_str = (await $.http.get('http://192.168.2.170:8080/crypto-js.min.js')).body; 230 | // Eval_Crypto(script_str); 231 | return new Promise(async resolve => { 232 | $.getScript('http://ys-l.ysepan.com/551976330/420094417/k5G4J73367NKLlPfoiL4c/crypto-js.min.js').then(script_str => { 233 | $.setdata(script_str, "cryptojs_Script"); 234 | Eval_Crypto(script_str) 235 | $.log("✅ CryptoJS加载成功"); 236 | resolve(CryptoJS); 237 | }); 238 | }); 239 | } 240 | 241 | 242 | function jsonToQueryString(t = {}) { 243 | return Object.keys(t).sort().map(e => `${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join("&"); 244 | } 245 | 246 | //DEBUG 247 | function debug(content,title="debug"){let start=`\n-----${title}-----\n`;let end=`\n-----${$.time('HH:mm:ss')}-----\n`;if($.is_debug==='true'){if(typeof content=="string"){$.log(start+content+end);}else if(typeof content=="object"){$.log(start+$.toStr(content)+end);}}}; 248 | 249 | //GET ENV 250 | function getEnv(...keys){for(let key of keys){var value=$.isNode()?process.env[key]||process.env[key.toUpperCase()]||process.env[key.toLowerCase()]||$.getdata(key):$.getdata(key);if(value)return value;}}; 251 | 252 | //到小写 253 | function ObjectKeys2LowerCase(obj){return Object.fromEntries(Object.entries(obj).map(([k,v])=>[k.toLowerCase(),v]))}; 254 | 255 | //通知 256 | async function sendMsg(message){if(!message)return;try{if($.isNode()){try{var notify=require('./sendNotify');}catch(e){var notify=require('./utils/sendNotify');}await notify.sendNotify($.name,message);}else{$.msg($.name,'',message);}}catch(e){$.log(`\n\n-----${$.name}-----\n${message}`);}}; 257 | 258 | //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ENV 259 | 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,a)=>{s.call(this,t,(t,s,r)=>{t?a(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.encoding="utf-8",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}getEnv(){return"undefined"!=typeof $environment&&$environment["surge-version"]?"Surge":"undefined"!=typeof $environment&&$environment["stash-version"]?"Stash":"undefined"!=typeof module&&module.exports?"Node.js":"undefined"!=typeof $task?"Quantumult X":"undefined"!=typeof $loon?"Loon":"undefined"!=typeof $rocket?"Shadowrocket":void 0}isNode(){return"Node.js"===this.getEnv()}isQuanX(){return"Quantumult X"===this.getEnv()}isSurge(){return"Surge"===this.getEnv()}isLoon(){return"Loon"===this.getEnv()}isShadowrocket(){return"Shadowrocket"===this.getEnv()}isStash(){return"Stash"===this.getEnv()}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 a=this.getdata(t);if(a)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,a)=>e(a))})}runScript(t,e){return new Promise(s=>{let a=this.getdata("@chavy_boxjs_userCfgs.httpapi");a=a?a.replace(/\n/g,"").trim():a;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[i,o]=a.split("@"),n={url:`http://${o}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":i,Accept:"*/*"},timeout:r};this.post(n,(t,e,a)=>s(a))}).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),a=!s&&this.fs.existsSync(e);if(!s&&!a)return{};{const a=s?t:e;try{return JSON.parse(this.fs.readFileSync(a))}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),a=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):a?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const a=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of a)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,a)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[a+1])>>0==+e[a+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,a]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,a,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,a,r]=/^@(.*?)\.(.*?)$/.exec(e),i=this.getval(a),o=a?"null"===i?null:i||"{}":"{}";try{const e=JSON.parse(o);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),a)}catch(e){const i={};this.lodash_set(i,r,t),s=this.setval(JSON.stringify(i),a)}}else s=this.setval(t,e);return s}getval(t){switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":return $persistentStore.read(t);case"Quantumult X":return $prefs.valueForKey(t);case"Node.js":return this.data=this.loaddata(),this.data[t];default:return this.data&&this.data[t]||null}}setval(t,e){switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":return $persistentStore.write(t,e);case"Quantumult X":return $prefs.setValueForKey(t,e);case"Node.js":return this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0;default:return 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=(()=>{})){switch(t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"],delete t.headers["content-type"],delete t.headers["content-length"]),t.params&&(t.url+="?"+this.queryStr(t.params)),this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":default:this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,a)=>{!t&&s&&(s.body=a,s.statusCode=s.status?s.status:s.statusCode,s.status=s.statusCode),e(t,s,a)});break;case"Quantumult X":this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:a,headers:r,body:i,bodyBytes:o}=t;e(null,{status:s,statusCode:a,headers:r,body:i,bodyBytes:o},i,o)},t=>e(t&&t.error||"UndefinedError"));break;case"Node.js":let s=require("iconv-lite");this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:a,statusCode:r,headers:i,rawBody:o}=t,n=s.decode(o,this.encoding);e(null,{status:a,statusCode:r,headers:i,rawBody:o,body:n},n)},t=>{const{message:a,response:r}=t;e(a,r,r&&s.decode(r.rawBody,this.encoding))})}}post(t,e=(()=>{})){const s=t.method?t.method.toLocaleLowerCase():"post";switch(t.body&&t.headers&&!t.headers["Content-Type"]&&!t.headers["content-type"]&&(t.headers["content-type"]="application/x-www-form-urlencoded"),t.headers&&(delete t.headers["Content-Length"],delete t.headers["content-length"]),this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":default:this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient[s](t,(t,s,a)=>{!t&&s&&(s.body=a,s.statusCode=s.status?s.status:s.statusCode,s.status=s.statusCode),e(t,s,a)});break;case"Quantumult X":t.method=s,this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:a,headers:r,body:i,bodyBytes:o}=t;e(null,{status:s,statusCode:a,headers:r,body:i,bodyBytes:o},i,o)},t=>e(t&&t.error||"UndefinedError"));break;case"Node.js":let a=require("iconv-lite");this.initGotEnv(t);const{url:r,...i}=t;this.got[s](r,i).then(t=>{const{statusCode:s,statusCode:r,headers:i,rawBody:o}=t,n=a.decode(o,this.encoding);e(null,{status:s,statusCode:r,headers:i,rawBody:o,body:n},n)},t=>{const{message:s,response:r}=t;e(s,r,r&&a.decode(r.rawBody,this.encoding))})}}time(t,e=null){const s=e?new Date(e):new Date;let a={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in a)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?a[e]:("00"+a[e]).substr((""+a[e]).length)));return t}queryStr(t){let e="";for(const s in t){let a=t[s];null!=a&&""!==a&&("object"==typeof a&&(a=JSON.stringify(a)),e+=`${s}=${a}&`)}return e=e.substring(0,e.length-1),e}msg(e=t,s="",a="",r){const i=t=>{switch(typeof t){case void 0:return t;case"string":switch(this.getEnv()){case"Surge":case"Stash":default:return{url:t};case"Loon":case"Shadowrocket":return t;case"Quantumult X":return{"open-url":t};case"Node.js":return}case"object":switch(this.getEnv()){case"Surge":case"Stash":case"Shadowrocket":default:{let e=t.url||t.openUrl||t["open-url"];return{url:e}}case"Loon":{let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}case"Quantumult X":{let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl,a=t["update-pasteboard"]||t.updatePasteboard;return{"open-url":e,"media-url":s,"update-pasteboard":a}}case"Node.js":return}default:return}};if(!this.isMute)switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":default:$notification.post(e,s,a,i(r));break;case"Quantumult X":$notify(e,s,a,i(r));break;case"Node.js":}if(!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),a&&t.push(a),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":case"Quantumult X":default:this.log("",`❗️${this.name}, 错误!`,t);break;case"Node.js":this.log("",`❗️${this.name}, 错误!`,t.stack)}}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;switch(this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":case"Quantumult X":default:$done(t);break;case"Node.js":process.exit(1)}}}(t,e)} -------------------------------------------------------------------------------- /task/hifini.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 2024-04-25更新 3 | 4 | * 脚本名称:hifini签到 5 | * 签到入口:https://www.hifini.com 6 | * 获取Cookie:手机端登录后回到首页脚本会自动获取cookie,未登录获取到的Cookie无效。青龙面板自己解决Cookie。 7 | * 青龙面板:环境变量 【hifini_KEY】 8 | * Cookie示例:【bbs_token=xxxxxxxx】cookie包含有bbs_token=就行,有多余的也无所谓 9 | ------------------ Surge/Shadowrocket 配置 ----------------- 10 | [MITM] 11 | hostname = hifini.com, www.hifini.com 12 | 13 | [Script] 14 | hifini取Cookie = type=http-request,pattern=^https:\/\/.*hifini\.com\/$,requires-body=0,max-size=0,script-path=https://raw.githubusercontent.com/wf021325/qx/master/task/hifini.js 15 | 16 | hifini签到 = type=cron,cronexp=1 0 * * *,timeout=500,script-path=https://raw.githubusercontent.com/wf021325/qx/master/task/hifini.js,script-update-interval=0 17 | 18 | ------------------ Loon 配置 ------------------ 19 | [MITM] 20 | hostname = hifini.com, www.hifini.com 21 | 22 | [Script] 23 | http-request ^https:\/\/.*hifini\.com\/$ tag=hifini取Cookie, script-path=https://raw.githubusercontent.com/wf021325/qx/master/task/hifini.js,requires-body=0 24 | 25 | cron "1 0 * * *" script-path=https://raw.githubusercontent.com/wf021325/qx/master/task/hifini.js,tag = hifini签到,enable=true 26 | 27 | -------------- Quantumult X 配置 -------------- 28 | [MITM] 29 | hostname = hifini.com, www.hifini.com 30 | 31 | [rewrite_local] 32 | ^https:\/\/.*hifini\.com\/$ url script-request-header https://raw.githubusercontent.com/wf021325/qx/master/task/hifini.js 33 | 34 | [task_local] 35 | 1 0 * * * https://raw.githubusercontent.com/wf021325/qx/master/task/hifini.js, tag=hifini签到, enabled=true 36 | 37 | 38 | */ 39 | const $ = new Env("hifini"); 40 | const _key = 'hifini_KEY'; 41 | $.hifini = getEnv(_key); 42 | 43 | var message = "",sign = ""; 44 | 45 | !(async() => { 46 | if (typeof $request != "undefined") { 47 | getCookie(); 48 | return; 49 | } 50 | if ($.hifini != undefined) { 51 | await getsign(); 52 | sign !== "" ? await signin() : $.msg($.name, '', '❌请先获取Cookie🎉'); 53 | console.log(message); 54 | await SendMsg(message); 55 | }else{ 56 | $.msg($.name, '', '❌请先获取Cookie🎉'); 57 | } 58 | })() 59 | .catch((e) => { 60 | $.log("", `❌失败! 原因: ${e}!`, ""); 61 | }) 62 | .finally(() => { 63 | $.done(); 64 | }); 65 | 66 | function getCookie() { 67 | if ($request.method = 'GET') { 68 | let Cookie = $request.headers.Cookie || $request.headers.cookie; 69 | if(Cookie){ 70 | $.setdata(Cookie, _key); 71 | $.msg($.name, '获取Cookie成功🎉', Cookie); 72 | } else { 73 | $.msg($.name, "", "错误获取签到Cookie失败"); 74 | } 75 | } 76 | } 77 | 78 | function getsign() { 79 | return new Promise((resolve) => { 80 | headers = { 81 | 'Cookie': $.hifini, 82 | 'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36' 83 | } 84 | url = 'https://www.hifini.com/'; 85 | const rest = {url,headers}; 86 | $.get(rest, (error, response, data) => { 87 | try { 88 | //const doc = new DOMParser().parseFromString(data, 'text/html'); 89 | //const aaa = doc.querySelector("body > script:nth-child(20)").textContent; 90 | //sign = aaa.match(/[a-f0-9]{64}/)?.[0]; 91 | sign = data.match(/[a-f0-9]{64}/)?.[0]; 92 | //console.log('sign:' + sign); 93 | } catch (e) { 94 | $.logErr(e, "❌请重新登陆更新Cookie"); 95 | } finally { 96 | resolve(); 97 | } 98 | }); 99 | }); 100 | } 101 | 102 | function signin() { 103 | return new Promise((resolve) => { 104 | headers = { 105 | 'X-Requested-With': 'XMLHttpRequest', 106 | 'Cookie': $.hifini, 107 | 'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36' 108 | } 109 | url = 'https://www.hifini.com/sg_sign.htm'; 110 | const rest = {url,body: 'sign=' + sign,headers}; 111 | $.post(rest, (error, response, data) => { 112 | try { 113 | console.log('签到:'+data); 114 | var obj = JSON.parse(data); 115 | message += `签到:${obj?.message}\n`; 116 | } catch (e) { 117 | $.logErr(e, "❌请重新登陆更新Cookie"); 118 | } finally { 119 | resolve(); 120 | } 121 | }); 122 | }); 123 | } 124 | 125 | 126 | function getEnv(...keys){for(let key of keys){var value=$.isNode()?process.env[key]||process.env[key.toUpperCase()]||process.env[key.toLowerCase()]||$.getdata(key):$.getdata(key);if(value)return value;}}; 127 | 128 | async function SendMsg(message){if(!message)return;try{if($.isNode()){try{var notify=require('./sendNotify');}catch(e){var notify=require('./utils/sendNotify');}await notify.sendNotify($.name,message);}else{$.msg($.name,'',message);}}catch(e){$.log(`\n\n-----${$.name}-----\n${message}`);}}; 129 | 130 | //***************************** 131 | function Env(t,e){class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,a)=>{s.call(this,t,(t,s,r)=>{t?a(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.encoding="utf-8",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}getEnv(){return"undefined"!=typeof $environment&&$environment["surge-version"]?"Surge":"undefined"!=typeof $environment&&$environment["stash-version"]?"Stash":"undefined"!=typeof module&&module.exports?"Node.js":"undefined"!=typeof $task?"Quantumult X":"undefined"!=typeof $loon?"Loon":"undefined"!=typeof $rocket?"Shadowrocket":void 0}isNode(){return"Node.js"===this.getEnv()}isQuanX(){return"Quantumult X"===this.getEnv()}isSurge(){return"Surge"===this.getEnv()}isLoon(){return"Loon"===this.getEnv()}isShadowrocket(){return"Shadowrocket"===this.getEnv()}isStash(){return"Stash"===this.getEnv()}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 a=this.getdata(t);if(a)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,a)=>e(a))})}runScript(t,e){return new Promise(s=>{let a=this.getdata("@chavy_boxjs_userCfgs.httpapi");a=a?a.replace(/\n/g,"").trim():a;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[i,o]=a.split("@"),n={url:`http://${o}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":i,Accept:"*/*"},timeout:r};this.post(n,(t,e,a)=>s(a))}).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),a=!s&&this.fs.existsSync(e);if(!s&&!a)return{};{const a=s?t:e;try{return JSON.parse(this.fs.readFileSync(a))}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),a=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):a?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const a=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of a)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,a)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[a+1])>>0==+e[a+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,a]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,a,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,a,r]=/^@(.*?)\.(.*?)$/.exec(e),i=this.getval(a),o=a?"null"===i?null:i||"{}":"{}";try{const e=JSON.parse(o);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),a)}catch(e){const i={};this.lodash_set(i,r,t),s=this.setval(JSON.stringify(i),a)}}else s=this.setval(t,e);return s}getval(t){switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":return $persistentStore.read(t);case"Quantumult X":return $prefs.valueForKey(t);case"Node.js":return this.data=this.loaddata(),this.data[t];default:return this.data&&this.data[t]||null}}setval(t,e){switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":return $persistentStore.write(t,e);case"Quantumult X":return $prefs.setValueForKey(t,e);case"Node.js":return this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0;default:return 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=(()=>{})){switch(t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"],delete t.headers["content-type"],delete t.headers["content-length"]),t.params&&(t.url+="?"+this.queryStr(t.params)),this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":default:this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,a)=>{!t&&s&&(s.body=a,s.statusCode=s.status?s.status:s.statusCode,s.status=s.statusCode),e(t,s,a)});break;case"Quantumult X":this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:a,headers:r,body:i,bodyBytes:o}=t;e(null,{status:s,statusCode:a,headers:r,body:i,bodyBytes:o},i,o)},t=>e(t&&t.error||"UndefinedError"));break;case"Node.js":let s=require("iconv-lite");this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:a,statusCode:r,headers:i,rawBody:o}=t,n=s.decode(o,this.encoding);e(null,{status:a,statusCode:r,headers:i,rawBody:o,body:n},n)},t=>{const{message:a,response:r}=t;e(a,r,r&&s.decode(r.rawBody,this.encoding))})}}post(t,e=(()=>{})){const s=t.method?t.method.toLocaleLowerCase():"post";switch(t.body&&t.headers&&!t.headers["Content-Type"]&&!t.headers["content-type"]&&(t.headers["content-type"]="application/x-www-form-urlencoded"),t.headers&&(delete t.headers["Content-Length"],delete t.headers["content-length"]),this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":default:this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient[s](t,(t,s,a)=>{!t&&s&&(s.body=a,s.statusCode=s.status?s.status:s.statusCode,s.status=s.statusCode),e(t,s,a)});break;case"Quantumult X":t.method=s,this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:a,headers:r,body:i,bodyBytes:o}=t;e(null,{status:s,statusCode:a,headers:r,body:i,bodyBytes:o},i,o)},t=>e(t&&t.error||"UndefinedError"));break;case"Node.js":let a=require("iconv-lite");this.initGotEnv(t);const{url:r,...i}=t;this.got[s](r,i).then(t=>{const{statusCode:s,statusCode:r,headers:i,rawBody:o}=t,n=a.decode(o,this.encoding);e(null,{status:s,statusCode:r,headers:i,rawBody:o,body:n},n)},t=>{const{message:s,response:r}=t;e(s,r,r&&a.decode(r.rawBody,this.encoding))})}}time(t,e=null){const s=e?new Date(e):new Date;let a={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in a)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?a[e]:("00"+a[e]).substr((""+a[e]).length)));return t}queryStr(t){let e="";for(const s in t){let a=t[s];null!=a&&""!==a&&("object"==typeof a&&(a=JSON.stringify(a)),e+=`${s}=${a}&`)}return e=e.substring(0,e.length-1),e}msg(e=t,s="",a="",r){const i=t=>{switch(typeof t){case void 0:return t;case"string":switch(this.getEnv()){case"Surge":case"Stash":default:return{url:t};case"Loon":case"Shadowrocket":return t;case"Quantumult X":return{"open-url":t};case"Node.js":return}case"object":switch(this.getEnv()){case"Surge":case"Stash":case"Shadowrocket":default:{let e=t.url||t.openUrl||t["open-url"];return{url:e}}case"Loon":{let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}case"Quantumult X":{let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl,a=t["update-pasteboard"]||t.updatePasteboard;return{"open-url":e,"media-url":s,"update-pasteboard":a}}case"Node.js":return}default:return}};if(!this.isMute)switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":default:$notification.post(e,s,a,i(r));break;case"Quantumult X":$notify(e,s,a,i(r));break;case"Node.js":}if(!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),a&&t.push(a),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":case"Quantumult X":default:this.log("",`❗️${this.name}, 错误!`,t);break;case"Node.js":this.log("",`❗️${this.name}, 错误!`,t.stack)}}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;switch(this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":case"Quantumult X":default:$done(t);break;case"Node.js":process.exit(1)}}}(t,e)} 132 | -------------------------------------------------------------------------------- /task/hzh.js: -------------------------------------------------------------------------------- 1 | /* 2 | 华住会 APP获取Token&签到 3 | 仅QX测试,其他自测 4 | ======调试区|忽略====== 5 | # ^https?:\/\/hweb-personalcenter\.huazhu\.com\/login\/autoLogin$ url script-request-header http://192.168.2.170:8080/hzh.js 6 | ======调试区|忽略====== 7 | 8 | ==================================== 9 | [rewrite_local] 10 | ^https?:\/\/hweb-personalcenter\.huazhu\.com\/login\/autoLogin$ url script-request-header https://raw.githubusercontent.com/wf021325/qx/master/task/hzh.js 11 | 12 | [task_local] 13 | 1 0 * * * https://raw.githubusercontent.com/wf021325/qx/master/task/hzh.js, tag=华住会, enabled=true 14 | 15 | [mitm] 16 | hostname = hweb-personalcenter.huazhu.com 17 | ==================================== 18 | */ 19 | 20 | const $ = new Env("华住会酒店"); 21 | const token_key = 'HZH_Token'; 22 | const token = $.getdata(token_key); 23 | var message = ""; 24 | 25 | !(async() => { 26 | if (typeof $request != "undefined") { 27 | getToken(); 28 | return; 29 | } 30 | await signin(); 31 | await status(); 32 | await notify(); 33 | })() 34 | .catch((e) => { 35 | $.log("", `❌失败! 原因: ${e}!`, ""); 36 | }) 37 | .finally(() => { 38 | $.done(); 39 | }); 40 | 41 | function getToken() { 42 | if ($request && $request.method != 'OPTIONS') { 43 | const Val = $request.headers['user-token']; 44 | if (Val) { 45 | let cookie = $.setdata(Val, token_key) 46 | if (cookie) { 47 | $.msg($.name, '', '获取签到Token成功🎉') 48 | } 49 | } 50 | } 51 | } 52 | 53 | function signin() { 54 | return new Promise((resolve) => { 55 | const signinRequest = { 56 | url: "https://hweb-mbf.huazhu.com/api/signIn", 57 | headers: { 58 | 'Content-Type': 'application/x-www-form-urlencoded', 59 | 'Client-Platform': 'APP-IOS', 60 | 'User-Token': token, 61 | }, 62 | body: 'state=1&day=' + $.time('dd') 63 | }; 64 | $.post(signinRequest, (error, response, data) => { 65 | try { 66 | var result = JSON.parse(data); 67 | if(result?.businessCode == '1000'){ 68 | if(result?.content.success == true){ 69 | message += `签到:获得积分:${result?.content.point}\n`; 70 | } else if(result?.content.isSign == true){ 71 | message += `签到:请勿重复签到\n`; 72 | } 73 | } else { 74 | message+=`❌${result?.message}\n` 75 | } 76 | } catch (e) { 77 | $.logErr(e,"❌请重新登陆更新Token"); 78 | } finally { 79 | resolve(); 80 | } 81 | }); 82 | }); 83 | } 84 | 85 | function status() { 86 | return new Promise((resolve) => { 87 | const statusRequest = { 88 | url: 'https://hweb-mbf.huazhu.com/api/getPoint', 89 | headers: { 90 | 'Content-Type': 'application/x-www-form-urlencoded', 91 | 'Client-Platform': 'APP-IOS', 92 | 'User-Token': token, 93 | }, 94 | body: JSON.stringify({}) 95 | }; 96 | $.post(statusRequest, (error, response, data) => { 97 | var result = JSON.parse(data); 98 | if (result?.businessCode == '1000') { 99 | message+=`当前积分:${result?.content.point}` 100 | } else { 101 | $.msg($.name, "", "❌请重新登陆更新Token"); 102 | } 103 | resolve(); 104 | }); 105 | }); 106 | } 107 | 108 | async function notify() {$.msg($.name, "", message);} 109 | 110 | 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,a)=>{s.call(this,t,(t,s,r)=>{t?a(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.encoding="utf-8",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}getEnv(){return"undefined"!=typeof $environment&&$environment["surge-version"]?"Surge":"undefined"!=typeof $environment&&$environment["stash-version"]?"Stash":"undefined"!=typeof module&&module.exports?"Node.js":"undefined"!=typeof $task?"Quantumult X":"undefined"!=typeof $loon?"Loon":"undefined"!=typeof $rocket?"Shadowrocket":void 0}isNode(){return"Node.js"===this.getEnv()}isQuanX(){return"Quantumult X"===this.getEnv()}isSurge(){return"Surge"===this.getEnv()}isLoon(){return"Loon"===this.getEnv()}isShadowrocket(){return"Shadowrocket"===this.getEnv()}isStash(){return"Stash"===this.getEnv()}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 a=this.getdata(t);if(a)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,a)=>e(a))})}runScript(t,e){return new Promise(s=>{let a=this.getdata("@chavy_boxjs_userCfgs.httpapi");a=a?a.replace(/\n/g,"").trim():a;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[i,o]=a.split("@"),n={url:`http://${o}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":i,Accept:"*/*"},timeout:r};this.post(n,(t,e,a)=>s(a))}).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),a=!s&&this.fs.existsSync(e);if(!s&&!a)return{};{const a=s?t:e;try{return JSON.parse(this.fs.readFileSync(a))}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),a=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):a?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const a=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of a)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,a)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[a+1])>>0==+e[a+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,a]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,a,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,a,r]=/^@(.*?)\.(.*?)$/.exec(e),i=this.getval(a),o=a?"null"===i?null:i||"{}":"{}";try{const e=JSON.parse(o);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),a)}catch(e){const i={};this.lodash_set(i,r,t),s=this.setval(JSON.stringify(i),a)}}else s=this.setval(t,e);return s}getval(t){switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":return $persistentStore.read(t);case"Quantumult X":return $prefs.valueForKey(t);case"Node.js":return this.data=this.loaddata(),this.data[t];default:return this.data&&this.data[t]||null}}setval(t,e){switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":return $persistentStore.write(t,e);case"Quantumult X":return $prefs.setValueForKey(t,e);case"Node.js":return this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0;default:return 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=(()=>{})){switch(t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"],delete t.headers["content-type"],delete t.headers["content-length"]),t.params&&(t.url+="?"+this.queryStr(t.params)),this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":default:this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,a)=>{!t&&s&&(s.body=a,s.statusCode=s.status?s.status:s.statusCode,s.status=s.statusCode),e(t,s,a)});break;case"Quantumult X":this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:a,headers:r,body:i,bodyBytes:o}=t;e(null,{status:s,statusCode:a,headers:r,body:i,bodyBytes:o},i,o)},t=>e(t&&t.error||"UndefinedError"));break;case"Node.js":let s=require("iconv-lite");this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:a,statusCode:r,headers:i,rawBody:o}=t,n=s.decode(o,this.encoding);e(null,{status:a,statusCode:r,headers:i,rawBody:o,body:n},n)},t=>{const{message:a,response:r}=t;e(a,r,r&&s.decode(r.rawBody,this.encoding))})}}post(t,e=(()=>{})){const s=t.method?t.method.toLocaleLowerCase():"post";switch(t.body&&t.headers&&!t.headers["Content-Type"]&&!t.headers["content-type"]&&(t.headers["content-type"]="application/x-www-form-urlencoded"),t.headers&&(delete t.headers["Content-Length"],delete t.headers["content-length"]),this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":default:this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient[s](t,(t,s,a)=>{!t&&s&&(s.body=a,s.statusCode=s.status?s.status:s.statusCode,s.status=s.statusCode),e(t,s,a)});break;case"Quantumult X":t.method=s,this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:a,headers:r,body:i,bodyBytes:o}=t;e(null,{status:s,statusCode:a,headers:r,body:i,bodyBytes:o},i,o)},t=>e(t&&t.error||"UndefinedError"));break;case"Node.js":let a=require("iconv-lite");this.initGotEnv(t);const{url:r,...i}=t;this.got[s](r,i).then(t=>{const{statusCode:s,statusCode:r,headers:i,rawBody:o}=t,n=a.decode(o,this.encoding);e(null,{status:s,statusCode:r,headers:i,rawBody:o,body:n},n)},t=>{const{message:s,response:r}=t;e(s,r,r&&a.decode(r.rawBody,this.encoding))})}}time(t,e=null){const s=e?new Date(e):new Date;let a={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in a)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?a[e]:("00"+a[e]).substr((""+a[e]).length)));return t}queryStr(t){let e="";for(const s in t){let a=t[s];null!=a&&""!==a&&("object"==typeof a&&(a=JSON.stringify(a)),e+=`${s}=${a}&`)}return e=e.substring(0,e.length-1),e}msg(e=t,s="",a="",r){const i=t=>{switch(typeof t){case void 0:return t;case"string":switch(this.getEnv()){case"Surge":case"Stash":default:return{url:t};case"Loon":case"Shadowrocket":return t;case"Quantumult X":return{"open-url":t};case"Node.js":return}case"object":switch(this.getEnv()){case"Surge":case"Stash":case"Shadowrocket":default:{let e=t.url||t.openUrl||t["open-url"];return{url:e}}case"Loon":{let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}case"Quantumult X":{let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl,a=t["update-pasteboard"]||t.updatePasteboard;return{"open-url":e,"media-url":s,"update-pasteboard":a}}case"Node.js":return}default:return}};if(!this.isMute)switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":default:$notification.post(e,s,a,i(r));break;case"Quantumult X":$notify(e,s,a,i(r));break;case"Node.js":}if(!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),a&&t.push(a),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":case"Quantumult X":default:this.log("",`❗️${this.name}, 错误!`,t);break;case"Node.js":this.log("",`❗️${this.name}, 错误!`,t.stack)}}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;switch(this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":case"Quantumult X":default:$done(t);break;case"Node.js":process.exit(1)}}}(t,e)} 111 | -------------------------------------------------------------------------------- /task/jetour.js: -------------------------------------------------------------------------------- 1 | /* 2 | 捷途汽车APP 签到 3 | 仅测试qx,node,理论支持surge,loon等等 4 | 5 | ======调试区|忽略====== 6 | # ^https?:\/\/mobile-consumer\.jetour\.com\.cn\/registerPush\?access_token= url script-request-header http://192.168.2.170:8080/jetour.js 7 | ======调试区|忽略====== 8 | 9 | ==================================== 10 | [rewrite_local] 11 | ^https?:\/\/mobile-consumer\.jetour\.com\.cn\/registerPush\?access_token= url script-request-header https://raw.githubusercontent.com/wf021325/qx/master/task/jetour.js 12 | 13 | [task_local] 14 | 1 0 * * * https://raw.githubusercontent.com/wf021325/qx/master/task/jetour.js, tag=捷途汽车, enabled=true 15 | 16 | [mitm] 17 | hostname = mobile-consumer.jetour.com.cn 18 | ==================================== 19 | 20 | 青龙环境变量 jetour_data={"token":"xxxxxxxxxxxxx"} 21 | 随便找到url里面有access_token的就是这个token 22 | */ 23 | 24 | const $ = new Env("捷途汽车"); 25 | const _key = 'jetour_data'; 26 | $.huihui = $.toObj(getEnv(_key)) || {}; 27 | $.is_debug = 'true-'; 28 | $.messages = []; 29 | 30 | async function main() { 31 | await tasks(); 32 | } 33 | 34 | async function tasks() { 35 | url = `https://mobile-consumer.jetour.com.cn/web/task/tasks/event-start?access_token=${$.huihui.token}`; 36 | body = '{"eventCode":"SJ50001"}'; 37 | headers = { 38 | "Content-Type": "application/json", 39 | "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 17_0_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 ios/1.0.0" 40 | } 41 | const {status, message} = await httpRequest({url, body, headers}); 42 | pushMsg(status === 200 ? '签到成功' : message); 43 | } 44 | 45 | //取ck 46 | function getCk() { 47 | if ($request && $request.method != 'OPTIONS') { 48 | const token = getParameterByName('access_token', $request.url) 49 | const ckVal = $.toStr({token}); 50 | $.setdata(ckVal, _key) 51 | $.msg($.name, '', '获取签到数据成功🎉\n' + ckVal) 52 | } 53 | } 54 | 55 | // 脚本执行入口 56 | (async () => { 57 | if (typeof $request !== 'undefined') { 58 | await getCk(); 59 | } else { 60 | await main(); 61 | } 62 | })().catch((e) => $.messages.push(e.message || e) && $.logErr(e)) 63 | .finally(async () => { 64 | await sendMsg($.messages.join('\n').trimStart().trimEnd()); // 推送通知 65 | $.done(); 66 | }) 67 | 68 | 69 | function getParameterByName(name, url) { 70 | if (!url) url = window.location.href; 71 | name = name.replace(/[\[\]]/g, '\\$&'); 72 | const regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'); 73 | const results = regex.exec(url); 74 | if (!results) return null; 75 | if (!results[2]) return ''; 76 | return decodeURIComponent(results[2].replace(/\+/g, ' ')); 77 | } 78 | 79 | // 80 | async function httpRequest(options){try{options=options.url?options:{url:options};const _method=options?._method||('body'in options?'post':'get');const _respType=options?._respType||'body';const _timeout=options?._timeout||15e3;const _http=[new Promise((_,reject)=>setTimeout(()=>reject(`??请求超时:${options['url']}`),_timeout)),new Promise((resolve,reject)=>{debug(options,'[Request]');$[_method.toLowerCase()](options,(error,response,data)=>{debug(data,'[data]');error&&$.log($.toStr(error));if(_respType!=='all'){resolve($.toObj(response?.[_respType],response?.[_respType]));}else{resolve(response);}})})];return await Promise.race(_http);}catch(err){$.logErr(err);}} 81 | // 82 | function pushMsg(msg) {$.messages.push(msg.trimEnd()), $.log(msg.trimEnd());} 83 | // 84 | function debug(content,title="debug"){let start=`┌---------------↓↓${title}↓↓---------------\n`;let end=`\n└---------------↑↑${$.time('HH:mm:ss')}↑↑---------------`;if($.is_debug==='true'){if(typeof content=="string"){$.log(start+content.replace(/\s+/g,'')+end);}else if(typeof content=="object"){$.log(start+$.toStr(content)+end);}}}; 85 | // 86 | async function sendMsg(message){if(!message)return;try{if($.isNode()){try{var notify=require('./sendNotify');}catch(e){var notify=require('./utils/sendNotify');}await notify.sendNotify($.name,message);}else{$.msg($.name,'',message);}}catch(e){$.log(`\n\n-----${$.name}-----\n${message}`);}}; 87 | 88 | // 89 | function getEnv(...keys){for(let key of keys){var value=$.isNode()?process.env[key]||process.env[key.toUpperCase()]||process.env[key.toLowerCase()]||$.getdata(key):$.getdata(key);if(value)return value;}}; 90 | 91 | // 92 | 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,a)=>{s.call(this,t,(t,s,r)=>{t?a(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.encoding="utf-8",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}getEnv(){return"undefined"!=typeof $environment&&$environment["surge-version"]?"Surge":"undefined"!=typeof $environment&&$environment["stash-version"]?"Stash":"undefined"!=typeof module&&module.exports?"Node.js":"undefined"!=typeof $task?"Quantumult X":"undefined"!=typeof $loon?"Loon":"undefined"!=typeof $rocket?"Shadowrocket":void 0}isNode(){return"Node.js"===this.getEnv()}isQuanX(){return"Quantumult X"===this.getEnv()}isSurge(){return"Surge"===this.getEnv()}isLoon(){return"Loon"===this.getEnv()}isShadowrocket(){return"Shadowrocket"===this.getEnv()}isStash(){return"Stash"===this.getEnv()}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 a=this.getdata(t);if(a)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,a)=>e(a))})}runScript(t,e){return new Promise(s=>{let a=this.getdata("@chavy_boxjs_userCfgs.httpapi");a=a?a.replace(/\n/g,"").trim():a;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[i,o]=a.split("@"),n={url:`http://${o}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":i,Accept:"*/*"},timeout:r};this.post(n,(t,e,a)=>s(a))}).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),a=!s&&this.fs.existsSync(e);if(!s&&!a)return{};{const a=s?t:e;try{return JSON.parse(this.fs.readFileSync(a))}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),a=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):a?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const a=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of a)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,a)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[a+1])>>0==+e[a+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,a]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,a,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,a,r]=/^@(.*?)\.(.*?)$/.exec(e),i=this.getval(a),o=a?"null"===i?null:i||"{}":"{}";try{const e=JSON.parse(o);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),a)}catch(e){const i={};this.lodash_set(i,r,t),s=this.setval(JSON.stringify(i),a)}}else s=this.setval(t,e);return s}getval(t){switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":return $persistentStore.read(t);case"Quantumult X":return $prefs.valueForKey(t);case"Node.js":return this.data=this.loaddata(),this.data[t];default:return this.data&&this.data[t]||null}}setval(t,e){switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":return $persistentStore.write(t,e);case"Quantumult X":return $prefs.setValueForKey(t,e);case"Node.js":return this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0;default:return 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=(()=>{})){switch(t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"],delete t.headers["content-type"],delete t.headers["content-length"]),t.params&&(t.url+="?"+this.queryStr(t.params)),this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":default:this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,a)=>{!t&&s&&(s.body=a,s.statusCode=s.status?s.status:s.statusCode,s.status=s.statusCode),e(t,s,a)});break;case"Quantumult X":this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:a,headers:r,body:i,bodyBytes:o}=t;e(null,{status:s,statusCode:a,headers:r,body:i,bodyBytes:o},i,o)},t=>e(t&&t.error||"UndefinedError"));break;case"Node.js":let s=require("iconv-lite");this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:a,statusCode:r,headers:i,rawBody:o}=t,n=s.decode(o,this.encoding);e(null,{status:a,statusCode:r,headers:i,rawBody:o,body:n},n)},t=>{const{message:a,response:r}=t;e(a,r,r&&s.decode(r.rawBody,this.encoding))})}}post(t,e=(()=>{})){const s=t.method?t.method.toLocaleLowerCase():"post";switch(t.body&&t.headers&&!t.headers["Content-Type"]&&!t.headers["content-type"]&&(t.headers["content-type"]="application/x-www-form-urlencoded"),t.headers&&(delete t.headers["Content-Length"],delete t.headers["content-length"]),this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":default:this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient[s](t,(t,s,a)=>{!t&&s&&(s.body=a,s.statusCode=s.status?s.status:s.statusCode,s.status=s.statusCode),e(t,s,a)});break;case"Quantumult X":t.method=s,this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:a,headers:r,body:i,bodyBytes:o}=t;e(null,{status:s,statusCode:a,headers:r,body:i,bodyBytes:o},i,o)},t=>e(t&&t.error||"UndefinedError"));break;case"Node.js":let a=require("iconv-lite");this.initGotEnv(t);const{url:r,...i}=t;this.got[s](r,i).then(t=>{const{statusCode:s,statusCode:r,headers:i,rawBody:o}=t,n=a.decode(o,this.encoding);e(null,{status:s,statusCode:r,headers:i,rawBody:o,body:n},n)},t=>{const{message:s,response:r}=t;e(s,r,r&&a.decode(r.rawBody,this.encoding))})}}time(t,e=null){const s=e?new Date(e):new Date;let a={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in a)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?a[e]:("00"+a[e]).substr((""+a[e]).length)));return t}queryStr(t){let e="";for(const s in t){let a=t[s];null!=a&&""!==a&&("object"==typeof a&&(a=JSON.stringify(a)),e+=`${s}=${a}&`)}return e=e.substring(0,e.length-1),e}msg(e=t,s="",a="",r){const i=t=>{switch(typeof t){case void 0:return t;case"string":switch(this.getEnv()){case"Surge":case"Stash":default:return{url:t};case"Loon":case"Shadowrocket":return t;case"Quantumult X":return{"open-url":t};case"Node.js":return}case"object":switch(this.getEnv()){case"Surge":case"Stash":case"Shadowrocket":default:{let e=t.url||t.openUrl||t["open-url"];return{url:e}}case"Loon":{let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}case"Quantumult X":{let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl,a=t["update-pasteboard"]||t.updatePasteboard;return{"open-url":e,"media-url":s,"update-pasteboard":a}}case"Node.js":return}default:return}};if(!this.isMute)switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":default:$notification.post(e,s,a,i(r));break;case"Quantumult X":$notify(e,s,a,i(r));break;case"Node.js":}if(!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),a&&t.push(a),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":case"Quantumult X":default:this.log("",`❗️${this.name}, 错误!`,t);break;case"Node.js":this.log("",`❗️${this.name}, 错误!`,t.stack)}}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;switch(this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":case"Quantumult X":default:$done(t);break;case"Node.js":process.exit(1)}}}(t,e)} -------------------------------------------------------------------------------- /task/nissan.js: -------------------------------------------------------------------------------- 1 | /* 2 | 东风日产签到,获得成长值 3 | 测试Quantumult-X,nodejs,其他自测 4 | 2024-06-22 QX自动关注第三方API提交,解决QX提交问题(此方法纯属无奈,会泄露Token) 5 | 获取Cookie方法 ,QX开重写,进入【东风日产】 6 | 7 | ======调试区|忽略====== 8 | # ^https?:\/\/oneapph5\.dongfeng-nissan\.com\.cn\/mb-gw\/dndc-gateway\/community\/api\/v2\/user$ url script-response-body http://192.168.2.170:8080/nissan.js 9 | ======调试区|忽略====== 10 | 11 | ==================================== 12 | [rewrite_local] 13 | ^https?:\/\/oneapph5\.dongfeng-nissan\.com\.cn\/mb-gw\/dndc-gateway\/community\/api\/v2\/user$ url script-response-body https://raw.githubusercontent.com/wf021325/qx/master/task/nissan.js 14 | 15 | [task_local] 16 | 1 0 * * * https://raw.githubusercontent.com/wf021325/qx/master/task/nissan.js, tag= 东风日产签到, enabled=true 17 | 18 | [mitm] 19 | hostname = oneapph5.dongfeng-nissan.com.cn 20 | ==================================== 21 | 22 | # 青龙环境变量 nissan_val = {"token":"xxxxxxxxxxxxx","uuid":"xxxxxxxx"} 23 | # 手动拼接 nissan_val 24 | 在https://oneapph5.dongfeng-nissan.com.cn/mb-gw/dndc-gateway/community/api/v2/user 找到以下参数 25 | # token = $request.headers['token'] 26 | # uuid = $response.body.rows['one_id'] 27 | */ 28 | 29 | const $ = new Env("东风日产签到"); 30 | const _key = 'nissan_val'; 31 | const CK_Val = $.toObj(getEnv(_key)); 32 | $.is_debug ='true-'; 33 | $.messages = []; 34 | 35 | async function getCk() { 36 | if ($request && $request.method != 'OPTIONS') { 37 | const head = ObjectKeys2LowerCase($request.headers); 38 | const token = head['token']; 39 | const uuid = $.toObj($response.body).rows['one_id']; 40 | if (token) { 41 | const ckVal = $.toStr({token, uuid}); 42 | $.setdata(ckVal, _key); 43 | $.msg($.name, '获取ck成功🎉', ckVal); 44 | } else { 45 | $.msg($.name, '', '❌获取ck失败'); 46 | } 47 | } 48 | } 49 | 50 | async function main() { 51 | if (CK_Val) { 52 | const {token, uuid} = CK_Val; 53 | $.token = token; 54 | $.uuid = uuid; 55 | } else { 56 | $.msg($.name, '', '❌请先获取ck🎉'); 57 | return; 58 | } 59 | //intSha(); 60 | $.appversion = $.toObj((await $.http.get(`https://itunes.apple.com/cn/lookup?id=1341994593`)).body).results[0].version; 61 | $.log(`最新版本号:${$.appversion}`); 62 | 63 | var result = await signIn();//签到 64 | if (result !== '0' && result !== '1') {return;}// 签到错误停止运行 65 | 66 | await new_list();//【此刻-最新】帖子 获取 $.push_id, $.tittle, $.user_id 67 | if (!$.push_id) {return pushMsg('没有找到帖子id')}//找不到帖子ID就停止 68 | await sort_view();//浏览帖子 69 | await sort_like();//点赞 70 | await sort_unlike();// 取消点赞 71 | 72 | var result = await comments();//评论帖子 73 | if (result == '1') {await comments_del();}//删除评论 74 | 75 | let _msg; 76 | if ($.isQuanX()) { 77 | await post_test('PUT'); 78 | await post_test('DELETE'); 79 | } else { 80 | // put/delete DELETE 81 | await follow('put');//关注 82 | await follow('delete');//取消关注 83 | } 84 | await growthScore();//查询成长值 85 | } 86 | 87 | // 签到 88 | async function signIn() { 89 | let _msg = ''; 90 | url = `/mb-gw/vmsp-me/ly/busicen/member/reward/pointsreturn/memberPointsRechargetRequestSign`; 91 | body = `{"requestId":"$$timestamp$$","version":"202304","channel":"1","wechat_trade_type":"APP","token":"${$.token}","uuid":"${$.uuid}"}`; 92 | let {result, msg} = await httpPost(url, body); 93 | _msg += `签到:${msg}`; 94 | pushMsg(_msg); 95 | return result 96 | } 97 | 98 | // 查成长值 99 | async function growthScore() { 100 | url = `/mb-gw/dfn-growth/rest/ly-mp-growth-service/ly/mgs/growth/growthvalue/medal`; 101 | body = '{}' 102 | let {result, msg, data} = await httpPost(url, body); 103 | let _msg; 104 | _msg = (result == '1') ? `成长值:${data?.growthScore}` : ''; 105 | pushMsg(_msg); 106 | } 107 | 108 | //最新帖子 109 | async function new_list() { 110 | let _msg; 111 | url = `/mb-gw/dndc-gateway/community/api/v2/feeds/new_list`; 112 | let {result, msg, rows} = await httpPost(url); 113 | let find_id = rows?.rows?.find(item => item.style_type === 'Postings_style'); 114 | $.push_id = find_id ? find_id?.id : null;//帖子id 115 | $.tittle = find_id?.feed_title;//帖子标题 116 | $.user_id = find_id?.user_id//楼主user_id 117 | 118 | _msg = $.push_id ? `帖子:${$.tittle}` : `帖子:${msg}` 119 | pushMsg(_msg); 120 | } 121 | 122 | // 浏览帖子 123 | async function sort_view() { 124 | url = `/mb-gw/dndc-gateway/community/api/v2/feeds/${$.push_id}?use_volc=0`;//【此刻-最新】帖子 125 | let {result, msg} = await httpPost(url); 126 | let _msg; 127 | _msg = `浏览帖子:${msg}`; 128 | pushMsg(_msg); 129 | } 130 | 131 | // 点赞 132 | async function sort_like() { 133 | url = `/mb-gw/dndc-gateway/community/api/v2/feeds/${$.push_id}/like`; 134 | body = `{"use_volc":false}`; 135 | let {result, msg} = await httpPost(url, body); 136 | let _msg; 137 | _msg = `点赞帖子:${msg}`; 138 | pushMsg(_msg); 139 | } 140 | 141 | // 取消点赞 142 | async function sort_unlike() { 143 | url = `/mb-gw/dndc-gateway/community/api/v2/feeds/${$.push_id}/unlike?use_volc=0`; 144 | let {result, msg} = await httpPost(url, '', method = 'delete') 145 | let _msg; 146 | _msg = (result == '1') ? '取消点赞:成功' : `取消点赞:${msg}`; 147 | pushMsg(_msg); 148 | } 149 | 150 | //评论 151 | async function comments() { 152 | const text = ['我非常赞同您的观点', '您的帖子让我看到了全新的角度', '谢谢您的分享,感谢', '您的帖子让我受益匪浅', '再次感谢您的分享!', '非常赞同您的观点', '感谢您为我打开了一扇新门', '你的帖子给我带来了很大的启发', '谢谢您的分享和付出!', '这帖子很有帮助' 153 | ]; 154 | const 评论 = text[Math.floor(Math.random() * text.length)] 155 | url = `/mb-gw/dndc-gateway/community/api/v2/comments`; 156 | body = `{"body":"${评论}","commentable_id":${$.push_id},"commentable_type":"feeds","use_volc":false}`; 157 | let {result, msg, rows} = await httpPost(url, body); 158 | $.comment_id = rows?.comment?.id; 159 | let _msg; 160 | _msg = `评论帖子:${msg}`; 161 | pushMsg(_msg); 162 | return result 163 | } 164 | 165 | //删除评论 166 | async function comments_del() { 167 | url = `/mb-gw/dndc-gateway/community/api/v2/comments/${$.comment_id}?use_volc=0`; 168 | let {result, msg} = await httpPost(url, '', method = 'delete'); 169 | let _msg; 170 | _msg = `取消评论:${msg}`; 171 | pushMsg(_msg); 172 | } 173 | 174 | //关注/取消关注 put/delete 175 | async function follow(method) { 176 | url = `/mb-gw/dndc-gateway/community/api/v2/user/followings/${$.user_id}`; 177 | let {result, msg} = await httpPost(url, '', method); 178 | let _msg; 179 | _msg = (method == 'PUT') ? `关注博主:${msg}` : `取消关注:${msg}`; 180 | pushMsg(_msg); 181 | } 182 | 183 | async function httpPost(url, body, method) { 184 | timestamp = Math.floor(Date.now() / 1000); 185 | url = `https://oneapph5.dongfeng-nissan.com.cn${url}`; 186 | body = body ? body?.replace('$$timestamp$$', timestamp) : body; 187 | noncestr = getNonce(); 188 | sign = CryptoJS.SHA512(`nissanapp${timestamp}${$.token}${noncestr}1${$.uuid}`).toString(); 189 | appversion = $.appversion || '3.1.5'; 190 | headers = { 191 | 'User-Agent': `dong feng ri chan/${appversion}} (iPhone; iOS 17.0.0; Scale/2.00)`, 192 | clientid: 'nissanapp', 193 | appVersion: appversion, 194 | appCode: 'nissan', 195 | appSkin: 'NISSANAPP', 196 | sign: sign, 197 | noncestr: noncestr, 198 | token: $.token, 199 | timestamp: timestamp, 200 | Range: 1, 201 | 'From-Type': 4, 202 | 'Content-Type': 'application/json', 203 | urid: noncestr 204 | }; 205 | const rest = {url, headers, method, ...(body ? {body} : {})}; 206 | return await httpRequest(rest); 207 | } 208 | 209 | async function post_test(method) { 210 | url = 'https://tool.vlwx.com/http/api.php'; 211 | appversion = $.appversion || '3.1.5'; 212 | timestamp = Math.floor(Date.now() / 1000); 213 | noncestr = getNonce(); 214 | sign = CryptoJS.SHA512(`nissanapp${timestamp}${$.token}${noncestr}1${$.uuid}`).toString(); 215 | body = `{ 216 | "method": "${method}", 217 | "url": "https://oneapph5.dongfeng-nissan.com.cn/mb-gw/dndc-gateway/community/api/v2/user/followings/${$.user_id}", 218 | "body": "", 219 | "headers": ["User-Agent: dong feng ri chan/${appversion} (iPhone; iOS 17.0.0; Scale/2.00)", 220 | "clientid: nissanapp", 221 | "appVersion: ${appversion}", 222 | "appCode: nissan", 223 | "appSkin: NISSANAPP", 224 | "sign: ${sign}", 225 | "noncestr: ${noncestr}", 226 | "token: ${$.token}", 227 | "timestamp: ${timestamp}", 228 | "Range: 1", 229 | "From-Type: 4", 230 | "urid: ${noncestr}"] 231 | }` 232 | headers = { 233 | "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36", 234 | "Content-Type": "application/json", 235 | "Referer": "https://tool.vlwx.com/http/" 236 | }; 237 | const rest = {url, headers, body}; 238 | var {body} = await httpRequest(rest); 239 | let _msg; 240 | msg = $.toObj(body).msg 241 | _msg = (method === 'put') ? `关注博主:${msg}` : `取消关注:${msg}` 242 | pushMsg(_msg); 243 | } 244 | 245 | async function httpRequest(options) { 246 | try { 247 | options = options.url ? options : { url: options }; 248 | const _method = options?._method || ('body' in options ? 'post' : 'get'); 249 | const _respType = options?._respType || 'body'; 250 | const _timeout = options?._timeout || 15e3; 251 | const _http = [ 252 | new Promise((_, reject) => setTimeout(() => reject(`⛔️ 请求超时: ${options['url']}`), _timeout)), 253 | new Promise((resolve, reject) => { 254 | debug(options, '[Request]'); 255 | $[_method.toLowerCase()](options, (error, response, data) => { 256 | //debug(response, '[response]'); 257 | debug(data, '[data]'); 258 | error && $.log($.toStr(error)); 259 | if (_respType !== 'all') { 260 | resolve($.toObj(response?.[_respType], response?.[_respType])); 261 | } else { 262 | resolve(response); 263 | } 264 | }) 265 | }) 266 | ]; 267 | return await Promise.race(_http); 268 | } catch (err) { 269 | $.logErr(err); 270 | } 271 | } 272 | 273 | // 脚本执行入口 274 | !(async () => { 275 | typeof $request !== `undefined` ? await getCk() : (CryptoJS = await intCryptoJS(), await main()); // 主函数 276 | })() 277 | .catch((e) => $.messages.push(e.message || e) && $.logErr(e)) 278 | .finally(async () => { 279 | await sendMsg($.messages.join('\n').trimStart().trimEnd()); // 推送通知 280 | $.done(); 281 | }) 282 | 283 | //-------- 284 | function pushMsg(msg) { 285 | $.messages.push(msg.trimEnd()), $.log(msg.trimEnd()); 286 | } 287 | 288 | //加载 crypto-js 289 | async function intCryptoJS() { 290 | function Eval_Crypto(script_str) { 291 | const evalFunc = $.isNode() ? global.eval : eval; 292 | evalFunc(script_str); 293 | return $.isNode() ? global.CryptoJS : CryptoJS; 294 | } 295 | let script_str = ($.isNode() ? require("crypto-js") : $.getdata("cryptojs_Script")) || ""; 296 | if ($.isNode()) { 297 | return script_str; 298 | } 299 | if (script_str && Object.keys(script_str).length) { 300 | $.log("✅ " + $.name + ": 缓存中存在CryptoJS代码, 跳过下载"); 301 | return Eval_Crypto(script_str) 302 | } 303 | 304 | $.log("🚀 " + "开始下载CryptoJS代码"); 305 | // const script_str = (await $.http.get('http://192.168.2.170:8080/crypto-js.min.js')).body; 306 | // Eval_Crypto(script_str); 307 | return new Promise(async resolve => { 308 | $.getScript('http://ys-l.ysepan.com/551976330/420094417/k5G4J73367NKLlPfoiL4c/crypto-js.min.js').then(script_str => { 309 | $.setdata(script_str, "cryptojs_Script"); 310 | Eval_Crypto(script_str) 311 | $.log("✅ CryptoJS加载成功"); 312 | resolve(CryptoJS); 313 | }); 314 | }); 315 | } 316 | 317 | //noncestr 318 | function getNonce(){return Array.from({length:32},(r,n)=>12===n?"4":"0123456789abcdef"[Math.floor(16*Math.random())]).join("").toUpperCase()}; 319 | //noncestr 320 | function getRandomString(n){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";return Array.from({length:n},()=>t[Math.floor(Math.random()*t.length)]).join("")} 321 | 322 | //DEBUG 323 | function debug(content,title="debug"){let start=`\n-----${title}-----\n`;let end=`\n-----${$.time('HH:mm:ss')}-----\n`;if($.is_debug==='true'){if(typeof content=="string"){$.log(start+content+end);}else if(typeof content=="object"){$.log(start+$.toStr(content)+end);}}}; 324 | 325 | //GET ENV 326 | function getEnv(...keys){for(let key of keys){var value=$.isNode()?process.env[key]||process.env[key.toUpperCase()]||process.env[key.toLowerCase()]||$.getdata(key):$.getdata(key);if(value)return value;}}; 327 | 328 | //到小写 329 | function ObjectKeys2LowerCase(obj){return Object.fromEntries(Object.entries(obj).map(([k,v])=>[k.toLowerCase(),v]))}; 330 | 331 | //通知 332 | async function sendMsg(message){if(!message)return;try{if($.isNode()){try{var notify=require('./sendNotify');}catch(e){var notify=require('./utils/sendNotify');}await notify.sendNotify($.name,message);}else{$.msg($.name,'',message);}}catch(e){$.log(`\n\n-----${$.name}-----\n${message}`);}}; 333 | 334 | //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ENV 335 | 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,a)=>{s.call(this,t,(t,s,r)=>{t?a(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.encoding="utf-8",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}getEnv(){return"undefined"!=typeof $environment&&$environment["surge-version"]?"Surge":"undefined"!=typeof $environment&&$environment["stash-version"]?"Stash":"undefined"!=typeof module&&module.exports?"Node.js":"undefined"!=typeof $task?"Quantumult X":"undefined"!=typeof $loon?"Loon":"undefined"!=typeof $rocket?"Shadowrocket":void 0}isNode(){return"Node.js"===this.getEnv()}isQuanX(){return"Quantumult X"===this.getEnv()}isSurge(){return"Surge"===this.getEnv()}isLoon(){return"Loon"===this.getEnv()}isShadowrocket(){return"Shadowrocket"===this.getEnv()}isStash(){return"Stash"===this.getEnv()}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 a=this.getdata(t);if(a)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,a)=>e(a))})}runScript(t,e){return new Promise(s=>{let a=this.getdata("@chavy_boxjs_userCfgs.httpapi");a=a?a.replace(/\n/g,"").trim():a;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[i,o]=a.split("@"),n={url:`http://${o}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":i,Accept:"*/*"},timeout:r};this.post(n,(t,e,a)=>s(a))}).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),a=!s&&this.fs.existsSync(e);if(!s&&!a)return{};{const a=s?t:e;try{return JSON.parse(this.fs.readFileSync(a))}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),a=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):a?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const a=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of a)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,a)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[a+1])>>0==+e[a+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,a]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,a,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,a,r]=/^@(.*?)\.(.*?)$/.exec(e),i=this.getval(a),o=a?"null"===i?null:i||"{}":"{}";try{const e=JSON.parse(o);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),a)}catch(e){const i={};this.lodash_set(i,r,t),s=this.setval(JSON.stringify(i),a)}}else s=this.setval(t,e);return s}getval(t){switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":return $persistentStore.read(t);case"Quantumult X":return $prefs.valueForKey(t);case"Node.js":return this.data=this.loaddata(),this.data[t];default:return this.data&&this.data[t]||null}}setval(t,e){switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":return $persistentStore.write(t,e);case"Quantumult X":return $prefs.setValueForKey(t,e);case"Node.js":return this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0;default:return 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=(()=>{})){switch(t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"],delete t.headers["content-type"],delete t.headers["content-length"]),t.params&&(t.url+="?"+this.queryStr(t.params)),this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":default:this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,a)=>{!t&&s&&(s.body=a,s.statusCode=s.status?s.status:s.statusCode,s.status=s.statusCode),e(t,s,a)});break;case"Quantumult X":this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:a,headers:r,body:i,bodyBytes:o}=t;e(null,{status:s,statusCode:a,headers:r,body:i,bodyBytes:o},i,o)},t=>e(t&&t.error||"UndefinedError"));break;case"Node.js":let s=require("iconv-lite");this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:a,statusCode:r,headers:i,rawBody:o}=t,n=s.decode(o,this.encoding);e(null,{status:a,statusCode:r,headers:i,rawBody:o,body:n},n)},t=>{const{message:a,response:r}=t;e(a,r,r&&s.decode(r.rawBody,this.encoding))})}}post(t,e=(()=>{})){const s=t.method?t.method.toLocaleLowerCase():"post";switch(t.body&&t.headers&&!t.headers["Content-Type"]&&!t.headers["content-type"]&&(t.headers["content-type"]="application/x-www-form-urlencoded"),t.headers&&(delete t.headers["Content-Length"],delete t.headers["content-length"]),this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":default:this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient[s](t,(t,s,a)=>{!t&&s&&(s.body=a,s.statusCode=s.status?s.status:s.statusCode,s.status=s.statusCode),e(t,s,a)});break;case"Quantumult X":t.method=s,this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:a,headers:r,body:i,bodyBytes:o}=t;e(null,{status:s,statusCode:a,headers:r,body:i,bodyBytes:o},i,o)},t=>e(t&&t.error||"UndefinedError"));break;case"Node.js":let a=require("iconv-lite");this.initGotEnv(t);const{url:r,...i}=t;this.got[s](r,i).then(t=>{const{statusCode:s,statusCode:r,headers:i,rawBody:o}=t,n=a.decode(o,this.encoding);e(null,{status:s,statusCode:r,headers:i,rawBody:o,body:n},n)},t=>{const{message:s,response:r}=t;e(s,r,r&&a.decode(r.rawBody,this.encoding))})}}time(t,e=null){const s=e?new Date(e):new Date;let a={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in a)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?a[e]:("00"+a[e]).substr((""+a[e]).length)));return t}queryStr(t){let e="";for(const s in t){let a=t[s];null!=a&&""!==a&&("object"==typeof a&&(a=JSON.stringify(a)),e+=`${s}=${a}&`)}return e=e.substring(0,e.length-1),e}msg(e=t,s="",a="",r){const i=t=>{switch(typeof t){case void 0:return t;case"string":switch(this.getEnv()){case"Surge":case"Stash":default:return{url:t};case"Loon":case"Shadowrocket":return t;case"Quantumult X":return{"open-url":t};case"Node.js":return}case"object":switch(this.getEnv()){case"Surge":case"Stash":case"Shadowrocket":default:{let e=t.url||t.openUrl||t["open-url"];return{url:e}}case"Loon":{let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}case"Quantumult X":{let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl,a=t["update-pasteboard"]||t.updatePasteboard;return{"open-url":e,"media-url":s,"update-pasteboard":a}}case"Node.js":return}default:return}};if(!this.isMute)switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":default:$notification.post(e,s,a,i(r));break;case"Quantumult X":$notify(e,s,a,i(r));break;case"Node.js":}if(!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),a&&t.push(a),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":case"Quantumult X":default:this.log("",`❗️${this.name}, 错误!`,t);break;case"Node.js":this.log("",`❗️${this.name}, 错误!`,t.stack)}}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;switch(this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":case"Quantumult X":default:$done(t);break;case"Node.js":process.exit(1)}}}(t,e)} -------------------------------------------------------------------------------- /task/xdm.js: -------------------------------------------------------------------------------- 1 | /* 2 | 小豆苗 APP获取Token&签到 3 | 仅QX测试,其他自测 4 | 5 | # 说明:经过测试,Token每日过期, 6 | # 过期后,打开客户端,导致脚本内Token失效, 7 | # 故脚本先检测Token是否过期,过期后自动更新Token,此时会导致客户端Token失效 8 | # 当你打开客户端再登录时,脚本Token又失效 9 | # 所以您最好不要关闭重写,方便随时获取Token, 10 | # ****特别注意:获取到Token不会弹窗提醒**** 11 | 12 | # 广告 暂未处理 https://dm.yeemiao.com/ad/get-ads-map 13 | 14 | ======调试区|忽略====== 15 | # ^https?:\/\/dm\.yeemiao\.com\/common\/newmsg\/getUnReadTotalNum$ url script-request-header http://192.168.2.170:8080/xdm.js 16 | ======调试区|忽略====== 17 | 18 | ==================================== 19 | [rewrite_local] 20 | ^https?:\/\/dm\.yeemiao\.com\/common\/newmsg\/getUnReadTotalNum$ url script-request-header https://raw.githubusercontent.com/wf021325/qx/master/task/xdm.js 21 | ####### ^https:\/\/dm\.yeemiao\.com\/user\/login2$ url script-request-body http://192.168.2.170:8080/xdm.js 22 | 23 | [task_local] 24 | 1 0 * * * https://raw.githubusercontent.com/wf021325/qx/master/task/xdm.js, tag=小豆苗, enabled=true 25 | 26 | [mitm] 27 | hostname = dm.yeemiao.com 28 | ==================================== 29 | */ 30 | 31 | const $ = new Env("小豆苗APP"); 32 | const _key = 'XDM_Header'; 33 | let Token = $.getdata(_key); 34 | var message = ""; 35 | 36 | !(async() => { 37 | if (typeof $request != "undefined") { 38 | getToken(); 39 | return; 40 | } 41 | intmd5();//载入MD5 42 | await checkToken()//检查token 43 | if(isLogin == 2){ 44 | await updataToken();//更新token 45 | Token = $.getdata(_key); 46 | } 47 | await signin(); 48 | await submit(); 49 | await status(); 50 | await notify(); 51 | })() 52 | .catch((e) => { 53 | $.log("", `❌失败! 原因: ${e}!`, ""); 54 | }) 55 | .finally(() => { 56 | $.done(); 57 | }); 58 | 59 | function getToken() { 60 | if ($request && $request.method != 'OPTIONS' && $request.headers.hasOwnProperty("token")) { 61 | let a = $request.headers['token']; 62 | $.setdata(a, _key) 63 | //$.msg($.name, '', '获取签到Token成功🎉\n'+a) 64 | } 65 | } 66 | 67 | function GetStr() { 68 | let a = { 69 | "token": Token, 70 | "timestamp": new Date().getTime() 71 | } 72 | return JSON.stringify(a); 73 | } 74 | function GetSign(sign_str){ 75 | let a = sign_str + 'dwsad3$#@$!!@#^%&$_' 76 | return md5(a).toString() 77 | } 78 | function getBody(){ 79 | let str = GetStr(); 80 | let obj = JSON.parse(str); 81 | let sign = GetSign(str); 82 | obj.sign = sign; 83 | return JSON.stringify(obj) 84 | } 85 | function getHeaders() { 86 | return { 87 | 'User-Agent': 'yeemiao/6.36.0 (iPhone; iOS 15.6.1; Scale/2.00);xdm/6.36.0;appBuild/202308162015;iOS/15.6.1', 88 | 'Content-Type': 'application/json;charset=utf-8', 89 | 'token': Token, 90 | } 91 | } 92 | 93 | function checkToken() { 94 | return new Promise((resolve) => { 95 | let obj = {"token":Token,"userId":10086,"timestamp":new Date().getTime()}; 96 | let sign = GetSign(JSON.stringify(obj)); 97 | obj.sign = sign; 98 | body = JSON.stringify(obj); 99 | headers = getHeaders(); 100 | url = 'https://dm.yeemiao.com/askDoctor/doctor/get-doctor-by-user'; 101 | const rest = {url, headers, body}; 102 | $.post(rest, (error, response, data) => { 103 | try { 104 | var obj = JSON.parse(data); 105 | if (obj?.code == '00000' || obj?.code == '01000080000' ) { 106 | //{"code":"01000080000","errorMsg":"该医生已下线"} 107 | isLogin = 1 108 | message += `检查Token:成功\n`; 109 | } else if(obj?.code=='00200010006'){ 110 | isLogin = 2 111 | message += `检查Token失败:${obj?.errorMsg}\n`; 112 | //{"code":"00200010006","name":"USER_TOKEN","errorMsg":"token已过有效期"} 113 | 114 | }else{ 115 | isLogin = 3 116 | message += `检查Token失败:${obj?.errorMsg}\n`; 117 | //{"code":"00600010006","name":"USER_TOKEN","errorMsg":"无效的token"} 118 | } 119 | } catch (e) { 120 | isLogin = 4 121 | $.logErr(e,"❌检查Token请重新登陆更新Token"); 122 | } finally { 123 | resolve(); 124 | } 125 | }); 126 | }); 127 | } 128 | 129 | function updataToken() { 130 | return new Promise((resolve) => { 131 | body = getBody(); 132 | headers = getHeaders(); 133 | url = 'https://dm.yeemiao.com/user/updateLoginToken'; 134 | const rest = {url, headers, body}; 135 | $.post(rest, (error, response, data) => { 136 | try { 137 | var obj = JSON.parse(data); 138 | if (obj?.code == '00000') { 139 | Token = obj.data.token 140 | message += `更新Token:更新成功\n`; 141 | $.setdata(Token, _key) 142 | } else { 143 | message += `更新Token失败:${obj?.errorMsg}\n`; 144 | } 145 | } catch (e) { 146 | $.logErr(e,"❌更新Token请重新登陆更新Token"); 147 | } finally { 148 | resolve(); 149 | } 150 | }); 151 | }); 152 | } 153 | 154 | function signin() { 155 | return new Promise((resolve) => { 156 | body = getBody(); 157 | headers = getHeaders(); 158 | url = 'https://dm.yeemiao.com/point/signin/v2'; 159 | const rest = {url, headers, body}; 160 | $.post(rest, (error, response, data) => { 161 | try { 162 | var obj = JSON.parse(data); 163 | $.log('签到11111:'+data); 164 | if (obj?.code == '00000') { 165 | message += `签到1:签到成功\n`; 166 | } else if (obj?.code == '006') { 167 | message += `签到1:${obj?.errorMsg}\n`; 168 | } else { 169 | message+=`❌签到失败1:${obj?.errorMsg}!\n` 170 | } 171 | } catch (e) { 172 | $.logErr(e,"❌请重新登陆更新Token"); 173 | } finally { 174 | resolve(); 175 | } 176 | }); 177 | }); 178 | } 179 | 180 | function submit() { 181 | return new Promise((resolve) => { 182 | let a =`{"missionCodeList":["uTAwwT","ub12hN"],"timestamp":${new Date().getTime()},"url":"https:\\/\\/dm.yeemiao.com\\/point\\/signin\\/v2","token":"${Token}","extra":"{\\"token\\":\\"${Token}\\"}"}` 183 | let sign = GetSign(a); 184 | let obj = JSON.parse(a); 185 | obj.sign = sign; 186 | body = JSON.stringify(obj); 187 | body = body.replace('https://dm.yeemiao.com/point/signin/v2','https:\\/\\/dm.yeemiao.com\\/point\\/signin\\/v2'); 188 | headers = getHeaders(); 189 | url = 'https://dm.yeemiao.com/mission/submit/v2'; 190 | const rest = {url, headers, body}; 191 | $.post(rest, (error, response, data) => { 192 | try { 193 | var obj = JSON.parse(data); 194 | $.log('签到22222:'+data); 195 | if (obj?.code == '00000') { 196 | msg = obj?.data?.toastText || '重复签到' 197 | message += `签到2:${msg}\n`; 198 | } else if (obj?.code == '006') { 199 | message += `签到2:${obj?.errorMsg}\n`; 200 | } else { 201 | message+=`❌签到失败2:${obj?.errorMsg}!\n` 202 | } 203 | } catch (e) { 204 | $.logErr(e,"❌请重新登陆更新Token"); 205 | } finally { 206 | resolve(); 207 | } 208 | }); 209 | }); 210 | } 211 | 212 | function status() { 213 | return new Promise((resolve) => { 214 | body = getBody(); 215 | headers = getHeaders(); 216 | url = 'https://dm.yeemiao.com/point/getUserPointInfo'; 217 | const rest = {url, headers, body};; 218 | $.post(rest, (error, response, data) => { 219 | var obj = JSON.parse(data); 220 | if (obj?.code == '00000') { 221 | message+=`当前积分:${obj?.data?.pointTotal}` 222 | } else { 223 | $.msg($.name, "", `❌${obj?.errorMsg}`); 224 | } 225 | resolve(); 226 | }); 227 | }); 228 | } 229 | 230 | async function notify() {$.msg($.name, "", message);} 231 | 232 | //MD5 233 | function intmd5(){!function(n){"use strict";function t(n,t){var r=(65535&n)+(65535&t);return(n>>16)+(t>>16)+(r>>16)<<16|65535&r}function r(n,r,e,o,u,c){return t((c=t(t(r,n),t(o,c)))<>>32-u,e)}function e(n,t,e,o,u,c,f){return r(t&e|~t&o,n,t,u,c,f)}function o(n,t,e,o,u,c,f){return r(t&o|e&~o,n,t,u,c,f)}function u(n,t,e,o,u,c,f){return r(t^e^o,n,t,u,c,f)}function c(n,t,e,o,u,c,f){return r(e^(t|~o),n,t,u,c,f)}function f(n,r){var f,i,a,h;n[r>>5]|=128<>>9<<4)]=r;for(var d=1732584193,l=-271733879,g=-1732584194,v=271733878,m=0;m>5]>>>e%32&255);return t}function a(n){var t=[];for(t[(n.length>>2)-1]=void 0,e=0;e>5]|=(255&n.charCodeAt(e/8))<>>4&15)+r.charAt(15&t);return e}function d(n){return unescape(encodeURIComponent(n))}function l(n){return i(f(a(n=d(n)),8*n.length))}function g(n,t){return function(n,t){var r,e=a(n),o=[],u=[];for(o[15]=u[15]=void 0,16{s.call(this,t,(t,s,r)=>{t?a(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.encoding="utf-8",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}getEnv(){return"undefined"!=typeof $environment&&$environment["surge-version"]?"Surge":"undefined"!=typeof $environment&&$environment["stash-version"]?"Stash":"undefined"!=typeof module&&module.exports?"Node.js":"undefined"!=typeof $task?"Quantumult X":"undefined"!=typeof $loon?"Loon":"undefined"!=typeof $rocket?"Shadowrocket":void 0}isNode(){return"Node.js"===this.getEnv()}isQuanX(){return"Quantumult X"===this.getEnv()}isSurge(){return"Surge"===this.getEnv()}isLoon(){return"Loon"===this.getEnv()}isShadowrocket(){return"Shadowrocket"===this.getEnv()}isStash(){return"Stash"===this.getEnv()}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 a=this.getdata(t);if(a)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,a)=>e(a))})}runScript(t,e){return new Promise(s=>{let a=this.getdata("@chavy_boxjs_userCfgs.httpapi");a=a?a.replace(/\n/g,"").trim():a;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[i,o]=a.split("@"),n={url:`http://${o}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":i,Accept:"*/*"},timeout:r};this.post(n,(t,e,a)=>s(a))}).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),a=!s&&this.fs.existsSync(e);if(!s&&!a)return{};{const a=s?t:e;try{return JSON.parse(this.fs.readFileSync(a))}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),a=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):a?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const a=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of a)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,a)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[a+1])>>0==+e[a+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,a]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,a,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,a,r]=/^@(.*?)\.(.*?)$/.exec(e),i=this.getval(a),o=a?"null"===i?null:i||"{}":"{}";try{const e=JSON.parse(o);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),a)}catch(e){const i={};this.lodash_set(i,r,t),s=this.setval(JSON.stringify(i),a)}}else s=this.setval(t,e);return s}getval(t){switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":return $persistentStore.read(t);case"Quantumult X":return $prefs.valueForKey(t);case"Node.js":return this.data=this.loaddata(),this.data[t];default:return this.data&&this.data[t]||null}}setval(t,e){switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":return $persistentStore.write(t,e);case"Quantumult X":return $prefs.setValueForKey(t,e);case"Node.js":return this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0;default:return 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=(()=>{})){switch(t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"],delete t.headers["content-type"],delete t.headers["content-length"]),t.params&&(t.url+="?"+this.queryStr(t.params)),this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":default:this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,a)=>{!t&&s&&(s.body=a,s.statusCode=s.status?s.status:s.statusCode,s.status=s.statusCode),e(t,s,a)});break;case"Quantumult X":this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:a,headers:r,body:i,bodyBytes:o}=t;e(null,{status:s,statusCode:a,headers:r,body:i,bodyBytes:o},i,o)},t=>e(t&&t.error||"UndefinedError"));break;case"Node.js":let s=require("iconv-lite");this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:a,statusCode:r,headers:i,rawBody:o}=t,n=s.decode(o,this.encoding);e(null,{status:a,statusCode:r,headers:i,rawBody:o,body:n},n)},t=>{const{message:a,response:r}=t;e(a,r,r&&s.decode(r.rawBody,this.encoding))})}}post(t,e=(()=>{})){const s=t.method?t.method.toLocaleLowerCase():"post";switch(t.body&&t.headers&&!t.headers["Content-Type"]&&!t.headers["content-type"]&&(t.headers["content-type"]="application/x-www-form-urlencoded"),t.headers&&(delete t.headers["Content-Length"],delete t.headers["content-length"]),this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":default:this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient[s](t,(t,s,a)=>{!t&&s&&(s.body=a,s.statusCode=s.status?s.status:s.statusCode,s.status=s.statusCode),e(t,s,a)});break;case"Quantumult X":t.method=s,this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:a,headers:r,body:i,bodyBytes:o}=t;e(null,{status:s,statusCode:a,headers:r,body:i,bodyBytes:o},i,o)},t=>e(t&&t.error||"UndefinedError"));break;case"Node.js":let a=require("iconv-lite");this.initGotEnv(t);const{url:r,...i}=t;this.got[s](r,i).then(t=>{const{statusCode:s,statusCode:r,headers:i,rawBody:o}=t,n=a.decode(o,this.encoding);e(null,{status:s,statusCode:r,headers:i,rawBody:o,body:n},n)},t=>{const{message:s,response:r}=t;e(s,r,r&&a.decode(r.rawBody,this.encoding))})}}time(t,e=null){const s=e?new Date(e):new Date;let a={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in a)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?a[e]:("00"+a[e]).substr((""+a[e]).length)));return t}queryStr(t){let e="";for(const s in t){let a=t[s];null!=a&&""!==a&&("object"==typeof a&&(a=JSON.stringify(a)),e+=`${s}=${a}&`)}return e=e.substring(0,e.length-1),e}msg(e=t,s="",a="",r){const i=t=>{switch(typeof t){case void 0:return t;case"string":switch(this.getEnv()){case"Surge":case"Stash":default:return{url:t};case"Loon":case"Shadowrocket":return t;case"Quantumult X":return{"open-url":t};case"Node.js":return}case"object":switch(this.getEnv()){case"Surge":case"Stash":case"Shadowrocket":default:{let e=t.url||t.openUrl||t["open-url"];return{url:e}}case"Loon":{let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}case"Quantumult X":{let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl,a=t["update-pasteboard"]||t.updatePasteboard;return{"open-url":e,"media-url":s,"update-pasteboard":a}}case"Node.js":return}default:return}};if(!this.isMute)switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":default:$notification.post(e,s,a,i(r));break;case"Quantumult X":$notify(e,s,a,i(r));break;case"Node.js":}if(!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),a&&t.push(a),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":case"Quantumult X":default:this.log("",`❗️${this.name}, 错误!`,t);break;case"Node.js":this.log("",`❗️${this.name}, 错误!`,t.stack)}}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;switch(this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":case"Quantumult X":default:$done(t);break;case"Node.js":process.exit(1)}}}(t,e)} 236 | --------------------------------------------------------------------------------