znzdw.js 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*************************************
  2. 项目名称:指南针定位——解锁订阅
  3. 下载地址:https://is.gd/mokiYM
  4. 软件版本:1.2.8
  5. 脚本作者:彭于晏💞
  6. 更新时间:2023-9-3
  7. 问题反馈:QQ+89996462
  8. QQ会员群:779392027💞
  9. TG反馈群:https://t.me/plus8889
  10. TG频道群:https://t.me/py996
  11. 使用声明:⚠️此脚本仅供学习与交流,请勿转载与贩卖!⚠️⚠️⚠️
  12. 更多资源请微信搜索小程序【屌丝博客】
  13. **************************************
  14. [rewrite_local]
  15. ^https?:\/\/buy\.itunes\.apple\.com\/verifyReceipt$ url script-response-body https://git.jojo21.top/shawenguan/Quantumult-X/raw/master/Scripts/znzdw/znzdw.js
  16. [mitm]
  17. hostname = buy.itunes.apple.com
  18. *************************************/
  19. var anni = {};
  20. var anni01 = JSON.parse(typeof $response != "undefined" && $response.body || null);
  21. var headers = {};
  22. for (var key in $request.headers) {
  23. const reg = /^[a-z]+$/;
  24. if (key === "User-Agent" && !reg.test(key)) {
  25. var lowerkey = key.toLowerCase();
  26. $request.headers[lowerkey] = $request.headers[key];
  27. delete $request.headers[key];
  28. }
  29. }
  30. var UA = $request.headers['user-agent'];
  31. var uaProductMapping = {
  32. 'GPSMaker': {product_id: 'theodolite_vip_year'},
  33. };
  34. var receipt = {
  35. "quantity": "1",
  36. "purchase_date_ms": "1686776705000",
  37. "expires_date": "2099-12-31 05:05:05 Etc\/GMT",
  38. "expires_date_pst": "2099-12-31 05:05:05 America\/Los_Angeles",
  39. "is_in_intro_offer_period": "false",
  40. "transaction_id": "999999999999999",
  41. "is_trial_period": "false",
  42. "original_transaction_id": "999999999999999",
  43. "purchase_date": "2023-06-15 05:05:05 Etc\/GMT",
  44. "product_id": "888888888888888",
  45. "original_purchase_date_pst": "2023-06-15 05:05:05 America\/Los_Angeles",
  46. "in_app_ownership_type": "PURCHASED",
  47. "subscription_group_identifier": "20877951",
  48. "original_purchase_date_ms": "1686776705000",
  49. "web_order_line_item_id": "999999999999999",
  50. "expires_date_ms": "4102347905000",
  51. "purchase_date_pst": "2023-06-15 05:05:05 America\/Los_Angeles",
  52. "original_purchase_date": "2023-06-15 05:05:05 Etc\/GMT"
  53. }
  54. var renewal = {
  55. "expiration_intent": "1",
  56. "product_id": "888888888888888",
  57. "is_in_billing_retry_period": "0",
  58. "auto_renew_product_id": "888888888888888",
  59. "original_transaction_id": "999999999999999",
  60. "auto_renew_status": "0"
  61. }
  62. for (var uaKey in uaProductMapping) {
  63. if (UA && UA.includes(uaKey)) {
  64. var productInfo = uaProductMapping[uaKey];
  65. var product_id = productInfo.product_id;
  66. receipt.product_id = product_id;
  67. renewal.product_id = product_id;
  68. renewal.auto_renew_product_id = product_id;
  69. anni01.receipt.in_app = [receipt];
  70. anni01.latest_receipt_info = [receipt];
  71. anni.pending_renewal_info = [renewal];
  72. break;
  73. }
  74. }
  75. anni = anni01;
  76. $done({ body: JSON.stringify(anni) });