From 46f2e3ed683fff0bf512ee8334e4737e410d7a61 Mon Sep 17 00:00:00 2001 From: NobyDa Date: Wed, 28 Aug 2019 18:27:25 +0800 Subject: [PATCH] Create yyzs.js Medication Assistant Unlock Professional Edition. --- Surge/JS/yyzs.js | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 Surge/JS/yyzs.js diff --git a/Surge/JS/yyzs.js b/Surge/JS/yyzs.js new file mode 100644 index 0000000..32208f2 --- /dev/null +++ b/Surge/JS/yyzs.js @@ -0,0 +1,44 @@ +/* +[Script] +http-response ^https?:\/\/(i|newdrugs)\.dxy\.cn\/(snsapi\/username\/|app\/user\/(pro\/stat\?|init\?timestamp=)) requires-body=1,max-size=0,script-path=DingxiangDrugs.js + +[MITM] +hostname = newdrugs.dxy.cn +*/ + +const path1 = "/snsapi/username/"; +const path2 = "/app/user/pro/stat?"; +const path3 = "/app/user/init?timestamp="; + +const url = $request.url; +let body = $response.body; + +if (url.indexOf(path1) != -1){ +body = JSON.parse(body); +body.items.expertUser = true; +body.items.expert = true; +body.items.expertStatus = 1; +body.items.professional = true; +body = JSON.stringify(body); +} + +if (url.indexOf(path2) != -1){ +body = JSON.parse(body); +body.data.isActive = true; +body = JSON.stringify(body); +} + +if (url.indexOf(path3) != -1){ +body = JSON.parse(body); +body.data.isProActive = true; +body.data.expireDate = 2048; +body.data.memberDiscount = true; +body.data.iapPurchaseVO.purchase = true; +body.data.iapPurchaseVO.message = null; +body.data.iapPurchaseVO.error = null; +body = JSON.stringify(body); +} + +$done({body}) + +// by Primovist \ No newline at end of file