小程序:魔幻粒子,修改某信数值
小程序名为:魔幻粒子
使用 mitmproxy 进行修改 需要提前删除某信的小程序缓存,存档会在从新进入程序时上传服务器。
使用方法:保存python 代码至 proxy.py
from mitmproxy import http
import decimal
import json
import datetime
import re
def set_game_data(game_data):
datas = game_data["currencies"]["list"]
for i in datas.keys():
if i.startswith(("Event", "Quest")):
continue
datas["amount"] = str(decimal.Decimal("1E+100000000"))
datas["total_collected"] = str(decimal.Decimal("1E+100000000"))
datas = game_data["upgrades"]["list"]
# 捕获速度
datas["Catching_Speed"]["lvl"] = 340
# 货物容量
datas["Capacity"]["lvl"] = 130
# 捕获触手
datas["Catching_Tentacles"]["lvl"] = 25
# 群攻
datas["Group_Attack"]["lvl"] = 12
# 移动速度
datas["Move_Speed"]["lvl"] = 150
# 捕获范围
datas["Catching_Radius"]["lvl"] = 180
# 生命值
datas["HP"]["lvl"] = 100
# 帮手
# datas["Bot_Catchers"]["lvl"] = 0
datas["Bot_Catching_speed"]["lvl"] = 100000000
datas["Bot_Catchers_Cargo"]["lvl"] = 100000000
# 送货员
# datas["Bot_Delivers"]["lvl"] = 0
datas["Bot_Delivers_Cargo"]["lvl"] = 100000000
# 去除 帮手 送货员
datas = game_data["heroes"]["list"]
for key in list(datas.keys()):
if datas["key"] == "bot_catcher":
game_data["upgrades"]["list"]["Bot_Catchers"]["lvl"] -= 1
del datas
elif datas["key"] == "bot_deliver":
game_data["upgrades"]["list"]["Bot_Delivers"]["lvl"] -= 1
del datas
class MyProxy:
game_data_url_reg = re.compile(
r"^https://simplestorage.landintheair.com/newstorage/.*?/.*?/Main$"
)
def request(self, flow: http.HTTPFlow):
# 修改上传服务器的存档数据
if self.game_data_url_reg.match(flow.request.url) and flow.request.method == "POST":
game_data = json.loads(flow.request.content)
set_game_data(game_data)
flow.request.content = json.dumps(game_data, ensure_ascii=False).encode()
def response(self, flow: http.HTTPFlow):
# 修改下载服务器的数据
if self.game_data_url_reg.match(flow.request.url) and flow.request.method == "GET":
data = json.loads(flow.response.content)
game_data = json.loads(data["data"])
set_game_data(game_data)
data["data"] = json.dumps(game_data, ensure_ascii=False)
flow.response.content = json.dumps(data, ensure_ascii=False).encode()
addons =
直接飞起~
https://pic.callyulu.cn/i/2026/7a2a72c5f7e8d6eda5b581260b0e2a3c.png
数值直接怼到 1E+100000000,这哪是改数据,这是把游戏经济系统当计算器按着玩啊。
页:
[1]