diff --git a/.DS_Store b/.DS_Store index 2b407fa..8535218 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/Scripts/10086.js b/Scripts/10086.js new file mode 100644 index 0000000..7ec12be --- /dev/null +++ b/Scripts/10086.js @@ -0,0 +1,48 @@ +const userCheckinURL = 'http://he.sx.chinamobile.com/h/rest/v1/user/feequery'; +const userCookieKey = 'heLife_10086_userCookieKey'; +const userAgentKey = 'heLife_10086_userAgentKey'; +//const userDataKey = 'heLife_10086_userDataKey'; + + +let isGetCookie = typeof $request !== 'undefined'; +console.log(isGetCookie) +console.log($request.headers['Cookie']) +if (isGetCookie) { + // 获取 Cookie + if (true) { + var cookie = $request.headers['Cookie']; + var userAgent = $request.headers['User-Agent']; + $prefs.setValueForKey(cookie, userCookieKey); + $prefs.setValueForKey(userAgent, userAgentKey); + $notify("成功获取山西和生活cookie 🎉", "", "请在Rewrite_Local禁用该脚本") + } + $done({}); +} else { + // 查话费 + var request = { + url: userCheckinURL, + method: 'POST', + headers: { + 'Cookie': $prefs.valueForKey(userCookieKey), + 'Accept-Encoding': 'gzip, deflate', + 'xm-sign': '5eaf02499406c8e9f548ee374fcac69b(71)1582216331415(27)1582216331415', + 'Connection': 'keep-alive', + 'Host': 'he.sx.chinamobile.com', + 'Accept': '*/*', + 'Referer': 'http://he.sx.chinamobile.com/h/index.html', + 'User-Agent': $prefs.valueForKey(userAgentKey), + 'Content-type' : 'application/json', + 'Content-Length': '2', + 'Accept-Language': 'zh-cn' + }, + body: JSON.stringify({}) + }; + + $task.fetch(request).then(response => { + const obj = JSON.parse(response.body); + var temp = obj.data; + $notify("话费余额"+temp.PREPAY_FEE_YUAN) + }, reason => { + $notify("山西移动和生活", "", reason.error) + }); +} \ No newline at end of file diff --git a/TikTok_Rewrite.list b/TikTok_Rewrite.list new file mode 100644 index 0000000..65ccac9 --- /dev/null +++ b/TikTok_Rewrite.list @@ -0,0 +1,7 @@ +hostname = *.musical.ly, *.tiktokv.com,*.tiktokcdn.com, api*.amemv.com, aweme*.snssdk.com + +(.*video_id=\w{32})(.*watermark=)(.*) url 302 $1 +(?<=(carrier|account|sys)_region=)CN url 307 JP +(?<=version_code=)\d{1,}.\d{1}\.\d{1} url 307 8.4.0 +;(如果想解锁美区tiktok将此条注释) +