worawit / blutter

Flutter Mobile Application Reverse Engineering Tool
MIT License
760 stars 128 forks source link

patch dart SDK to be compatible with 3.12 and future versions of Python #10

Closed flyingwr closed 8 months ago

flyingwr commented 8 months ago

when running blutter with Python 3.12, there's an error once tools/utils.py of dart SDK is executed:

ModuleNotFoundError: No module named 'imp'

this has nothing to do with blutter or dart SDK but with the new changes of Python 3.12 release, as one of them is the migration of imp module: https://docs.python.org/3.12/whatsnew/3.12.html#imp

there are few changes I made to dartvm_fetch_build.py to make it compatible with Python 3.12:

I think it's easier to do this rewriting approach in blutter instead of asking dart SDK managers to fix it in each version that still uses the old imp module, since there are many and blutter fetches their respective tools/utils.py

gjf026 commented 8 months ago

dart 中的算法逻辑无法识别