iTunes.js 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. /***********************************
  2. > ScriptName BuyiTunes多合一脚本[墨鱼版]
  3. > Author @ddgksf2013
  4. > ForHelp 若有屏蔽广告的需求,可公众号后台回复APP名称
  5. > WechatID 墨鱼手记
  6. > TgChannel https://t.me/ddgksf2021
  7. > Contribute https://t.me/ddgksf2013_bot
  8. > Feedback 📮 [email protected] 📮
  9. > UpdateTime 2024-02-19
  10. > Suitable 自行观看“# > ”注释内容,解锁是暂时的,购买也不是永久的[订阅、跑路]
  11. > Attention 如需引用请注明出处,谢谢合作!
  12. > Attention 使用此脚本,会导致AppleStore无法切换账户,解决方法[关闭QX切换账户,或关闭MITM,或删除脚本,或去设置媒体与购买项目处切换ID]
  13. > ScriptURL https://gist.githubusercontent.com/ddgksf2013/9e0f6c7341beea09a31aa309d9d7f502/raw/buyitunes.js
  14. ***********************************/
  15. /*
  16. iTunes多合一应用解锁
  17. [Script]
  18. # > iTunes多合一应用解锁
  19. ^https?:\/\/xxx\.xxx\.xxx\.com url script-response-body https://git.jojo21.top/shawenguan/Quantumult-X/raw/master/Scripts/iTunes/iTunes.js
  20. [MITM]
  21. hostname = xxx.xxx.xxx.com
  22. */
  23. let rspData = JSON.parse($response.body);
  24. // ========= 动态ID ========= //
  25. let productidmap = {
  26. 'default': ['ddgksf2013', 'https://t.me/ddgksf2021', 0],
  27. 'com.sugarmo.ScrollClip': ['picsewV3.9.4', 'com.sugarmo.ScrollClip.pro', 1],
  28. 'com.zijayrate.analogcam': ['oldroll', 'com.zijayrate.analogcam.vipforever10', 0],
  29. 'com.loveyouchenapps.knockout': ['proknockout', 'com.knockout.7daysplus', 0],
  30. 'net.shinyfrog.bear-iOS': ['bear', 'net.shinyfrog.bear_iOS.pro_yearly_subscription_bis', 0],
  31. 'com.yengshine.proccd': ['proccd', 'com.yengshine.proccd.year', 0],
  32. 'com.yumiteam.Kuki.ID': ['PicsLeap', 'com.yumiteam.Kuki.ID.4', 1],
  33. 'com.calc.iphone': ['Calculator', 'calc_Unlock_1', 0],
  34. 'me.imgbase.intolive': ['intolive', 'me.imgbase.intolive.proSubYearly', 0],
  35. 'MVH6DNU2ZP.input': ['logcg', 'com.logcg.loginput', 1],
  36. 'com.waterminder.waterminder': ['waterminder', 'waterminder.premiumYearly', 0],
  37. 'wtf.riedel.one-sec': ['onesec', 'wtf.riedel.one_sec.pro.annual.individual', 0],
  38. 'com.aaaalab.nepacket': ['http', 'com.li.blur.pro.month', 0],
  39. 'com.inturnex.Sticker-Maker': ['Sticker', 'com.inturnex.Sticker_Maker.full_access', 1],
  40. 'FuYuan.inkDiary': ['Secai', 'FuYuan.inkDiary.YearB.Pro', 0],
  41. 'me.imgbase.imgplay': ['imgplay', 'me.imgbase.imgplay.subscriptionYearly', 0],
  42. 'com.mediaeditor.video': ['PrettyUp', 'yearautorenew', 0],
  43. 'com.anycasesolutions.SexTracker': ['SexTracker', 'com.anycasesolutions.SexTracker.3mon', 0],
  44. 'com.jianili.pawff': ['pawff', 'com.jianili.pawff.pro.monthly', 0],
  45. 'icar.ren.smk': ['smk', 'smoke19870727', 0],
  46. 'com.meditation.heartratehrv': ['meditation', 'lifetimeusa', 1],
  47. 'livintis.com.wallpapermonster': ['wallpaper', 'wallpaperworld.subscription.yearly.12.notrial', 0],
  48. 'me.imgbase.videoday': ['videoday', 'me.imgbase.videoday.profeaturesYearly', 0],
  49. 'com.icandiapps.nightsky': ['nightsky', 'com.icandiapps.ns4.annual', 0]
  50. }
  51. // ========= 固定部分 ========= //
  52. rspData.Attention = "恭喜你抓到元数据!由墨鱼分享,请勿售卖或分享他人!";
  53. let mapid = rspData.receipt.bundle_id;
  54. mapping = productidmap[mapid] || productidmap.default;
  55. let inapp = {
  56. product_id: mapping[1],
  57. quantity: "1",
  58. expires_date: "2099-12-18 23:59:59 Etc/GMT",
  59. expires_date_pst: "2099-12-18 23:59:59 America/Los_Angeles",
  60. expires_date_ms: "4101292799000",
  61. is_in_intro_offer_period: "false",
  62. transaction_id: "100000000000000",
  63. is_trial_period: "false",
  64. original_transaction_id: "100000000000000",
  65. purchase_date_ms: "1701705599000",
  66. purchase_date: "2023-12-04 23:59:59 Etc/GMT",
  67. purchase_date_pst: "2023-12-04 23:59:59 America/Los_Angeles",
  68. original_purchase_date: "2023-12-04 23:59:59 Etc/GMT",
  69. original_purchase_date_pst: "2023-12-04 23:59:59 America/Los_Angeles",
  70. original_purchase_date_ms: "1701705599000",
  71. in_app_ownership_type: "PURCHASED",
  72. web_order_line_item_id: "100000000000000"
  73. };
  74. let renew = {
  75. product_id: mapping[1],
  76. original_transaction_id: "100000000000000",
  77. auto_renew_product_id: mapping[1],
  78. auto_renew_status: "1"
  79. };
  80. if (mapping[2]) {
  81. // 删除不必要的属性
  82. delete inapp.expires_date;
  83. delete inapp.expires_date_ms;
  84. delete inapp.expires_date_pst;
  85. } else {
  86. // 设置响应数据
  87. rspData.latest_receipt_info = [inapp];
  88. rspData.latest_receipt = "https://t.me/ddgksf2021";
  89. rspData.pending_renewal_info = [renew];
  90. }
  91. // 更新 receipt 的 in_app 属性
  92. rspData.receipt.in_app = [inapp];
  93. // 完成请求并返回结果
  94. $done({ body: JSON.stringify(rspData) });