latorc / MahjongCopilot

雀魂游戏实时 AI 指导 / In-game step-by-step AI Assistant for Maj-soul
https://mjcopilot.com
GNU General Public License v3.0
402 stars 48 forks source link

添加全解锁 基於MITM攻擊來解鎖全腳色、造型、物品 #39

Open fon11731 opened 6 months ago

fon11731 commented 6 months ago

可以添加MajsoulUnlocker吗 https://github.com/shinkuan/MajsoulUnlocker

fon11731 commented 6 months ago

添加这个吧 https://github.com/Avenshy/MajsoulMax

mokms commented 6 months ago

@fon11731 尝试使用以下命令运行 MajsoulMax: mitmdump -p 23410 -s addons.py --mode upstream:http://127.0.0.1:10999

然后正常运行 MahjongCopilot

fon11731 commented 6 months ago

@fon11731 尝试使用以下命令运行 MajsoulMax: mitmdump -p 23410 -s addons.py --mode upstream:http://127.0.0.1:10999

然后正常运行 MahjongCopilot

命令运行后提示 [17:43:07.189] Loading script addons.py [17:43:07.189] error in script addons.py Traceback (most recent call last): File "addons.py", line 1, in from loguru import logger ModuleNotFoundError: No module named 'loguru'. Note that mitmproxy's binaries include their own Python environment. If your addon requires the installation of additional dependencies, please install mitmproxy from PyPI (https://docs.mitmproxy.org/stable/overview-installation/#installation-from-the-python-package-index-pypi). [17:43:07.205] HTTP(S) proxy (upstream mode) listening at *:23410. Error logged during startup, exiting...

fon11731 commented 6 months ago

我给ai分析过后改为 import loguru logger = loguru.logger 依然不行

mokms commented 5 months ago

@fon11731 尝试使用以下命令运行 MajsoulMax: mitmdump -p 23410 -s addons.py --mode upstream:http://127.0.0.1:10999 然后正常运行 MahjongCopilot

命令运行后提示 [17:43:07.189] Loading script addons.py [17:43:07.189] error in script addons.py Traceback (most recent call last): File "addons.py", line 1, in from loguru import logger ModuleNotFoundError: No module named 'loguru'. Note that mitmproxy's binaries include their own Python environment. If your addon requires the installation of additional dependencies, please install mitmproxy from PyPI (https://docs.mitmproxy.org/stable/overview-installation/#installation-from-the-python-package-index-pypi). [17:43:07.205] HTTP(S) proxy (upstream mode) listening at *:23410. Error logged during startup, exiting...

你在运行 MajsoulMax 之前有没有运行 pip install -r requirements.txt 来安装依赖?

mokms commented 5 months ago

我给ai分析过后改为 import loguru logger = loguru.logger 依然不行

我忘了提,你需要在 MahjongCopilot 的源代码中编辑 Chromium 的启动命令。

你需要在 bot_manager.py 文件中的 start_browser 方法中添加 proxy = "http://127.0.0.1:23410" 使其看起来像这样:


def start_browser(self):
    """ Start the browser thread, open browser window """
    ms_url = self.st.ms_url
    proxy = "http://127.0.0.1:23410"
    self.browser.start(ms_url, proxy, self.st.browser_width, self.st.browser_height, self.st.enable_chrome_ext)
asdfg121938 commented 2 months ago

2024-08-28 03:41:56,368 DEBUG [BotThread]bot_manager.py:320 | Bot manager attempting turning on browser overlay 2024-08-28 03:41:56,370 DEBUG [BotThread]bot_manager.py:320 | Bot manager attempting turning on browser overlay 2024-08-28 03:41:56,373 DEBUG [BotThread]bot_manager.py:320 | Bot manager attempting turning on browser overlay 試過了沒辦法